0

これら2つのコマンドの違いは何だろうと思っていました:

svn merge -r N:HEAD url working_copy

svn merge -c N url working_copy

N にあるものだけを作業コピーにマージしたいのですが、最初のコマンドでは必要なものをはるかに多く取得しますが、2 番目のコマンドを使用すると何も得られません。

正しいコマンドラインは何ですか?

change と release はどう違いますか?

私はこれらの 2 つのオプションと少し混乱しています。diff と同じ問題です。

あずきの本を調べてみましたが、ちょっとわかりにくいです。

誰かがそれを理解するための優れたドキュメントを持っている場合、それは役に立ちます。

助けてくれてありがとう、チャールズ。

4

1 に答える 1

2

Per svn help merge:

 -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                            A revision argument can be one of:
                               NUMBER       revision number
                               '{' DATE '}' revision at start of the date
                               'HEAD'       latest in repository
                               'BASE'       base rev of item's working copy
                               'COMMITTED'  last commit at or before BASE
                               'PREV'       revision just before COMMITTED
 -c [--change] ARG        : the change made by revision ARG (like -r ARG-1:ARG)
                            If ARG is negative this is like -r ARG:ARG-1
                            If ARG is of the form ARG1-ARG2 then this is like
                            ARG1:ARG2, where ARG1 is inclusive

So, if you use svn merge -c 100, that's equivalent to svn merge -r 99:100 - the set of changes that were made in that revision.

If you've made 300 changes since the revision you're trying to merge, svn merge -r 100:HEAD will be pulling every change made between revisions 100 and 400. Which is why you're getting so much more.

In the context of performing a merge within a single repository, if you "get nothing" when using svn merge -c N, I would first suggest checking the log for that revision and verifying that revision N really touched the path that you're using as the source of the merge. If revision 100 changed /branch/mybranch and I'm trying to merge from /trunk, there's nothing to merge when using svn merge -c 100.

于 2013-08-21T15:15:58.143 に答える