~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-03-02 16:45:38 UTC
  • mfrom: (5070.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100302164538-yx0io3uv54l2o7im
(vila,
        for parthm) mkdir don't create dirs outside working trees anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
699
699
 
700
700
    def run(self, dir_list):
701
701
        for d in dir_list:
702
 
            os.mkdir(d)
703
702
            wt, dd = WorkingTree.open_containing(d)
704
 
            wt.add([dd])
705
 
            self.outf.write('added %s\n' % d)
 
703
            base = os.path.dirname(dd)
 
704
            id = wt.path2id(base)
 
705
            if id != None:
 
706
                os.mkdir(d)
 
707
                wt.add([dd])
 
708
                self.outf.write('added %s\n' % d)
 
709
            else:
 
710
                raise errors.NotVersionedError(path=base)
706
711
 
707
712
 
708
713
class cmd_relpath(Command):