You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kyle Sluder <ky...@ksluder.com> on 2014/02/07 23:30:51 UTC

Showing unmerged revisions within a range

I created a branch (4.0.x) from trunk. Work progressed on trunk and was
selectively merged down to the 4.0.x branch.

The intent was to do our next release off this branch and then kill it.
Subsequent releases would come from the trunk (or branches thereof).

Unfortunately plans changed, and we needed to clone the 4.0.x branch to
produce a 4.0.2 branch. Subsequent changes were made on the trunk and
merged individually to each branch.

We've since released 4.0.2, and so I want to kill the 4.0.2 branch.
Before doing that, I want to ensure that all changes which were merged
from the trunk to the 4.0.2 branch also made it to the 4.0.x branch.

I tried the following:

% svn log --stop-on-copy ${Repository Root}/branches/4.0.2
[ ...snip... ]
------------------------------------------------------------------------
r202859 | kyle | 2014-01-29 11:50:48 -0800 (Wed, 29 Jan 2014) | 2 lines

% svn info
Path: .
URL: ${Repository Root}/branches/4.0.x

% svn mergeinfo -r202859:HEAD --show-revs=eligible $Repository
Root}/branches/4.0.2 .
svn: E195008: Revision range is not allowed


Why does mergeinfo say "revision range is not allowed" when "svn help
mergeinfo" lists --revision under "Valid options"?

Is there another way to do what I want?

--Kyle Sluder

Re: Showing unmerged revisions within a range

Posted by Ben Reser <be...@reser.org>.
On 2/7/14, 10:45 PM, Ben Reser wrote:
> Finally, save yourself some trouble and learn the ^/ syntax:
> https://subversion.apache.org/docs/release-notes/1.5.html#externals-relative-urls

And it's clearly too late since I linked to the wrong relative URL release
note.  I meant:
https://subversion.apache.org/docs/release-notes/1.6.html#repository-root-relative-urls


Re: Showing unmerged revisions within a range

Posted by Ben Reser <be...@reser.org>.
On 2/7/14, 4:28 PM, Kyle Sluder wrote:
> % svn mergeinfo --show-revs=eligible -r202859 ${Repository Root}/trunk
> r200832
> r200833
> r200836
> r200837
> [ ... snip ...]
> 
> Notice that -r200832 is much earlier than the r202859 argument which was
> passed on the command line.
> 
> My wild guess is that r200832 was merged to trunk sometime after
> r202859? I don't know. Searching the commit log history turns up no such
> results.

Unfortunately the -r option on mergeinfo in 1.7 doesn't do anything.
http://subversion.tigris.org/issues/show_bug.cgi?id=4199

This is fixed in 1.8.0 and newer.  I'd suggest installing a build of 1.8.5:
https://subversion.apache.org/packages.html#osx

Also be careful mergeinfo needs a source and a target.  You're only providing a
single argument there which will be treated as your source and your current
working copy will be used to determine the target.

What's not clear to me is why you're using the revision range the way you are.
 Your goal is to make sure anything that was merged to 4.0.2 was also merged to
4.0.x.  So I'd probably do the following:

svn mergeinfo --show-revs=merged $REPO/trunk $REPO/branches/4.0.2 >
merged-4.0.2.txt
svn mergeinfo --show-revs=merged $REPO/trunk $REPO/branches/4.0.x >
merged-4.0.x.txt
diff -u 4.0.2.txt 4.0.x.txt

