/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 bzrlib/builtins.py

  • Committer: Alexander Belchenko
  • Date: 2008-02-29 15:53:56 UTC
  • mto: This revision was merged to the branch mainline in revision 3249.
  • Revision ID: bialix@ukr.net-20080229155356-wjc96jdnisg0evah
Allow rename (change case of name) directory on case-insensitive filesystem.

Show diffs side-by-side

added added

removed removed

Lines of Context:
534
534
        if len(names_list) < 2:
535
535
            raise errors.BzrCommandError("missing file argument")
536
536
        tree, rel_names = tree_files(names_list)
537
 
        
538
 
        if os.path.isdir(names_list[-1]):
 
537
 
 
538
        dest = names_list[-1]
 
539
        isdir = os.path.isdir(dest)
 
540
        if (isdir and not tree.case_sensitive and len(rel_names) == 2
 
541
            and rel_names[0].lower() == rel_names[1].lower()):
 
542
                isdir = False
 
543
        if isdir:
539
544
            # move into existing directory
540
545
            for pair in tree.move(rel_names[:-1], rel_names[-1], after=after):
541
546
                self.outf.write("%s => %s\n" % pair)
546
551
                                             ' directory')
547
552
            tree.rename_one(rel_names[0], rel_names[1], after=after)
548
553
            self.outf.write("%s => %s\n" % (rel_names[0], rel_names[1]))
549
 
            
550
 
    
 
554
 
 
555
 
551
556
class cmd_pull(Command):
552
557
    """Turn this branch into a mirror of another branch.
553
558