/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/sign_my_commits.py

  • Committer: Martin Pool
  • Date: 2011-06-28 17:25:26 UTC
  • mfrom: (5999 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110628172526-10cok2s17dvw7x62
merge news

Show diffs side-by-side

added added

removed removed

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