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

  • Committer: Martin Pool
  • Date: 2008-02-06 00:41:04 UTC
  • mfrom: (3215 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3219.
  • Revision ID: mbp@sourcefrog.net-20080206004104-mxtn32habuhjq6b8
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                                      zero_eight, zero_nine, zero_sixteen,
63
63
                                      zero_ninetyone,
64
64
                                      )
65
 
from bzrlib.trace import mutter, mutter_callsite, note
 
65
from bzrlib.trace import mutter, mutter_callsite, note, is_quiet
66
66
 
67
67
 
68
68
BZR_BRANCH_FORMAT_4 = "Bazaar-NG branch, format 0.0.4\n"
436
436
        raise errors.UpgradeRequired(self.base)
437
437
 
438
438
    def last_revision(self):
439
 
        """Return last revision id, or None"""
440
 
        ph = self.revision_history()
441
 
        if ph:
442
 
            return ph[-1]
443
 
        else:
444
 
            return _mod_revision.NULL_REVISION
 
439
        """Return last revision id, or NULL_REVISION."""
 
440
        return self.last_revision_info()[1]
445
441
 
446
442
    def last_revision_info(self):
447
443
        """Return information about the last revision.
1948
1944
        revno = int(revno)
1949
1945
        return revno, revision_id
1950
1946
 
1951
 
    def last_revision(self):
1952
 
        """Return last revision id, or None"""
1953
 
        revision_id = self.last_revision_info()[1]
1954
 
        return revision_id
1955
 
 
1956
1947
    def _write_last_revision_info(self, revno, revision_id):
1957
1948
        """Simply write out the revision id, with no checks.
1958
1949
 
2129
2120
        return self.new_revno - self.old_revno
2130
2121
 
2131
2122
    def report(self, to_file):
2132
 
        if self.old_revid == self.new_revid:
2133
 
            to_file.write('No revisions to pull.\n')
2134
 
        else:
2135
 
            to_file.write('Now on revision %d.\n' % self.new_revno)
 
2123
        if not is_quiet():
 
2124
            if self.old_revid == self.new_revid:
 
2125
                to_file.write('No revisions to pull.\n')
 
2126
            else:
 
2127
                to_file.write('Now on revision %d.\n' % self.new_revno)
2136
2128
        self._show_tag_conficts(to_file)
2137
2129
 
2138
2130