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

  • Committer: Jelmer Vernooij
  • Date: 2009-03-08 16:32:01 UTC
  • mto: (0.200.245 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090308163201-46z7fm019kn430zn
Cope with new fetch_spec argument.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
    """
59
59
 
60
 
    takes_args = ["src_location", "dest_location"]
 
60
    takes_args = ["src_location", "dest_location?"]
61
61
 
62
 
    def run(self, src_location, dest_location):
 
62
    def run(self, src_location, dest_location=None):
63
63
        from bzrlib.bzrdir import BzrDir, format_registry
64
64
        from bzrlib.errors import NoRepositoryPresent, NotBranchError
65
65
        from bzrlib.repository import Repository
 
66
        import os
 
67
 
 
68
        if dest_location is None:
 
69
            dest_location = os.path.basename(src_location.rstrip("/\\"))
 
70
 
66
71
        source_repo = Repository.open(src_location)
67
 
        format = format_registry.make_bzrdir('rich-root-pack')
 
72
        format = format_registry.make_bzrdir("1.9-rich-root")
68
73
        try:
69
74
            target_bzrdir = BzrDir.open(dest_location)
70
75
        except NotBranchError: