[0.14] improve bzr rm + bzr revert combination

John Arbash Meinel john at arbash-meinel.com
Thu Mar 15 15:14:20 GMT 2007


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

Jari Aalto wrote:
> Consider this:
> 
>     $ bzr rm control
>     <..oops, not that one>
>     $ bzr revert     
>     Conflict adding file control.  Moved existing file to control.moved.
> 
> SUGGESTION
> 
> I think the above can be avoided alltogether.
> 
> bzr could check if the file was not modified when it is about to
> restore file back to the original location.
> 
>     - Generate m5sum of file on disk
>     - compare to md5sum of file in repository
>     => if they match just change file status back to "versioned"
> 
> Jari

Well, we would use a sha1sum, since we already have those. But certainly
this is possible.

Is there a reason all of your emails start with [0.14] ? It is a little
confusing. These seem like either a plain email, or an [RFC], but I
probably wouldn't put any [] marker in the subject.

There is a similar, but slightly different case that I've seen, which
I'm not sure what should happen.

Specifically, if I have a file (or symlink) on disk, but unversioned.
And I do "bzr merge ../other/branch" which has a versioned file at the
same location with the same contents, the merge should just version the
local file, rather than consider there to be a path conflict. (Similar
to your 'revert' case).

However, after the merge, if you do 'bzr revert', a versioned file would
be removed, but you had an unversioned one. So in one sense it should
just remove the 'versioned' status, and not remove the file.


Anyway, I think your request is reasonable, and just had a small
additional use case to consider.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+WLMJdeBCYSNAAMRAobGAJ9tqhdo4IoUxmflV23ZTvJnFzsC4wCdG5KG
hJJSjOnF92qGMm6pLxw/bkY=
=R1Jp
-----END PGP SIGNATURE-----



More information about the bazaar mailing list