You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steven Woody <na...@gmail.com> on 2007/03/14 01:46:48 UTC

stick to an old file

hi,

if i found a recent file in the repository get some problem and i want
to use one of its old revision as well as keeping other files as their
latest, so what do i do in svn?  the 'svn -rxxx co' command only
supports directory rather than single file.  you see, my requirement
is some like the stick option of cvs's update command.

thanks.

-- 
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.

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

Re: stick to an old file

Posted by Steven Woody <na...@gmail.com>.
On 3/14/07, Kylo Ginsberg <ky...@gmail.com> wrote:
> On 3/13/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> > On Mar 13, 2007, at 20:46, Steven Woody wrote:
> > > if i found a recent file in the repository get some problem and i want
> > > to use one of its old revision as well as keeping other files as their
> > > latest, so what do i do in svn?  the 'svn -rxxx co' command only
> > > supports directory rather than single file.  you see, my requirement
> > > is some like the stick option of cvs's update command.
> >
> > I don't know CVS or it's stick option. But perhaps you are looking
> > for "svn up -r$REV $FILE"
>
> svn doesn't have the equivalent of non-branch sticky tags in cvs (a
> good thing IMHO).  The downside of the "svn up -r" approach for your
> problem is that a subsequent "svn up" will put you back to the current
> unwanted version.
>
> Another possibility is to merge in the old version:
> svn merge -r HEAD:$REV $FILE
>
> Now you can do updates without picking up the unwanted file, *but*
> unlike a cvs sticky tag, you can commit the modified version to the
> repository.  This may or may not be what you want.
>
> Kylo
>

thank you Kylo, i think you're right.  i am going to read the chapter
four of svn-book grabing some merging knowledge.

-- 
woody

then sun rose thinly from the sea and the old man could see the other
boats, low on the water and well in toward the shore, spread out
across the current.

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

Re: stick to an old file

Posted by Kylo Ginsberg <ky...@gmail.com>.
On 3/13/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Mar 13, 2007, at 20:46, Steven Woody wrote:
> > if i found a recent file in the repository get some problem and i want
> > to use one of its old revision as well as keeping other files as their
> > latest, so what do i do in svn?  the 'svn -rxxx co' command only
> > supports directory rather than single file.  you see, my requirement
> > is some like the stick option of cvs's update command.
>
> I don't know CVS or it's stick option. But perhaps you are looking
> for "svn up -r$REV $FILE"

svn doesn't have the equivalent of non-branch sticky tags in cvs (a
good thing IMHO).  The downside of the "svn up -r" approach for your
problem is that a subsequent "svn up" will put you back to the current
unwanted version.

Another possibility is to merge in the old version:
svn merge -r HEAD:$REV $FILE

Now you can do updates without picking up the unwanted file, *but*
unlike a cvs sticky tag, you can commit the modified version to the
repository.  This may or may not be what you want.

Kylo

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

Re: stick to an old file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 13, 2007, at 21:13, Steven Woody wrote:

> On 3/14/07, Ryan Schmidt wrote:
>
>> On Mar 13, 2007, at 20:46, Steven Woody wrote:
>>
>> > if i found a recent file in the repository get some problem and  
>> i want
>> > to use one of its old revision as well as keeping other files as  
>> their
>> > latest, so what do i do in svn?  the 'svn -rxxx co' command only
>> > supports directory rather than single file.  you see, my  
>> requirement
>> > is some like the stick option of cvs's update command.
>>
>> I don't know CVS or it's stick option. But perhaps you are looking
>> for "svn up -r$REV $FILE"
>
> ok, it works but does not fully resolve the problem. after 'up -rxxx',
> i have to put an eye on the file every time when i want to do another
> 'svn up' --- to prevent the old file are not overwriten by lastest
> file in the repository, in other words, it is *not* sticky.
>
> after seaching the web, i'v by far found someone suggested to go
> through 'branching and merging'. any ideal?

Let's keep the discussion on the mailing list please.

Yes, it sounds like you could handle this situation by making a branch.

The other solution could be "svn switch", but that only works on  
directories, not individual files.


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

Re: stick to an old file

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 13, 2007, at 20:46, Steven Woody wrote:

> if i found a recent file in the repository get some problem and i want
> to use one of its old revision as well as keeping other files as their
> latest, so what do i do in svn?  the 'svn -rxxx co' command only
> supports directory rather than single file.  you see, my requirement
> is some like the stick option of cvs's update command.

I don't know CVS or it's stick option. But perhaps you are looking  
for "svn up -r$REV $FILE"


-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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