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

  • Committer: Aaron Bentley
  • Date: 2007-02-09 22:59:51 UTC
  • mto: (2230.3.47 branch6)
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: abentley@panoramicfeedback.com-20070209225951-c4n8dhvdabsag0zq
Implement conversion to branch 6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1011
1011
                return True
1012
1012
        except errors.NoRepositoryPresent:
1013
1013
            pass
 
1014
        try:
 
1015
            if not isinstance(self.open_branch()._format,
 
1016
                              format.branch_format.__class__):
 
1017
                # the repository needs an upgrade.
 
1018
                return True
 
1019
        except errors.NotBranchError:
 
1020
            pass
1014
1021
        # currently there are no other possible conversions for meta1 formats.
1015
1022
        return False
1016
1023
 
1985
1992
                self.pb.note('starting repository conversion')
1986
1993
                converter = CopyConverter(self.target_format.repository_format)
1987
1994
                converter.convert(repo, pb)
 
1995
        try:
 
1996
            branch = self.bzrdir.open_branch()
 
1997
        except errors.NotBranchError:
 
1998
            pass
 
1999
        else:
 
2000
            # Avoid circular imports
 
2001
            from bzrlib import branch as _mod_branch
 
2002
            if (branch._format.__class__ is _mod_branch.BzrBranchFormat5 and
 
2003
                self.target_format.branch_format.__class__ is
 
2004
                _mod_branch.BzrBranchFormat6):
 
2005
                branch_converter = _mod_branch.Converter5to6()
 
2006
                branch_converter.convert(branch)
1988
2007
        return to_convert
1989
2008
 
1990
2009