RFC: local file modified if older than stored file?
martin f krafft
madduck at debian.org
Sat Mar 25 10:38:48 GMT 2006
Take two related branches, checked out: if I commit to one and push
the changes to the other one, I get behaviour that's (a) expected on
a theoretical level, (b) highly unexpected on a practical level.
Branch 1:
diamond:/tmp/bzr1> date >| a && bzr commit -m. && bzr push-update sftp://diamond/tmp/bzr2
modified/renamed/reparented a
Committed revision 27.
bzr: WARNING: Unable to update the working tree of: sftp://diamond/tmp/bzr2/
1 revision(s) pushed.
Branch 2:
diamond:/tmp/bzr2> bzr update
Tree is up to date.
diamond:/tmp/bzr2> bzr status
modified:
a
diamond:/tmp/bzr2> bzr revert && bzr status
diamond:/tmp/bzr2>
I understand what's going on on a technical level, and it makes
sense to support it this way (although if the other branch is local,
an update *is* automatically made, so the behaviour is somewhat
inconsistent:
Branch 1:
diamond:/tmp/bzr1> date >| a && bzr commit -m. && bzr push-update /tmp/bzr2
modified/renamed/reparented a
Committed revision 30.
1 revision(s) pushed.
Branch 2:
diamond:/tmp/bzr2> bzr update
Tree is up to date.
diamond:/tmp/bzr2> bzr status
diamond:/tmp/bzr2>
I wonder whether bzr couldn't try to mimick the second case (when
the second branch is local) in general. I think it would be easy to
do, because the changeset that was pushed is newer than the checked
out files. bzr could check the modification date of affected files
and compare it to the time of the changeset, and then do the
appropriate thing.
Of course, a smart way to handle conflicts-on-push would be needed.
Comments?
--
.''`. martin f. krafft <madduck at debian.org>
: :' : proud Debian developer and author: http://debiansystem.info
`. `'`
`- Debian - when you have better things to do than fixing a system
this space intentionally left blank.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature (GPG/PGP)
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060325/fc167059/attachment.pgp
More information about the bazaar
mailing list