~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/sign_my_commits.py

  • Committer: Jelmer Vernooij
  • Date: 2011-06-16 11:57:36 UTC
  • mto: This revision was merged to the branch mainline in revision 5987.
  • Revision ID: jelmer@samba.org-20110616115736-5xuzwdf87qb81su4
Use iter_ancestry rather than get_ancestry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib import (
23
23
    bzrdir as _mod_bzrdir,
24
24
    gpg,
 
25
    revision as _mod_revision,
25
26
    )
26
27
""")
27
28
from bzrlib.commands import Command
64
65
        count = 0
65
66
        repo.lock_write()
66
67
        try:
 
68
            graph = repo.get_graph()
67
69
            repo.start_write_group()
68
70
            try:
69
 
                for rev_id in repo.get_ancestry(branch.last_revision())[1:]:
 
71
                for rev_id, parents in graph.iter_ancestry(
 
72
                        [branch.last_revision()]):
 
73
                    if _mod_revision.is_null(rev_id):
 
74
                        continue
70
75
                    if repo.has_signature_for_revision_id(rev_id):
71
76
                        continue
72
77
                    rev = repo.get_revision(rev_id)