パッチを作成できるようにしたい Web アプリケーションがあります。具体的には、Web サーバーで特定の機能を有効にするためのパッチを作成したいと考えています。
JAVA_OPTS="-Xms128m -Xmx256m $JAVA_OPTS -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true "
# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is not valid on IBM JDKs
PRGDIR=`dirname $0`
JIRA_MAX_PERM_SIZE=128m
if [ -f "${PRGDIR}/permgen.sh" ]; then
echo "Detecting JVM PermGen support..."
. ${PRGDIR}/permgen.sh
if [ $JAVA_PERMGEN_SUPPORTED = "true" ]; then
echo "PermGen switch is supported. Setting to ${JIRA_MAX_PERM_SIZE}"
JAVA_OPTS="-XX:MaxPermSize=${JIRA_MAX_PERM_SIZE} ${JAVA_OPTS}"
else
echo "PermGen switch is NOT supported and will NOT be set automatically."
fi
fi
# use this if you want to import data without notifications
#JAVA_OPTS=" -Datlassian.mail.senddisabled=true -Datlassian.mail.fetchdisabled=true -Datlassian.mail.popdisabled=true $JAVA_OPTS "
export JAVA_OPTS
echo "If you encounter issues starting up JIRA Standalone Edition, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide"
私がやりたいことは、パッチを個別に (qpush -move を使用して) またはすべて一緒に (qpush -a) 適用できるように、このファイルに加える必要がある個々の変更ごとにパッチを保存することです。
最初に、クリーン バージョンのファイルで次のことを試しました。
hg qnew jmx.patch
次に、ファイルの最初の行を次のように変更しました。
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
その後、パッチを更新しました
hg qrefresh
パッチをポップして、クリーンベースからの 2 番目の変更の作業を開始しました
hg qpop
hg qnew jelly.patch
ファイルの最初の行を次のように変更しました
-Djira.jelly.on=true
その後、パッチを更新しました
その後、古いパッチを qpush しようとしたところ、適用に失敗しました。次に、最初にベースパッチを作成するという別のアプローチを試しました。
hg qpop -a
hg qnew base.patch
、ファイルに以下を追加しました
JMX_OPTS=
JELLY_OPTS=
JAVA_OPTS=" ${JAVA_OPTS} ${JELLY_OPTS} ${JMX_OPTS} "
、次に base.patch を更新します
hg qrefresh
次に、base.patch がまだ適用されている間に jmx の新しいパッチを作成します。
hg qnew jmx.new
次のようにファイルを編集します。
JMX_OPTS=" -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
パッチを更新してポップします。
hg qrefresh
hg qpop
ゼリー用の新しいパッチを作成します。
hg qnew jelly.patch
次のようにファイルを編集しました。
JELLY_OPTS=" -Djira.jelly.on=true "
パッチを更新しました:
hg qrefresh
しかし、再び、新しく作成された jelly.patch の上に jmx.patch を qpush しようとすると、競合が発生しました。
Mercurial は期待どおりに動作していると思いますが、作成中のパッチを別の方法で構成して、個別に適用したり、拒否せずに組み合わせたりできるかどうか疑問に思っています