Issue 75 in svnbook: ch04: svn merge --reintegrate does not match any of the 3 usage patterns

svnbook at googlecode.com svnbook at googlecode.com
Thu Jul 7 13:57:40 CDT 2011


Updates:
	Status: Invalid

Comment #5 on issue 75 by ptbu... at gmail.com: ch04: svn merge --reintegrate  
does not match any of the 3 usage patterns
http://code.google.com/p/svnbook/issues/detail?id=75

> Svn merge --reintegrate appears to fit a forth usage pattern:
>        4. merge --reintegrate sourceURL[@REV] [WCPATH]

> I'm guessing that sourceURL must be a URL & that @REV is optional.

That's correct.

> Perhaps this should be added to the svn (1.6.6) tool's help also.

On Subversion's trunk we've made some substantial revisions and additions  
to the 'svn merge --help' text which will appear in the forthcoming 1.7  
release (see  
http://svn.apache.org/repos/asf/subversion/trunk/subversion/svn/main.c).   
Two of the changes relevant to this discussion are the combining of the  
first two usage patterns,

   1. merge sourceURL1[@N] sourceURL2[@M] [WCPATH]
   2. merge sourceWCPATH1 at N sourceWCPATH2 at M [WCPATH]

into a single more general pattern:

   3. merge SOURCE1[@N] SOURCE2[@M] [TARGET_WCPATH]

We also added a new usage pattern:

   2. merge --reintegrate SOURCE[@REV] [TARGET_WCPATH]

Since the chapter 9 reference section for merge closely mirrors the 'svn  
merge --help' text we'll leave it as-is for the 1.6 version of the book.  I  
added the new issue #134 to revisit this section for the 1.7 version of the  
book.

> Through trial & error I discovered the following.
> Perhaps some of these too should be documented in the 'svn merge' section.

>> alias svn_merge 'svn merge --username <ME> --password <PWD>  
>> --non-interactive --dry-run'
>> svn_merge --force --ignore-ancestry --record-only --reintegrate --change  
>> 148 <URL-1 at M> <target-dir>
> svn: -r and -c can't be used with --reintegrate

>> svn_merge --force --ignore-ancestry --record-only --reintegrate  
>> --revision 140:148 <URL-1 at M> <target-dir>
> svn: -r and -c can't be used with --reintegrate

>> svn_merge --force --ignore-ancestry --record-only --reintegrate  
>> <URL-2 at N> <URL-1 at M> <target-dir>
> svn: --reintegrate cannot be used with --ignore-ancestry or --record-only

>> svn_merge --force --reintegrate <URL-2 at N> <target-dir>
> svn: --force cannot be used with --reintegrate

>> svn_merge --reintegrate <URL-2 at N> <target-dir>
> svn: Cannot reintegrate into a working copy that has local modifications

>> svn_merge --depth=<ANY> --reintegrate <URL-2 at N> <target-dir>
> svn: --depth cannot be used with --reintegrate

> #NOTE: Gives identical error if you replace --depth=<ANY> with  
> --non-recursive

All of the above errors explain what the problem is.  We won't document  
every invalid option permutation in 'svn merge --help' or in the book,  
there are simply too many.

>> svn_merge --force --reintegrate <URL-2 at N> <URL-1 at M> <target-dir>
> --- Merging differences between repository URLs into '<target-dir>':
> ...
> #NOTE: svn completely (& silently) ignores the --reintegrate option.
> #            Is that an error?  Should that be reported to the
> Subversion project?

In the latest 1.6.x (1.6.17) and on Subversion's trunk at 1143377 this now  
raises an error:

   1.6.17>svn merge --force --reintegrate ^^/A at 9 ^^/A_COPY at 9 A
   svn: --force cannot be used with --reintegrate

Regardless, it is also an error to use a 2-URL merge with --reintegrate:

   >svn merge --reintegrate ^^/A at 9 ^^/A_COPY at 9 A
   svn: Try 'svn help' for more info
   svn: --reintegrate can only be used with a single merge source






More information about the svnbook-dev mailing list