[PATCH] Add support for bzr diff to the "patch" bzrtool command
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Mar 3 22:22:38 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
iD8DBQFECMGu0F+nu1YWqI0RAlk9AJ4r4jRCgmaphvY3I5Npoobs4kB0PQCfQonm
bl1xClPx01yuGsDmN+oYihk=
=/e2E
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list