~dpb/tarmac/ls-fixes

« back to all changes in this revision

Viewing changes to tarmac/branch.py

  • Committer: Sidnei da Silva
  • Date: 2012-07-30 17:22:08 UTC
  • mfrom: (394.7.2 trunk)
  • Revision ID: sidnei.da.silva@canonical.com-20120730172208-1db71na2so297ywo
- Merge from upstream trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
                self.tree = WorkingTree.open(self.config.tree_dir)
73
73
            else:
74
74
                self.logger.debug('Tree does not exist.  Creating dir')
 
75
                # Create the path up to but not including tree_dir if it does
 
76
                # not exist.
 
77
                parent_dir = os.path.dirname(self.config.tree_dir)
 
78
                if not os.path.exists(parent_dir):
 
79
                    os.makedirs(parent_dir)
75
80
                self.tree = self.bzr_branch.create_checkout(
76
81
                    self.config.tree_dir, lightweight=True)
77
82
        except AttributeError: