예제 #1
0
 def run(self, location_list=['.'], message=None):
     for location in location_list:
         #print location
         tree, _ = tree_files([location])
         for relpath in tree.unknowns():
             abspath = os.path.join(location, relpath)
             tree.smart_add([abspath])
         try:
             tree.commit(message, allow_pointless=False, strict=True)
         except PointlessCommit:
             pass
예제 #2
0
    def __init__(self, revision=None, file_list=None):
        from bzrlib.builtins import tree_files
        self.tree, self.file_list = tree_files(file_list)
        self.base = self.tree.basedir
        self.revision = revision

        # Hacks to cope with v0.7 and v0.8 of bzr
        if self.revision is None:
            if hasattr(self.tree, 'basis_tree'):
                self.old_tree = self.tree.basis_tree()
            else:
                self.old_tree = self.tree.branch.basis_tree()
        else:
            revision_id = self.revision.in_store(self.tree.branch).rev_id
            if hasattr(self.tree.branch, 'repository'):
                self.old_tree = self.tree.branch.repository.revision_tree(revision_id)
            else:
                self.old_tree = self.tree.branch.revision_tree(revision_id)

        PatchSource.__init__(self)
예제 #3
0
    def __init__(self, revision=None, file_list=None):
        from bzrlib.builtins import tree_files
        self.tree, self.file_list = tree_files(file_list)
        self.base = self.tree.basedir
        self.revision = revision

        # Hacks to cope with v0.7 and v0.8 of bzr
        if self.revision is None:
            if hasattr(self.tree, 'basis_tree'):
                self.old_tree = self.tree.basis_tree()
            else:
                self.old_tree = self.tree.branch.basis_tree()
        else:
            revision_id = self.revision.in_store(self.tree.branch).rev_id
            if hasattr(self.tree.branch, 'repository'):
                self.old_tree = self.tree.branch.repository.revision_tree(
                    revision_id)
            else:
                self.old_tree = self.tree.branch.revision_tree(revision_id)

        PatchSource.__init__(self)