[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Commit a mixed revision working copy as new HEAD?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-02-24 23:04:46 CET

On Feb 24, 2005, at 3:29 PM, Zachary Pincus wrote:
>
> Note that the svn book takes great pains to say that svn should be
> useful for storing things other than code. So I use it to store, among
> other things, various revisions of figures I'm working on for papers
> or presentations. These are binary files, and so using svn merge to
> "back out" one bad change while leaving the rest of the changes intact
> is totally inapplicable.

The fact that's it's a binary file only means that the file can't be
"contextually" patched. As long as you have no local modifications to
your files, 'svn merge -rHEAD:X' will have no problem tweaking your
working copy to look like revision X. Remember that under the hood,
svn uses binary-diffs on everything.

> That is, the only svn merge command that makes sense is "svn merge
> -rHEAD:nnn Figure1.ai" or whatever, where nnn is the last good
> version. But, despite several assertions to the contrary, a "backward
> patch" like this with svn merge simply cannot back out of a file
> deletion. (Go ahead, try it.)

Huh? That's simply not true. Watch:

[sussman_at_BenBook:~/scratch]$ svn co file:///usr/local/svn/testrepos wc
A wc/svn_error_codes.h
A wc/svn_diff.h
A wc/svn_fs.h
A wc/svn_dav.h
[...]
A wc/svn_ra.h
A wc/svn_opt.h
Checked out revision 25.
[sussman@BenBook:~/scratch]$ cd wc
[sussman@BenBook:~/scratch/wc]$
[sussman@BenBook:~/scratch/wc]$ svn rm svn_wc.h
D svn_wc.h
[sussman@BenBook:~/scratch/wc]$ svn commit -m "deleted svn_wc.h"
Deleting svn_wc.h

Committed revision 26.
[sussman@BenBook:~/scratch/wc]$ svn update
At revision 26.
[sussman@BenBook:~/scratch/wc]$ svn merge -rHEAD:25 .
A svn_wc.h
[sussman@BenBook:~/scratch/wc]$ svn status
A + svn_wc.h

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Feb 24 23:07:26 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.