You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by aaron smith <be...@gmail.com> on 2007/09/10 04:36:25 UTC

Reverting trunk back to a tag, what's the standard way?

DAH, the code I have in my project's trunk started breaking a lot of stuff.
I'm only about 12 revision off. What is the best way to tag the contents of
a tag and put it in trunk?

I have a tag called "release_1.3.1_rev796" that I want to be in trunk now. I
was thinking of deleting trunk and copying that tag to trunk, but then
technically the tag wouldn't work as it points to older version of trunk..
Should I use the svn move command? (svn move ./tags/release_1.3.1_rev796
./trunk --force)?

Thanks

Re: Reverting trunk back to a tag, what's the standard way?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 10, 2007, at 02:23, aaron smith wrote:

> On 9/10/07, aaron smith wrote:
>
>> On 9/9/07, Ryan Schmidt wrote:
>>
>>> On Sep 9, 2007, at 23:36, aaron smith wrote:
>>>
>>> > DAH, the code I have in my project's trunk started breaking a lot
>>> > of stuff. I'm only about 12 revision off. What is the best way to
>>> > tag the contents of a tag and put it in trunk?
>>> >
>>> > I have a tag called "release_1.3.1_rev796" that I want to be in
>>> > trunk now. I was thinking of deleting trunk and copying that  
>>> tag to
>>> > trunk, but then technically the tag wouldn't work as it points to
>>> > older version of trunk.. Should I use the svn move command? (svn
>>> > move ./tags/release_1.3.1_rev796 ./trunk --force)?
>>>
>>> Doesn't matter if you delete the head of trunk. The history of trunk
>>> is still there in the repository, the tag still points to a point in
>>> that history, you can copy the tag to the new trunk if you like.
>>>
>>> Another option is to keep the trunk right where it is and just undo
>>> those 12 revisions that you didn't like. See "Undoing changes" in  
>>> the
>>> book for the reverse merging procedure:
>>>
>>> http://svnbook.red-bean.com/en/1.4/
>>> svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
>>
>> Interesting. That would technically work but I dion't think the  
>> latest svn has support for that anymore. The help docs don't have  
>> the -c/--change switch, and it errors out when trying it..  (svn  
>> merge --change 796)
>>
>> I'll probably just delete the head and recreate it based off of  
>> that tag. I don't see any other graceful ways so far.. the -- 
>> change was graceful, but not supported.
>
> wait my bad. in the documentation it says that -c was a shortcut  
> for specifying what revisions are targetted in the merge. I did  
> this and it worked fine:
>
> svn merge -r HEAD:796 .

