~ubuntu-branches/ubuntu/raring/bzr-svn/raring

« back to all changes in this revision

Viewing changes to convert.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-07-30 23:14:36 UTC
  • mfrom: (1.1.28 upstream) (3.3.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100730231436-po8j0ibgjn2d6hy0
Tags: 1.0.3-1
* New upstream release.
 + Provides BranchConfig._get_change_editor. Closes: #572109
 + Supports more trunk layout levels. Closes: #573988
* Bump standards version to 3.9.1.
* Mark as supporting bzr 2.2.
* Suggest bzr-rewrite rather than bzr-rebase. LP: #481730

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    FetchRevisionFinder,
56
56
    InterFromSvnRepository,
57
57
    )
58
 
from bzrlib.plugins.svn.format import (
59
 
    get_rich_root_format,
60
 
    )
61
58
 
62
59
 
63
60
LATEST_IMPORT_REVISION_FILENAME = "svn-import-revision"
93
90
class NotDumpFile(BzrError):
94
91
    """A file specified was not a dump file."""
95
92
    _fmt = """%(dumpfile)s is not a dump file."""
 
93
 
96
94
    def __init__(self, dumpfile):
97
95
        BzrError.__init__(self)
98
96
        self.dumpfile = dumpfile
156
154
        """
157
155
        assert not all or create_shared_repo
158
156
        if format is None:
159
 
            self._format = get_rich_root_format()
 
157
            self._format = bzrdir.format_registry.make_bzrdir('default')
160
158
        else:
161
159
            self._format = format
162
160
        self.dirs = {}
301
299
                except NotBranchError:
302
300
                    target_branch = target_dir.create_branch()
303
301
                    target_branch.set_parent(source_branch.base)
304
 
                if source_branch.last_revision() != target_branch.last_revision():
305
 
                    try:
306
 
                        target_branch.pull(source_branch, overwrite=True)
307
 
                    except NoSuchRevision:
308
 
                        if source_branch.check_path() == NODE_FILE:
309
 
                            self.to_transport.delete_tree(source_branch.get_branch_path())
310
 
                            continue
311
 
                        raise
 
302
                try:
 
303
                    target_branch.pull(source_branch, overwrite=True)
 
304
                except NoSuchRevision:
 
305
                    if source_branch.check_path() == NODE_FILE:
 
306
                        self.to_transport.delete_tree(source_branch.get_branch_path())
 
307
                        continue
 
308
                    raise
312
309
                if working_trees and not target_dir.has_workingtree():
313
310
                    target_dir.create_workingtree()
314
311
        finally: