~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2005-09-21 23:13:57 UTC
  • mto: (1185.1.37)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050921231357-2b7d37869d81c975
Fixed branch -r

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
                else:
396
396
                    raise
397
397
            br_from.setup_caching(cache_root)
 
398
            if len(revision) == 1 and revision[0] is not None:
 
399
                revno = revision[0].in_history(br_from)[0]
 
400
            else:
 
401
                revno = None
398
402
            if to_location is None:
399
403
                to_location = os.path.basename(from_location.rstrip("/\\"))
400
404
            try:
409
413
                else:
410
414
                    raise
411
415
            try:
412
 
                copy_branch(br_from, to_location, revision[0])
 
416
                copy_branch(br_from, to_location, revno)
413
417
            except bzrlib.errors.NoSuchRevision:
414
418
                rmtree(to_location)
415
419
                msg = "The branch %s has no revision %d." % (from_location, revision[0])