/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to commit.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-20 16:16:57 UTC
  • Revision ID: jelmer@canonical.com-20111220161657-zjn6rqjrw8ouehf8
Drop support for old bencode location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from gi.repository import GObject
22
22
from gi.repository import Pango
23
23
 
24
 
try:
25
 
    from bzrlib import bencode
26
 
except ImportError:
27
 
    from bzrlib.util import bencode
28
 
 
29
24
from bzrlib import (
 
25
    bencode,
30
26
    errors,
31
27
    trace,
32
28
    )
62
58
    last_revision = parents[0]
63
59
 
64
60
    if last_revision is not None:
65
 
        try:
66
 
            ignore = set(branch.repository.get_ancestry(last_revision,
67
 
                                                        topo_sorted=False))
68
 
        except errors.NoSuchRevision:
69
 
            # the last revision is a ghost : assume everything is new
70
 
            # except for it
71
 
            ignore = set([None, last_revision])
 
61
        graph = branch.repository.get_graph()
 
62
        ignore = set([r for r,ps in graph.iter_ancestry([last_revision])])
72
63
    else:
73
 
        ignore = set([None])
 
64
        ignore = set([])
74
65
 
75
66
    pm = []
76
67
    for merge in pending:
133
124
        """Setup the member variables for state."""
134
125
        self._basis_tree = self._wt.basis_tree()
135
126
        self._delta = None
136
 
        self._pending = pending_revisions(self._wt)
 
127
        self._wt.lock_read()
 
128
        try:
 
129
            self._pending = pending_revisions(self._wt)
 
130
        finally:
 
131
            self._wt.unlock()
137
132
 
138
133
        self._is_checkout = (self._wt.branch.get_bound_location() is not None)
139
134