Rev 3430: Revert cmd_missing to use the original function, only now supply restrict in http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/missing
John Arbash Meinel
john at arbash-meinel.com
Mon May 19 22:39:51 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.6-dev/missing
------------------------------------------------------------
revno: 3430
revision-id: john at arbash-meinel.com-20080519213939-7d47qehv3kez1gfx
parent: john at arbash-meinel.com-20080519213552-8jc1yc4w8rqhgzri
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: missing
timestamp: Mon 2008-05-19 16:39:39 -0500
message:
Revert cmd_missing to use the original function, only now supply restrict
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2008-05-19 20:35:37 +0000
+++ b/bzrlib/builtins.py 2008-05-19 21:39:39 +0000
@@ -3308,9 +3308,17 @@
from bzrlib.missing import find_unmerged, iter_log_revisions
if this:
- mine_only = this
+ mine_only = this
if other:
- theirs_only = other
+ theirs_only = other
+ # TODO: We should probably check that we don't have mine-only and
+ # theirs-only set, but it gets complicated because we also have
+ # this and other which could be used.
+ restrict = 'all'
+ if mine_only:
+ restrict = 'local'
+ elif theirs_only:
+ restrict = 'remote'
local_branch = Branch.open_containing(u".")[0]
parent = local_branch.get_parent()
@@ -3330,24 +3338,8 @@
try:
remote_branch.lock_read()
try:
- graph = local_branch.repository.get_graph(
- remote_branch.repository)
- local_revision_id = local_branch.last_revision()
- remote_revision_id = remote_branch.last_revision()
- if theirs_only:
- local_extra = None
- remote_extra = graph.find_unique_ancestors(
- remote_revision_id, [local_revision_id])
- elif mine_only:
- remote_extra = None
- local_extra = graph.find_unique_ancestors(
- local_revision_id, [remote_revision_id])
- else:
- local_extra, remote_extra = graph.find_difference(
- local_revision_id, remote_revision_id)
- # We now have the set of local and remote revisions, but they
- # are not sorted. They also include all merged revisions, while
- # missing only shows the mainline revisions.
+ local_extra, remote_extra = find_unmerged(
+ local_branch, remote_branch, restrict)
if log_format is None:
registry = log.log_formatter_registry
More information about the bazaar-commits
mailing list