Пример #1
0
 def detect_branches(cls, repo):
     for longname in Git.get_branches_remote_tracking(repo.path):
         if 'HEAD' in longname:  # special case
             continue
         remote, name = StrFmt.split_branch_longname(longname, parts=2)
         remote = Remote.get_remote(repo, remote)
         branch = BranchRemoteTracking.get_branch(repo, remote, longname, name)
Пример #2
0
 def detect_branches(cls, repo):
     for longname in Git.get_branches_remote_tracking(repo.path):
         if 'HEAD' in longname:  # special case
             continue
         remote, name = StrFmt.split_branch_longname(longname, parts=2)
         remote = Remote.get_remote(repo, remote)
         branch = BranchRemoteTracking.get_branch(repo, remote, longname,
                                                  name)
Пример #3
0
    def detect_tracking(self):
        remote_pointer = StrFmt.fmt_branch_remote_pointer(self.name)
        merge_pointer = StrFmt.fmt_branch_merge_pointer(self.name)
        rem_name = Git.get_conf_key(self.repo.path, remote_pointer)
        longname = Git.get_conf_key(self.repo.path, merge_pointer)

        if rem_name and longname:
            _, _, br_name = StrFmt.split_branch_longname(longname, parts=3)

            remote = Remote.get_remote(self.repo, rem_name)
            branch = BranchRemoteTracking.get_branch(self.repo, remote, longname,
                                                     br_name)

            branch.tracked_by = self
            self.tracking = branch

            logger.info('Detected local tracking branch %s on %s/%s' %
                        (self.name, rem_name, br_name))
Пример #4
0
    def detect_tracking(self):
        remote_pointer = StrFmt.fmt_branch_remote_pointer(self.name)
        merge_pointer = StrFmt.fmt_branch_merge_pointer(self.name)
        rem_name = Git.get_conf_key(self.repo.path, remote_pointer)
        longname = Git.get_conf_key(self.repo.path, merge_pointer)

        if rem_name and longname:
            _, _, br_name = StrFmt.split_branch_longname(longname, parts=3)

            remote = Remote.get_remote(self.repo, rem_name)
            branch = BranchRemoteTracking.get_branch(self.repo, remote,
                                                     longname, br_name)

            branch.tracked_by = self
            self.tracking = branch

            logger.info('Detected local tracking branch %s on %s/%s' %
                        (self.name, rem_name, br_name))