"-c5" is a shortcut for "-r4:5" (and "-c-5" is a shortcut for "- 
r5:4") introduced in Subversion 1.4. You must have an earlier version  
of Subversion, and should probably upgrade.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Reverting trunk back to a tag, what's the standard way?

Posted by aaron smith <be...@gmail.com>.
wait my bad. in the documentation it says that -c was a shortcut for
specifying what revisions are targetted in the merge. I did this and it
worked fine:

svn merge -r HEAD:796 .



On 9/10/07, aaron smith <be...@gmail.com> wrote:
>
> Interesting. That would technically work but I dion't think the latest svn
> has support for that anymore. The help docs don't have the -c/--change
> switch, and it errors out when trying it..  (svn merge --change 796)
>
> I'll probably just delete the head and recreate it based off of that tag.
> I don't see any other graceful ways so far.. the --change was graceful, but
> not supported.
>
> dah.
>
> On 9/9/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> >
> >
> > On Sep 9, 2007, at 23:36, aaron smith wrote:
> >
> > > DAH, the code I have in my project's trunk started breaking a lot
> > > of stuff. I'm only about 12 revision off. What is the best way to
> > > tag the contents of a tag and put it in trunk?
> > >
> > > I have a tag called "release_1.3.1_rev796" that I want to be in
> > > trunk now. I was thinking of deleting trunk and copying that tag to
> > > trunk, but then technically the tag wouldn't work as it points to
> > > older version of trunk.. Should I use the svn move command? (svn
> > > move ./tags/release_1.3.1_rev796 ./trunk --force)?
> >
> > Doesn't matter if you delete the head of trunk. The history of trunk
> > is still there in the repository, the tag still points to a point in
> > that history, you can copy the tag to the new trunk if you like.
> >
> > Another option is to keep the trunk right where it is and just undo
> > those 12 revisions that you didn't like. See "Undoing changes" in the
> > book for the reverse merging procedure:
> >
> > http://svnbook.red-bean.com/en/1.4/
> > svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
> >
> >
> >
>

Re: Reverting trunk back to a tag, what's the standard way?

Posted by aaron smith <be...@gmail.com>.
Interesting. That would technically work but I dion't think the latest svn
has support for that anymore. The help docs don't have the -c/--change
switch, and it errors out when trying it..  (svn merge --change 796)

I'll probably just delete the head and recreate it based off of that tag. I
don't see any other graceful ways so far.. the --change was graceful, but
not supported.

dah.

On 9/9/07, Ryan Schmidt <su...@ryandesign.com> wrote:
>
>
> On Sep 9, 2007, at 23:36, aaron smith wrote:
>
> > DAH, the code I have in my project's trunk started breaking a lot
> > of stuff. I'm only about 12 revision off. What is the best way to
> > tag the contents of a tag and put it in trunk?
> >
> > I have a tag called "release_1.3.1_rev796" that I want to be in
> > trunk now. I was thinking of deleting trunk and copying that tag to
> > trunk, but then technically the tag wouldn't work as it points to
> > older version of trunk.. Should I use the svn move command? (svn
> > move ./tags/release_1.3.1_rev796 ./trunk --force)?
>
> Doesn't matter if you delete the head of trunk. The history of trunk
> is still there in the repository, the tag still points to a point in
> that history, you can copy the tag to the new trunk if you like.
>
> Another option is to keep the trunk right where it is and just undo
> those 12 revisions that you didn't like. See "Undoing changes" in the
> book for the reverse merging procedure:
>
> http://svnbook.red-bean.com/en/1.4/
> svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
>
>
>

Re: Reverting trunk back to a tag, what's the standard way?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 9, 2007, at 23:36, aaron smith wrote:

> DAH, the code I have in my project's trunk started breaking a lot  
> of stuff. I'm only about 12 revision off. What is the best way to  
> tag the contents of a tag and put it in trunk?
>
> I have a tag called "release_1.3.1_rev796" that I want to be in  
> trunk now. I was thinking of deleting trunk and copying that tag to  
> trunk, but then technically the tag wouldn't work as it points to  
> older version of trunk.. Should I use the svn move command? (svn  
> move ./tags/release_1.3.1_rev796 ./trunk --force)?

Doesn't matter if you delete the head of trunk. The history of trunk  
is still there in the repository, the tag still points to a point in  
that history, you can copy the tag to the new trunk if you like.

Another option is to keep the trunk right where it is and just undo  
those 12 revisions that you didn't like. See "Undoing changes" in the  
book for the reverse merging procedure:

http://svnbook.red-bean.com/en/1.4/ 
svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Reverting trunk back to a tag, what's the standard way?

Posted by Lorenz <lo...@yahoo.com>.
aaron smith wrote:

>DAH, the code I have in my project's trunk started breaking a lot of stuff.
>I'm only about 12 revision off. What is the best way to tag the contents of
>a tag and put it in trunk?
>
>I have a tag called "release_1.3.1_rev796" that I want to be in trunk now. I
>was thinking of deleting trunk and copying that tag to trunk,

that's one possible way.

> but then
>technically the tag wouldn't work as it points to older version of trunk..

no. The tag will still work as before, as you are deleting trunc one
at head, but it will still exists at previous revisions.

>Should I use the svn move command? (svn move ./tags/release_1.3.1_rev796
>./trunk --force)?

that would delete the tag (at head), if that's what you want you can
do that.


The second possibility to get your trunc back to the state when the
tag was cut is a "reverse merge". See
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.undo
for that.


The only difference between the results of that opererations is how
they are represented in the "history" (log) of trunc.

Where deleting trunc and copying the tag will show were the tag was
copied of the trunc and then back to trunc, the "reverse merge"
variant needs documenting what was done in the log message.

As long the tag is realy only a copy of trunc, which methode to chose
is only a matter of taste.


Lorenz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org