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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-06-22 19:21:36 UTC
  • mfrom: (7339.1.10 stores-revno)
  • Revision ID: breezy.the.bot@gmail.com-20190622192136-vde8aq61fhj4jza7
Add a ``calculate_revnos`` setting that determines when revision numbers are calculated.

Merged from https://code.launchpad.net/~jelmer/brz/stores-revno/+merge/368873

Show diffs side-by-side

added added

removed removed

Lines of Context:
1661
1661
        """True if uncommitted changes can be stored in this branch."""
1662
1662
        return True
1663
1663
 
 
1664
    def stores_revno(self):
 
1665
        """True if this branch format store revision numbers."""
 
1666
        return True
 
1667
 
1664
1668
 
1665
1669
class BranchHooks(Hooks):
1666
1670
    """A dictionary mapping hook name to a list of callables for branch hooks.
2019
2023
        tag_updates = getattr(self, "tag_updates", None)
2020
2024
        if not is_quiet():
2021
2025
            if self.old_revid != self.new_revid:
2022
 
                note(gettext('Pushed up to revision %d.') % self.new_revno)
 
2026
                if self.new_revno is not None:
 
2027
                    note(gettext('Pushed up to revision %d.'),
 
2028
                         self.new_revno)
 
2029
                else:
 
2030
                    note(gettext('Pushed up to revision id %s.'),
 
2031
                         self.new_revid.decode('utf-8'))
2023
2032
            if tag_updates:
2024
2033
                note(ngettext('%d tag updated.', '%d tags updated.',
2025
2034
                              len(tag_updates)) % len(tag_updates))