[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion Vision and Roadmap Proposal

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 9 Apr 2010 22:29:30 +0100

On Fri, Apr 09, 2010 at 04:39:08PM -0400, Mark Mielke wrote:
> In fact, I've found it a bit difficult to reliable say "what
> revision of trunk was this tag created from?" I think the
> information is in the copy-from attribute in the underlying FSFS
> commit, but the last time I tried to get access to it, I was unable
> to find it.

The trick is to use the --stop-on-copy (to stop at branch point)
-v (to show patsh) options of the svn log command:

$ svn log --stop-on-copy -v .
r3 | stsp | 2010-04-09 22:25:24 +0100 (Fri, 09 Apr 2010) | 1 line
Changed paths:
   M /branch/beta

a commit on the branch
r2 | stsp | 2010-04-09 22:24:57 +0100 (Fri, 09 Apr 2010) | 1 line
Changed paths:
   A /branch (from /trunk:1)

creating branch

So /branch was copied from /trunk_at_1.

> Branch is similar. If I want to set to the point on trunk at which
> branches/2.0 was branched, how do I do this?
> In GIT, it's just "git checkout master", "git reset --hard branches/2.0".

Find the revision at which the branch was created using
"svn log" as above. Then copy the old version of the branch
on top of the current version:

svn rm ^/branch
svn copy ^/trunk_at_12345 ^/branch

See also http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchmerge.basicmerging.undo

Received on 2010-04-09 23:30:23 CEST

This is an archived mail posted to the Subversion Dev mailing list.