-----BEGIN PGP SIGNED MESSAGE-----
I got burned today because revert is not recursive when used to recover a
deleted directory. The problem:
* I renamed a directory: $ svn mv foo bar
* I decided I didn't like the new name I had just given it.
* Since currently you can't copy or move something twice without
committing, I reverted both the copied and deleted directories:
$ svn revert foo bar
* I renamed the directory again: $ svn mv foo baz
* I committed without realizing that although I had reverted foo, I had not
reverted the files within foo, which were still scheduled for deletion.
So, is there a good reason to not have revert be recursive? I can't
remember a time when I *ever* didn't use -R (except this time, when I
forgot). Can anyone think of a use-case for -N (and should it be the
default like it is today)? Could the same thing that was recently done
with add be done to revert (ie., swap the -R for -N)?
Also, I thought it was pretty funny when I saw D + baz/file from svn
$ svnadmin create test-repo
$ svn co file://$(pwd)/test-repo test-wc
Checked out revision 0.
$ cd test-wc
$ svn mkdir foo
$ touch foo/file
$ svn add foo/file
$ svn ci -m add file
Transmitting file data .
Committed revision 1.
$ svn mv foo bar
$ svn st
A + bar
$ svn revert bar foo
$ svn st
$ rm -rf bar
$ svn mv foo baz
$ svn st
A + baz
D + baz/file
$ svn ci -m renamed foo
Committed revision 2.
Now baz/foo is gone! (Of course I can recover it by copying from an older
revision, but it's annoying.)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Oct 14 02:03:28 2006