bzr assumes I want to remove the file if I delete it from the filesystem

Aaron Bentley aaron.bentley at utoronto.ca
Fri Dec 9 18:24:19 GMT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Rosenstand wrote:
>>If foo is a versioned filed, and I do 'rm foo; bzr commit'. Should bzr
>>really remove the file from the repository then? It seems quite odd to
>>me, especially since I temporarily removed a file from the file
>>system, and forgot to 'bzr revert' it before I committed... What's
>>the best way of restoring the file with all its history retained?
> 
> 
> IIRC it doesn't matter if you commit or not, if you rm a file you can't
> get it back easily.

That's not so.  You can get back any previously committed revision with
bzr revert -r $REVNO $FILENAME.

In this case, you'd probably want bzr revert -r last:2 FILENAME.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDmcvS0F+nu1YWqI0RAu77AKCEs7wxygxnpiGsMO0nazle4ZiZMACeOOeo
0XNB5KCvWDt8enkNpsTWHfg=
=XDqr
-----END PGP SIGNATURE-----




More information about the bazaar mailing list