コード例 #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)