/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-11-24 14:53:53 UTC
  • mfrom: (755.1.1 trunk)
  • Revision ID: jelmer@samba.org-20111124145353-ruumagd1g3vdz711
Avoid call to Repository.get_ancestry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    last_revision = parents[0]
63
63
 
64
64
    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])
 
65
        graph = branch.repository.get_graph()
 
66
        ignore = set([r for r,ps in graph.iter_ancestry([last_revision])])
72
67
    else:
73
 
        ignore = set([None])
 
68
        ignore = set([])
74
69
 
75
70
    pm = []
76
71
    for merge in pending:
133
128
        """Setup the member variables for state."""
134
129
        self._basis_tree = self._wt.basis_tree()
135
130
        self._delta = None
136
 
        self._pending = pending_revisions(self._wt)
 
131
        self._wt.lock_read()
 
132
        try:
 
133
            self._pending = pending_revisions(self._wt)
 
134
        finally:
 
135
            self._wt.unlock()
137
136
 
138
137
        self._is_checkout = (self._wt.branch.get_bound_location() is not None)
139
138