programatically marking conflicts as resolved
aaron.bentley at utoronto.ca
Sun Nov 4 16:38:30 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Sandy Dunlop wrote:
> If I have a WorkingTree object, and a file or list of files that I want
> to change from being conflicts to being resolved programatically in
> Python using bzrlib, what is the correct way to do this?
> I know there is a resolve method in Bazaar's conflicts.py, but I'm
> wondering what's the proper way to access this.
It depends on what you're trying to do. To complete clear the conflicts
list, you can do:
If you want to do something more fine-grained, do you know the precise
conflicts, or only the file names?
If you only know the file names, you can indeed use
bzrlib.conflicts.resolve. But be aware that this will clear all
conflicts associated with the file, which may or may not be what you
want. If you only know the filename, this is still your best choice.
If you know exactly what conflict you want to remove, you should do
wt.get_conflicts(), remove its entry from the list, and then do
> I was expecting it to be a tree method
It's a smart function intended specifically for use with the
commandline. Its behavior has nothing to do with trees' implementation,
and everything to do with commandline UIs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar