예제 #1
0
파일: tree.py 프로젝트: broesamle/servo
    def unique_branch_name(self, prefix):
        """Get an unused branch name in the local tree

        :param prefix: Prefix to use at the start of the branch name"""
        branches = [ref[len("refs/heads/"):] for sha1, ref in self.list_refs()
                    if ref.startswith("refs/heads/")]
        return get_unique_name(branches, prefix)
예제 #2
0
    def unique_branch_name(self, prefix):
        """Get an unused branch name in the local tree

        :param prefix: Prefix to use at the start of the branch name"""
        branches = [ref[len("refs/heads/"):] for sha1, ref in self.list_refs()
                    if ref.startswith("refs/heads/")]
        return get_unique_name(branches, prefix)
예제 #3
0
 def create(self, state):
     remote_branch = "sync_%s" % state.commit.sha1
     branches = [
         ref[len("refs/heads/"):]
         for sha1, ref in state.sync_tree.list_remote(state.gh_repo.url)
         if ref.startswith("refs/heads")
     ]
     state.remote_branch = get_unique_name(branches, remote_branch)
예제 #4
0
파일: upstream.py 프로젝트: DINKIN/Waterfox
 def create(self, state):
     remote_branch = "sync_%s" % state.commit.sha1
     branches = [
         ref[len("refs/heads/"):]
         for sha1, ref in state.sync_tree.list_remote(state.gh_repo.url)
         if ref.startswith("refs/heads")
     ]
     state.remote_branch = get_unique_name(branches, remote_branch)