~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/uncommit.py

  • Committer: Andrew Bennetts
  • Date: 2009-11-25 07:27:43 UTC
  • mto: This revision was merged to the branch mainline in revision 4825.
  • Revision ID: andrew.bennetts@canonical.com-20091125072743-v6sv4m2mkt9iyslp
Terminate SSHSubprocesses when no refs to them are left, in case .close is never called.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
# TODO: make the guts of this methods on tree, branch.
20
20
 
 
21
import os
 
22
 
21
23
from bzrlib import (
22
24
    errors,
23
25
    revision as _mod_revision,
66
68
            revno = old_revno
67
69
        new_revno = revno - 1
68
70
 
 
71
        revid_iterator = branch.repository.iter_reverse_revision_history(
 
72
                            old_tip)
69
73
        cur_revno = old_revno
70
74
        new_revision_id = old_tip
71
75
        graph = branch.repository.get_graph()
72
 
        for rev_id in graph.iter_lefthand_ancestry(old_tip):
 
76
        for rev_id in revid_iterator:
73
77
            if cur_revno == new_revno:
74
78
                new_revision_id = rev_id
75
79
                break