You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ed Swierk <es...@cs.stanford.edu> on 2004/03/17 23:20:29 UTC

[BOOK] svn revert == delete + svn update?

Hello,

A note in the "svn revert" section of chapter 3 (draft rev. 9015) is 
confusing me.

It says:

"svn revert ITEM has exactly the same effect as deleting ITEM from your
working copy and then running svn update ITEM.  However, if you're
reverting a file, svn revert has one very noticeable difference--it
doesn't have to communicate with the repository to restore your file."

As I understand it, this is true only if ITEM has not changed in the
repository since the working copy was last updated.  If it has changed,
then deleting the working copy and running svn update ITEM gets the new
version, not the one that svn revert would revert to.  Or does svn update
notice that the working copy is gone, and fetch the version as of the last
update rather than the latest version?

I hope someone can enlighten me.

Thanks,
--Ed

-- 
Ed Swierk
eswierk@cs.stanford.edu

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

Re: [BOOK] svn revert == delete + svn update?

Posted by "C. Michael Pilato" <cm...@collab.net>.
Ben Reser <be...@reser.org> writes:

> On Wed, Mar 17, 2004 at 05:32:06PM -0600, C. Michael Pilato wrote:
> > Your understanding is mostly correct.  'svn up' will notice the
> > missing file, restore it from text-base, and then proceed to update
> > that file across the network.  The book is just wrong.  It should
> > either not draw this comparison at all, or clarify that is "has exactly
> > the same effect as deleting ITEM from your working copy and then
> > running svn update -r {BASE} ITEM."
> 
> You mean svn update -r BASE ITEM
> 
> Only dates go in {}.

Right, sorry.  I had just spend half an hour messing around with shell
scripts.  I'm surprised I didn't put "${BASE}"...

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

Re: [BOOK] svn revert == delete + svn update?

Posted by Ben Reser <be...@reser.org>.
On Wed, Mar 17, 2004 at 05:32:06PM -0600, C. Michael Pilato wrote:
> Your understanding is mostly correct.  'svn up' will notice the
> missing file, restore it from text-base, and then proceed to update
> that file across the network.  The book is just wrong.  It should
> either not draw this comparison at all, or clarify that is "has exactly
> the same effect as deleting ITEM from your working copy and then
> running svn update -r {BASE} ITEM."

You mean svn update -r BASE ITEM

Only dates go in {}.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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