/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 __init__.py

  • Committer: Jeff Licquia
  • Date: 2008-04-03 03:46:33 UTC
  • mto: (0.54.69 automated)
  • mto: This revision was merged to the branch mainline in revision 6630.
  • Revision ID: jeff@licquia.org-20080403034633-otfuruqq2oj52eri
Oops; make sure to retrieve and format the dotted revno properly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        "Return the current revision id."
55
55
        return self._revid
56
56
 
 
57
    def get_current_revno(self):
 
58
        "Return the current revision number as a tuple."
 
59
        revdict = self._bzrbranch.get_revision_id_to_revno_map()
 
60
        return revdict[self.get_current_revid()]
 
61
 
57
62
    def get_parent_revids(self):
58
63
        "Return the IDs of the current revision's predecessors."
59
64
        repo = self._bzrbranch.repository
69
74
    def show_rev_log(self, out = sys.stdout):
70
75
        "Write the current revision's log entry to a file."
71
76
        rev = self._bzrbranch.repository.get_revision(self._revid)
72
 
        revno = self._bzrbranch.revision_id_to_revno(rev.revision_id)
73
 
        out.write("On revision %d (%s):\n%s\n" % (revno, rev.revision_id,
 
77
        revno = ".".join([str(x) for x in self.get_current_revno()])
 
78
        out.write("On revision %s (%s):\n%s\n" % (revno, rev.revision_id,
74
79
                                                  rev.message))
75
80
 
76
81
    def switch(self, revid):