~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

  • Committer: Alexander Belchenko
  • Date: 2006-07-30 07:23:36 UTC
  • mto: (1711.2.111 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1906.
  • Revision ID: bialix@ukr.net-20060730072336-3e9fd7ddb67b5f47
More branding: bazaar-ng -> Bazaar; bazaar-ng.org -> bazaar-vcs.org

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""\
2
 
A plugin for displaying what revisions are in 'other' but not in local.
3
 
"""
4
 
from bzrlib.ui import ui_factory
 
1
"""Display what revisions are missing in 'other' from 'this' and vice versa."""
 
2
 
 
3
import bzrlib.ui as ui
 
4
 
 
5
 
5
6
def iter_log_data(revisions, revision_source, verbose):
6
 
    from bzrlib.diff import compare_trees
7
 
    from bzrlib.tree import EmptyTree
8
 
    last_tree = EmptyTree
 
7
    last_tree = revision_source.revision_tree(None)
9
8
    last_rev_id = None
10
9
    for revno, rev_id in revisions:
11
10
        rev = revision_source.get_revision(rev_id)
19
18
            revision_tree = revision_source.revision_tree(rev_id)
20
19
            last_rev_id = rev_id
21
20
            last_tree = revision_tree
22
 
            delta = compare_trees(revision_tree, parent_tree)
 
21
            delta = parent_tree.changes_from(revision_tree)
23
22
        else:
24
23
            delta = None
25
24
        yield revno, rev, delta
26
25
 
27
26
 
28
27
def find_unmerged(local_branch, remote_branch):
29
 
    progress = ui_factory.progress_bar()
 
28
    progress = ui.ui_factory.nested_progress_bar()
30
29
    local_branch.lock_read()
31
30
    try:
32
31
        remote_branch.lock_read()
60
59
            remote_branch.unlock()
61
60
    finally:
62
61
        local_branch.unlock()
63
 
        progress.clear()
 
62
        progress.finished()
64
63
    return (local_extra, remote_extra)
65
64
 
66
65
def _shortcut(local_rev_history, remote_rev_history):