Beispiel #1
0
 def handle(self, message=None, **options):
     if not message:
         self.stderr.write("You must provide a commit message.\n")
         sys.exit(1)
     with commit_on_success(message=message):
         for adapter in iter_adapters():
             print "committing adapter", adapter
             try:
                 for obj in adapter.iter_objects():
                     print obj
                     adapter(obj).write()
             except Exception as e:
                 print e
Beispiel #2
0
 def handle(self, message=None, **options):
     if not message:
         self.stderr.write("You must provide a commit message.\n")
         sys.exit(1)
     with commit_on_success(message=message):
         for adapter in iter_adapters():
             print "committing adapter", adapter
             try:
                 for obj in adapter.iter_objects():
                     print obj
                     adapter(obj).write()
             except Exception as e:
                 print e
Beispiel #3
0
    def run(self, flavor, repo_path, oldrev, newrev, name):
        backend = load_backend(flavor, repo_path, cache=False)

        commit_map = {}
        for commit in backend.history(revision=newrev, since_revision=oldrev):
            print commit
            for path in commit.paths:
                commit_map.setdefault(path, commit)
        
        paths = commit_map.keys()
        print commit_map
        for adapter in iter_adapters(flavor=flavor):
            for obj in adapter.iter_objects(paths=paths):
                print "syncing object", obj
                a = adapter(obj)
                a.sync(commit_map[a.path])
Beispiel #4
0
    def run(self, flavor, repo_path, oldrev, newrev, name):
        backend = load_backend(flavor, repo_path, cache=False)

        commit_map = {}
        for commit in backend.history(revision=newrev, since_revision=oldrev):
            print commit
            for path in commit.paths:
                commit_map.setdefault(path, commit)

        paths = commit_map.keys()
        print commit_map
        for adapter in iter_adapters(flavor=flavor):
            for obj in adapter.iter_objects(paths=paths):
                print "syncing object", obj
                a = adapter(obj)
                a.sync(commit_map[a.path])