~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

bugfix from Aaron Bentley - bzrlib.graph.max_distance had an off-by-1 error

Show diffs side-by-side

added added

removed removed

Lines of Context:
398
398
                else:
399
399
                    raise
400
400
            br_from.setup_caching(cache_root)
 
401
            if len(revision) == 1 and revision[0] is not None:
 
402
                revno = revision[0].in_history(br_from)[0]
 
403
            else:
 
404
                revno = None
401
405
            if to_location is None:
402
406
                to_location = os.path.basename(from_location.rstrip("/\\"))
403
407
            try:
412
416
                else:
413
417
                    raise
414
418
            try:
415
 
                copy_branch(br_from, to_location, revision[0])
 
419
                copy_branch(br_from, to_location, revno)
416
420
            except bzrlib.errors.NoSuchRevision:
417
421
                rmtree(to_location)
418
422
                msg = "The branch %s has no revision %d." % (from_location, revision[0])
1331
1335
            # should not change the parent
1332
1336
            b.set_parent(remote)
1333
1337
        br_remote = Branch.open_containing(remote)
 
1338
 
1334
1339
        return show_missing(b, br_remote, verbose=verbose, quiet=quiet)
1335
1340
 
1336
1341
 
 
1342
 
1337
1343
class cmd_plugins(Command):
1338
1344
    """List plugins"""
1339
1345
    hidden = True