You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Tom Anderl <to...@impinj.com> on 2009/04/28 16:42:29 UTC
Updating WC of branch to before the branch was made
I have a WC of a branch and I would like to roll it back to a revision
that was before the branch was created. In the diagram below, I have
checked out revision 8, and I would like to roll back my working copy to
revision 2.
1---2---3-*-----5---7
\
\-4---6---8
When I do an svn log, it follows the copy back in time, so I figured I
could just do an svn update -r 2. Unfortunately, that gives me the
message that "Target path does not exist".
After looking into this a bit, I think what's going on is that when I do
that update, svn is first revving the repository to revision 2, then
looking for my path. Since my branch didn't exist back at revision 2,
it can't find my path. What I would like is for svn to resolve the path
to the files first and then rev the files back to their state at
revision 2. I looked into peg revisions and that looked promising, but
I couldn't figure out how to use pegging when updating.
One solution I've found is to do an svn switch of my WC back to the
trunk and then update back to revision 2, but it seems like I shouldn't
have to do that extra step. Anyone know of any other solution?
There was a thread a while back that asked what I believe is the same
question I have, but it didn't come to a solution:
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=570993
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1965559
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Updating WC of branch to before the branch was made
Posted by Steven <me...@hotmail.com>.
> One solution I've found is to do an svn switch of my WC back to the
> trunk and then update back to revision 2, but it seems like I shouldn't
> have to do that extra step. Anyone know of any other solution?
Hi Tom,
svn switch also takes a -r argument. In casu just use:
svn switch [url-to-trunk] -r 2.
Note: this leaves you with a WC pointing to your trunk. If you want to continue work at the head of your branch, use svn switch [url-to-branch].
Regs,
- Steven
_________________________________________________________________
What can you do with the new Windows Live? Find out
http://www.microsoft.com/windows/windowslive/default.aspx
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1977864
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Updating WC of branch to before the branch was made
Posted by Bob Archer <bo...@amsi.com>.
Seems a little chicken and egg to me. You want to revert to revision 2
in your branch yet your branch didn't exist in revision 2.
I guess the question is, what is the end result you are wanting to get
to? Do you want to remove r3 from your branch? If so, you should be able
to reverse merge it out I think.
If you want to change your branch so that is actually started at r2 you
could always create yourself a patch from r4 to head in your branch,
then delete the branch, recreate it from r2 and then apply the patch.
BOb
________________________________
From: Tom Anderl [mailto:tom.anderl@impinj.com]
Sent: Tuesday, April 28, 2009 12:42 PM
To: users@subversion.tigris.org
Subject: Updating WC of branch to before the branch was made
I have a WC of a branch and I would like to roll it back to a revision
that was before the branch was created. In the diagram below, I have
checked out revision 8, and I would like to roll back my working copy to
revision 2.
1---2---3-*-----5---7
\
\-4---6---8
When I do an svn log, it follows the copy back in time, so I figured I
could just do an svn update -r 2. Unfortunately, that gives me the
message that "Target path does not exist".
After looking into this a bit, I think what's going on is that when I do
that update, svn is first revving the repository to revision 2, then
looking for my path. Since my branch didn't exist back at revision 2,
it can't find my path. What I would like is for svn to resolve the path
to the files first and then rev the files back to their state at
revision 2. I looked into peg revisions and that looked promising, but
I couldn't figure out how to use pegging when updating.
One solution I've found is to do an svn switch of my WC back to the
trunk and then update back to revision 2, but it seems like I shouldn't
have to do that extra step. Anyone know of any other solution?
There was a thread a while back that asked what I believe is the same
question I have, but it didn't come to a solution:
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageI
d=570993
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1965621
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Updating WC of branch to before the branch was made
Posted by Les Mikesell <le...@gmail.com>.
Tom Anderl wrote:
>> What you're asking for doesn't make sense. Your branch didn't exist at
>> revision 2, so what would you expect to see on that branch at revision
>> 2?
>
> The branch didn't exist, but the project ( the set of files ) that is
> now on the branch existed at revision 2. I want to roll back to the set
> of files that existed back at revision 2.
>
> I think what I want can be boiled down to: I want svn update to see
> history the same way that svn log sees history. I want svn update to
> traverse the copies the same way that svn log does.
Subversion versions directories - which is why some people like it. If
you want a version of a file to appear, you must check out or switch to
a directory that contained it at the desired version.
--
Les Mikesell
lesmikesell@gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1982450
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: Updating WC of branch to before the branch was made
Posted by Tom Anderl <to...@impinj.com>.
> What you're asking for doesn't make sense. Your branch didn't exist at
> revision 2, so what would you expect to see on that branch at revision
> 2?
The branch didn't exist, but the project ( the set of files ) that is
now on the branch existed at revision 2. I want to roll back to the set
of files that existed back at revision 2.
I think what I want can be boiled down to: I want svn update to see
history the same way that svn log sees history. I want svn update to
traverse the copies the same way that svn log does.
Tom
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1982008
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: Updating WC of branch to before the branch was made
Posted by Tyler Roscoe <ty...@cryptio.net>.
On Tue, Apr 28, 2009 at 08:51:40PM +0000, Tom Anderl wrote:
> 1---2---3-*-----5---7
> \
> \-4---6---8
>
> Take the following scenario: I'm working on my branch and I notice that
> my project has some unexpected behaviour. I want to track down when
> that behaviour started showing up. I ask svn for the log and I get the
> comments for revisions 8, 6, 4, 3, 2, 1. Revision 2 has a comment that
> makes me suspect that it's the revision where the problem started, so I
> would like to roll back to that revision, run it, and see if the issue
> exists at that point. It seems like it should be as simple as updating
> my WC back to that revision and trying it. Unfortunately, my WC happens
> to be on a branch, and I can't figure out how to update back to a
> revision prior to the creation of the branch.
What you're asking for doesn't make sense. Your branch didn't exist at
revision 2, so what would you expect to see on that branch at revision
2?
If you want to investigate revision 2, go back to the trunk (either
check out a new working copy or svn switch your existing working copy to
the trunk).
tyler
RE: Updating WC of branch to before the branch was made
Posted by Tom Anderl <to...@impinj.com>.
Thanks Bob,
The end result I'm looking for is to get to what my project looked like
back in revision 2. I happen to be working on a branch, but the files
in that branch have history that goes back to before the branch was
created. This is demonstrated by the fact that svn log gives me history
that traverses the copy exactly as I would expect it to. In the example
from my original post (the branch should be coming off the * after
revision 3, sorry I don't know how to get the post to use a fixed width
font):
1---2---3-*-----5---7
\
\-4---6---8
svn log will tell me that the previous revisions of the project were: 8,
6, 4, 3, 2, 1. svn log tells me that my project existed in revision 2,
and I'd like if svn update would actually give me the project as it
existed in revision 2.
Take the following scenario: I'm working on my branch and I notice that
my project has some unexpected behaviour. I want to track down when
that behaviour started showing up. I ask svn for the log and I get the
comments for revisions 8, 6, 4, 3, 2, 1. Revision 2 has a comment that
makes me suspect that it's the revision where the problem started, so I
would like to roll back to that revision, run it, and see if the issue
exists at that point. It seems like it should be as simple as updating
my WC back to that revision and trying it. Unfortunately, my WC happens
to be on a branch, and I can't figure out how to update back to a
revision prior to the creation of the branch.
Tom
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1968452
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].