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

Re: Copying BASE revision of WC path

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-10-23 08:14:25 CEST

Tor Ringstad <torhr@pvv.org> writes:
> It isn't obvious to me how you would recover this information. When I
> look at the log for a copy operation on a WC containing a file with
> local modifications, I see this:
>
> Changed paths:
> A /branches/mybranch (from /trunk:10)
> M /branches/mybranch/foo
>
> Here, it is obvious that foo had local changes, but what was its BASE
> revision? Or is this meant to be interpreted as foo's BASE being the
> same as its parent, i.e. r10?

If no further copy operation (that is, 'A'dd with history) is given
for a path Q, and some parent of Q was added in this revision, then
Q's BASE rev is the same as that of Q's parent. Apply this rule
recursively upward, if necessary :-).

> My plan was to create the branch with two commits:
>
> % svn cp -rBASE . svn://somehost/somerepo/branches/mybranch
> % svn switch svn://somehost/somerepo/branches/mybranch
> % svn commit
>
> This way it would be trivial to recover the initial local changeset,
> just by diffing the first and the second commits on the branch.

You might want to run 'svn up' first, to get a consistent, unmixed
revision tree in your working copy, before you branch from it.

But as you can see, it's also possible to recover the diff even if you
don't do create the branch separately from the commit, it just might
take a bit more work / scripting.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 23 08:34:50 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.