Dmitry Lumpov wrote:
> Hi, François
>
> Thank you for your detailed reply.
>
> Ok, finally, I found out how to do it.
>
> We need to use 'svn update -r<n>' in order to get back to version n.
> My concern was, that just 'svn update' will always tell us, that
> we are at the revision n, even we locally modified files.
> Inconsistency seems to be a problem. Also, we need to know the last revision
> number, which is not obvious and require additional things to do.
>
$ svn help up
update (up): Bring changes from the repository into the working copy.
So, "svn update" or "svn up" is exactly like "get latest version". The
difference is that svn is a copy-modify-merge system, so if you were at
version x, and made some changes, then ran "svn up", now you're at
"version y with changes", not just plain "version y". Subversion won't
throw away your changes.
> It would be natural, if 'svn update' could just revert us to the latest
> revision.
> Certainly, we can remove some files and make 'svn update' find what to do,
> but imagine how dangerous it is in case of lots of files.
"svn update" changes your BASE revision, and merges in any changes that
might have happened in the repository between your old BASE and the new
BASE. It doesn't make your copy look exactly like the copy on the
server, because then you'd lose any changes you made. That would be Bad.
> 'svn revert' seems to be good, but it doesn't check the repository. So,
> if repository has changes, this command cannot tell us, therefore we need
> to use 'svn update' together with it.
$ svn help revert
revert: Restore pristine working copy file (undo most local edits).
svn revert is just like VSS "undo changes". It reverts your file back to
the BASE revision. It doesn't fetch updates from the server, that's what
"svn up" does.
I think we need to be clear about the words we're using. "Revert"
implies going back to something previous, or undoing what was done.
"Update" implies getting something new that wasn't there before. So, you
don't "revert" to the latest version, you "revert" back to what you had
before you started making changes. You "update" to the latest version,
by asking the server what's been changed and making those same changes
locally.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 31 21:40:49 2005