You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Li Daobing <li...@gmail.com> on 2005/04/05 14:15:08 UTC
is there any command act like `cvs update -C'
cvs update -C:
-C Overwrite locally modified files with clean repository copies.
is there any svn command act like this command?
--
Best regards,
Li Daobing
Re: is there any command act like `cvs update -C'
Posted by John Szakmeister <jo...@szakmeister.net>.
On Tuesday 05 April 2005 12:47, Li Daobing wrote:
> Andrew Thompson wrote:
> > Steve Greenland wrote:
> >> On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
> >>> Gary Thomas wrote:
> >>>> svn revert
> >>>
> >>> Revert only undoes your changes(which might be enough).
> >>
> >> Which is usually what you want. If I had wanted it to be updated,
> >> I'd have said 'svn revert foo.c && svn update foo.c'.
> >
> > I figured most of you probably knew that already. I wanted the caveat
> > to be attached to the answer for posterity.
> >
> > I'm not familiar with CVS development, so I don't know what was
> > intended by the command: cvs update -C
>
> svn revert do *not* support
> svn revert *
What are you talking about? 'svn revert *' work just fine. It's the
*shell* that expands the wildcard character, not us. So if something is
broken in that regard, take a look at the shell.
The truth is, what you don't like is probably the non-recursive behavior
by default. We did that on purpose to avoid having people wipe their
changes out unintentionally.
All you need to do to get base to the base revisions of your files is run
'svn revert -R .' at the top of your working copy.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Gary Thomas <ga...@mlbassoc.com>.
On Wed, 2005-04-06 at 00:47 +0800, Li Daobing wrote:
> Andrew Thompson wrote:
> > Steve Greenland wrote:
> >
> >> On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
> >>
> >>> Gary Thomas wrote:
> >>>
> >>>> svn revert
> >>>>
> >>>
> >>> Revert only undoes your changes(which might be enough).
> >>
> >>
> >> Which is usually what you want. If I had wanted it to be updated, I'd
> >> have said 'svn revert foo.c && svn update foo.c'.
> >
> >
> > I figured most of you probably knew that already. I wanted the caveat to
> > be attached to the answer for posterity.
> >
> > I'm not familiar with CVS development, so I don't know what was intended
> > by the command: cvs update -C
> >
> svn revert do *not* support
> svn revert *
>
> So I don't know how to ignore all my local changes, and get a clean
> source(based on this version, because the source is too big to checkout
> it again)
Just use -R:
svn revert -R
or
svn revert -R <sub-directory>
Don't forget the [ever useful] help feature built into subversion :-)
[gthomas@hermes packages]$ svn help revert
revert: Restore pristine working copy file (undo most local edits).
usage: revert PATH...
Note: this subcommand does not require network access, and resolves
any conflicted states. However, it does not restore removed directories.
Valid options:
--targets arg : pass contents of file ARG as additional args
-R [--recursive] : descend recursively
-q [--quiet] : print as little as possible
--config-dir arg : read user configuration files from directory ARG
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Norbert Unterberg <ne...@gmx.net>.
Li Daobing schrieb:
> svn revert do *not* support
> svn revert *
Have you tried "svn revert -R ."?
Norbert
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Dick Davies <ra...@hellooperator.net>.
* Ben Collins-Sussman <su...@collab.net> [0428 18:28]:
>
> On Apr 5, 2005, at 12:07 PM, Dick Davies wrote:
> >
> >for i in `svn status | awk '{print $2}'`
> >do
> >svn revert $i
> >done
> >
>
> What's wrong with plain old 'svn revert -R .' ? That's what everyone
> does.
Nice, thanks ! need to rtfm more often.
--
'Robots don't have emotions, and that sometimes makes me feel sad.'
-- Bender
Rasputin :: Jack of All Trades - Master of Nuns
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Max Bowsher <ma...@ukf.net>.
Ben Collins-Sussman wrote:
> On Apr 5, 2005, at 12:07 PM, Dick Davies wrote:
>>
>> for i in `svn status | awk '{print $2}'`
>> do
>> svn revert $i
>> done
>>
>
> What's wrong with plain old 'svn revert -R .' ? That's what everyone
> does.
It is cripplingly slow in 1.1 (but not in 1.0 or 1.2+).
As a result, I also used a similar script to the one above, until a little
while ago.
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Ben Collins-Sussman <su...@collab.net>.
On Apr 5, 2005, at 12:07 PM, Dick Davies wrote:
>
> for i in `svn status | awk '{print $2}'`
> do
> svn revert $i
> done
>
What's wrong with plain old 'svn revert -R .' ? That's what everyone
does.
That will give you a clean tree with no local edits. The only caveat:
files that were formerly scheduled for addition (A) are now
unversioned, and will show up in 'svn status' as '?'.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Scott Palmer <sc...@2connected.org>.
On Apr 5, 2005, at 1:07 PM, Dick Davies wrote:
> * Li Daobing <li...@gmail.com> [0447 17:47]:
>> Andrew Thompson wrote:
>>> Steve Greenland wrote:
>>>> On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
>>>>> Gary Thomas wrote:
>>>>>> svn revert
>>>>>
>>>>> Revert only undoes your changes(which might be enough).
>>>>
>>>> Which is usually what you want. If I had wanted it to be updated,
>>>> I'd
>>>> have said 'svn revert foo.c && svn update foo.c'.
>>>
>>> I figured most of you probably knew that already. I wanted the
>>> caveat to
>>> be attached to the answer for posterity.
>>>
>>> I'm not familiar with CVS development, so I don't know what was
>>> intended
>>> by the command: cvs update -C
>>>
>> svn revert do *not* support
>> svn revert *
>
> That wouldn't work for subdirectories anyway.
What about:
svn revert -R .
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Kevin Puetz <pu...@puetzk.org>.
Dick Davies wrote:
> * Li Daobing <li...@gmail.com> [0447 17:47]:
>> > I'm not familiar with CVS development, so I don't know what was
>> > intended by the command: cvs update -C
it would be the equivlant of svn revert foo && svn update foo. It fetches
HEAD (or the sticky tag) from the repository and overwrites the local copy.
>> svn revert do *not* support
>> svn revert *
Well, the * gets expanded by the shell, and then it gets mad about having to
revert things that aren't modified (or aren't even in source control). It
*could* try to proceed anyway, but generally revert tries to be picky about
questionable arguments, since it's going to destroy things forever...
> That wouldn't work for subdirectories anyway.
Well, it would revert property changes :-). But it wouldn't recurse
>> So I don't know how to ignore all my local changes, and get a clean
>> source(based on this version, because the source is too big to checkout
>> it again)
>
> something like
>
> for i in `svn status | awk '{print $2}'`
> do
> svn revert $i
> done
Or the simpler, "svn revert --recursive ."
Just be sure you mean it before you throw out all your local changes :-)
You may also find svn-clean in
http://svn.collab.net/viewcvs/svn/trunk/contrib/client-side/ useful - it
will delete any unversioned files from the WC. combined with revert, it
should then be a totally clean checkout again (except for anything that's
been switched == sticky updated, which will still be switched)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Dick Davies <ra...@hellooperator.net>.
* Li Daobing <li...@gmail.com> [0447 17:47]:
> Andrew Thompson wrote:
> > Steve Greenland wrote:
> >
> >> On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
> >>
> >>> Gary Thomas wrote:
> >>>
> >>>> svn revert
> >>>>
> >>>
> >>> Revert only undoes your changes(which might be enough).
> >>
> >>
> >> Which is usually what you want. If I had wanted it to be updated, I'd
> >> have said 'svn revert foo.c && svn update foo.c'.
> >
> >
> > I figured most of you probably knew that already. I wanted the caveat to
> > be attached to the answer for posterity.
> >
> > I'm not familiar with CVS development, so I don't know what was intended
> > by the command: cvs update -C
> >
> svn revert do *not* support
> svn revert *
That wouldn't work for subdirectories anyway.
> So I don't know how to ignore all my local changes, and get a clean
> source(based on this version, because the source is too big to checkout
> it again)
something like
for i in `svn status | awk '{print $2}'`
do
svn revert $i
done
--
'common sense is what tells you that the world is flat.'
-- Principia Discordia
Rasputin :: Jack of All Trades - Master of Nuns
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Li Daobing <li...@gmail.com>.
Andrew Thompson wrote:
> Steve Greenland wrote:
>
>> On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
>>
>>> Gary Thomas wrote:
>>>
>>>> svn revert
>>>>
>>>
>>> Revert only undoes your changes(which might be enough).
>>
>>
>> Which is usually what you want. If I had wanted it to be updated, I'd
>> have said 'svn revert foo.c && svn update foo.c'.
>
>
> I figured most of you probably knew that already. I wanted the caveat to
> be attached to the answer for posterity.
>
> I'm not familiar with CVS development, so I don't know what was intended
> by the command: cvs update -C
>
svn revert do *not* support
svn revert *
So I don't know how to ignore all my local changes, and get a clean
source(based on this version, because the source is too big to checkout
it again)
--
Best regards,
Li Daobing
Re: is there any command act like `cvs update -C'
Posted by Andrew Thompson <su...@aktzero.com>.
Steve Greenland wrote:
> On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
>
>>Gary Thomas wrote:
>>
>>>svn revert
>>>
>>
>>Revert only undoes your changes(which might be enough).
>
> Which is usually what you want. If I had wanted it to be updated, I'd
> have said 'svn revert foo.c && svn update foo.c'.
I figured most of you probably knew that already. I wanted the caveat to
be attached to the answer for posterity.
I'm not familiar with CVS development, so I don't know what was intended
by the command: cvs update -C
--
Andrew Thompson
http://aktzero.com/
Interested in a hosted SVN repository? Email me, let's talk...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Steve Greenland <st...@lsli.com>.
On Tue, Apr 05, 2005 at 10:46:39AM -0400, Andrew Thompson wrote:
> Gary Thomas wrote:
> >
> >svn revert
> >
>
> Revert only undoes your changes(which might be enough).
Which is usually what you want. If I had wanted it to be updated, I'd
have said 'svn revert foo.c && svn update foo.c'.
Steve
--
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
-- (Stolen from the net)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Andrew Thompson <su...@aktzero.com>.
Gary Thomas wrote:
> On Tue, 2005-04-05 at 22:15 +0800, Li Daobing wrote:
>
>>cvs update -C:
>>-C Overwrite locally modified files with clean repository copies.
>>
>>is there any svn command act like this command?
>
>
> svn revert
>
Revert only undoes your changes(which might be enough).
It does not download other's updates to those files. (It doesn't touch
the repository.)
--
Andrew Thompson
http://aktzero.com/
Interested in a hosted SVN repository? Email me, let's talk...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: is there any command act like `cvs update -C'
Posted by Gary Thomas <ga...@mlbassoc.com>.
On Tue, 2005-04-05 at 22:15 +0800, Li Daobing wrote:
> cvs update -C:
> -C Overwrite locally modified files with clean repository copies.
>
> is there any svn command act like this command?
svn revert
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org