[MERGE] Status should not special case conflicts
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 14 15:38:25 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> Status currently special cases showing of conflicts based on whether the
> tree is the 'working tree' or not. In fact, all trees have conflicts()
> methods, so there is no need to special case it - we just need to show
> the conflicts from the new tree.
>
> Eventually I plan to make conflicts be exposed as part of the tree
> delta, which then lets status be purely a display of a tree delta, which
> is what we need for dirstate.
>
> Rob
>
...
> === modified file 'bzrlib/status.py'
> --- bzrlib/status.py 2006-06-20 05:32:16 +0000
> +++ bzrlib/status.py 2006-07-14 05:19:28 +0000
> @@ -137,14 +137,14 @@
> show_ids=show_ids,
> show_unchanged=show_unchanged)
>
> - if new_is_working_tree:
> - list_paths('unknown', new.unknowns(), specific_files, to_file)
> - conflict_title = False
> - for conflict in wt.conflicts():
> - if conflict_title is False:
> - print >> to_file, "conflicts:"
> - conflict_title = True
> - print >> to_file, " %s" % conflict
> + list_paths('unknown', new.unknowns(), specific_files, to_file)
> + conflict_title = False
> + # show the new conflicts only for now. XXX: get them from the delta.
> + for conflict in new.conflicts():
> + if conflict_title is False:
> + print >> to_file, "conflicts:"
> + conflict_title = True
> + print >> to_file, " %s" % conflict
> if new_is_working_tree and show_pending:
> show_pending_merges(new, to_file)
> finally:
>
The fact that 'Tree' implements conflicts() and just returns an empty
list, same with unknowns(). Seems like this is perfectly reasonable, and
simplifies the code.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEt6xhJdeBCYSNAAMRAtxxAJ0d/YGVwgTW8IySipcUs6KALqo5pACaAyoF
ASz3fbuheaMTC/LSpOHbmAs=
=95v6
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list