~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Marius Kruger
  • Date: 2010-07-10 20:46:48 UTC
  • mto: (5384.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5385.
  • Revision ID: marius.kruger@enerweb.co.za-20100710204648-5pw4ogv9tmsslea3
* gen_backup_name => generate_backup_name
* write some tests for generate_backup_name

Show diffs side-by-side

added added

removed removed

Lines of Context:
615
615
        """
616
616
        raise NotImplementedError(self.create_workingtree)
617
617
 
618
 
    def gen_backup_name(self, base):
 
618
    def generate_backup_name(self, base):
619
619
        """Generate a non-existing backup file name based on base."""
620
620
        counter = 1
621
621
        name = "%s.~%d~" % (base, counter)
630
630
        :return: Tuple with old path name and new path name
631
631
        """
632
632
 
633
 
        backup_dir=self.name_gen('backup.bzr')
 
633
        backup_dir=self.generate_backup_name('backup.bzr')
634
634
        pb = ui.ui_factory.nested_progress_bar()
635
635
        try:
636
636
            # FIXME: bug 300001 -- the backup fails if the backup directory