If you get + lines from the diff output that's changes that were merged to
4.0.x that weren't merged to 4.0.2 (which is likely ok).  If you get - lines
then you've got changes merged to 4.0.2 that weren't merged to 4.0.x.  That is
likely the things you were looking for.  If 4.0.x and 4.0.2 weren't branched
off the same point then you'll have some spurious differences.  For instance if
4.0.x has been made off a new revision of trunk than 4.0.2 was then you'll see
changes merged from trunk to 4.0.2 that are included since they were made
before the branch point, in which case you can safely ignore revisions that
exist before the branch point (you see to know how to find the branch point
with --stop-on-copy so I won't repeat that).

This might be a good use for the revision range on the mergeinfo to exclude the
changes merged to from 4.0.x but you appear to be trying to use the branch
point for 4.0.2 which isn't what you'd want.  Unless of course 4.0.2 is newer
than 4.0.x but it doesn't sound like that's the case.

Finally, save yourself some trouble and learn the ^/ syntax:
https://subversion.apache.org/docs/release-notes/1.5.html#externals-relative-urls

Re: Showing unmerged revisions within a range

Posted by Kyle Sluder <ky...@ksluder.com>.
On Fri, Feb 7, 2014, at 04:18 PM, Kyle Sluder wrote:
> And if I replace the "…branches/4.0.2" with "…trunk", I can see all the
> revisions that haven't been merged from trunk yet.

Hmm, I spoke too soon:

% svn mergeinfo --show-revs=eligible -r202859 ${Repository Root}/trunk
r200832
r200833
r200836
r200837
[ ... snip ...]

Notice that -r200832 is much earlier than the r202859 argument which was
passed on the command line.

My wild guess is that r200832 was merged to trunk sometime after
r202859? I don't know. Searching the commit log history turns up no such
results.

--Kyle Sluder

Re: Showing unmerged revisions within a range

Posted by Kyle Sluder <ky...@ksluder.com>.
On Fri, Feb 7, 2014, at 03:37 PM, Bob Archer wrote:
> The help says:
> 
> (some commands also take ARG1:ARG2 range)
> 
> Did you not get what you wanted without specifying a range?

Hmm, that looks promising:

% svn mergeinfo --show-revs=eligible -r202859 ${Repository
Root}/branches/4.0.2
r202880
r202890
[ ... snip ... ]


And if I replace the "…branches/4.0.2" with "…trunk", I can see all the
revisions that haven't been merged from trunk yet.


> I'm using 1.8.4.

Ah, relevant information I should have included: I'm using svn 1.7.10
(the version bundled with the latest stable release of Xcode).


Thanks for the assistance,
--Kyle Sluder

RE: Showing unmerged revisions within a range

Posted by Bob Archer <Bo...@amsi.com>.
> I created a branch (4.0.x) from trunk. Work progressed on trunk and was
> selectively merged down to the 4.0.x branch.
> 
> The intent was to do our next release off this branch and then kill it.
> Subsequent releases would come from the trunk (or branches thereof).
> 
> Unfortunately plans changed, and we needed to clone the 4.0.x branch to
> produce a 4.0.2 branch. Subsequent changes were made on the trunk and
> merged individually to each branch.
> 
> We've since released 4.0.2, and so I want to kill the 4.0.2 branch.
> Before doing that, I want to ensure that all changes which were merged from
> the trunk to the 4.0.2 branch also made it to the 4.0.x branch.
> 
> I tried the following:
> 
> % svn log --stop-on-copy ${Repository Root}/branches/4.0.2 [ ...snip... ]
> ------------------------------------------------------------------------
> r202859 | kyle | 2014-01-29 11:50:48 -0800 (Wed, 29 Jan 2014) | 2 lines
> 
> % svn info
> Path: .
> URL: ${Repository Root}/branches/4.0.x
> 
> % svn mergeinfo -r202859:HEAD --show-revs=eligible $Repository
> Root}/branches/4.0.2 .
> svn: E195008: Revision range is not allowed
> 
> 
> Why does mergeinfo say "revision range is not allowed" when "svn help
> mergeinfo" lists --revision under "Valid options"?

The help says:

(some commands also take ARG1:ARG2 range)

Did you not get what you wanted without specifying a range?

Hmm... I just tried it and didn't get that error:

svn mergeinfo -r6000:HEAD --show-revs eligible http://myserver/svn/manage/MyAppRootName/v7.5.4
r60148
r60155
r60156
r60157
r60158

I'm using 1.8.4.

BOb