~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

  • Committer: Robert Collins
  • Date: 2006-02-11 11:58:06 UTC
  • mto: (1534.1.22 integration)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060211115806-732dabc1e35714ed
Give format3 working trees their own last-revision marker.

Show diffs side-by-side

added added

removed removed

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