~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-06-15 03:37:27 UTC
  • Revision ID: mbp@sourcefrog.net-20050615033727-66933297cd2febda
- Strip any number of trailing slashes and backslashes from the path name
when creating a new branch name from the user-supplied branch name.
  patch from aaron

Show diffs side-by-side

added added

removed removed

Lines of Context:
537
537
                raise
538
538
 
539
539
        if to_location is None:
540
 
            to_location = os.path.basename(from_location)
541
 
            # FIXME: If there's a trailing slash, keep removing them
542
 
            # until we find the right bit
 
540
            to_location = os.path.basename(from_location.rstrip("/\\"))
543
541
 
544
542
        try:
545
543
            os.mkdir(to_location)