~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2005-11-03 16:08:17 UTC
  • mfrom: (1185.16.146)
  • Revision ID: robertc@robertcollins.net-20051103160817-ce8f8dbaafab2a22
Merge from Martin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
676
676
        bzr status
677
677
        bzr commit -m 'imported project'
678
678
    """
679
 
    def run(self):
680
 
        Branch.initialize('.')
 
679
    takes_args = ['location?']
 
680
    def run(self, location=None):
 
681
        from bzrlib.branch import Branch
 
682
        if location is None:
 
683
            location = '.'
 
684
        else:
 
685
            # The path has to exist to initialize a
 
686
            # branch inside of it.
 
687
            # Just using os.mkdir, since I don't
 
688
            # believe that we want to create a bunch of
 
689
            # locations if the user supplies an extended path
 
690
            if not os.path.exists(location):
 
691
                os.mkdir(location)
 
692
        Branch.initialize(location)
681
693
 
682
694
 
683
695
class cmd_diff(Command):