[PATCH] Add support for bzr diff to the "patch" bzrtool command
Aaron Bentley
aaron.bentley at utoronto.ca
Mon Mar 13 00:36:44 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Goffredo,
I'm still waiting for your thoughts on this. As I said, I'm willing to
merge it, given that it's optional. On the other hand, there are
situations where it will lead to data loss, so using TreeTransform may
be a better approach.
Aaron
Aaron Bentley wrote:
| Goffredo Baroncelli wrote:
|
|>>Hi all,
|>>
|>>the bazaar diff output incorporates additional tags to highlight that
some
|>>action ( as symlinking and/or renaming ) are happened in the past.
|>>So I patched the 'patch' command of the bzrtool plugin in order to
support for
|>>the following additional tag
|
|
| Sure, we can stick this in bzrtools, though I'm still hopeful we'll get
| changesets in bzr core soon.
|
| A couple of things:
|
|>>+ if ( cmd.startswith("removed file") or
|>>+ cmd.startswith("removed symlink") ):
|>>+
|>>+ target = self.extractname(cmd)
|>>+ print "removing '%s'"%target
|>>+ os.unlink(target)
|
|
| For the case of "removed file", I don't believe it's necessary. Patch
| will do that for you.
|
| It looks like you're not ensuring that operations follow the POSIX
| ordering constraints. See here for some discussion of that:
|
http://mebentley.blogspot.com/2005/12/tree-transforms-on-posix-filesystems.html
|
| And you're not ensuring that renames apply to file-ids.
|
| You could do both of these by writing the code as a TreeTransform client.
|
| I'm not clear what you're doing with child_proc, here. Are you trying
| to avoid invoking patch on a file with no patch lines?
|
| Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFEFL6c0F+nu1YWqI0RAnsXAJ0WuGwjFYq4k2jVFyqfeoq9216IRACfYVIL
lGP41hBs54bB1RI6/Tx7frs=
=+8lr
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list