Beispiel #1
0
 def cmd_set_tracking(self, track_branch):
     remote_pointer = StrFmt.fmt_branch_remote_pointer(track_branch.name)
     merge_pointer = StrFmt.fmt_branch_merge_pointer(track_branch.name)
     rem_name = Git.set_conf_key(self.repo.path, remote_pointer,
                                 track_branch.remote.name)
     longname = Git.set_conf_key(self.repo.path, merge_pointer,
                                 StrFmt.fmt_branch_longname(track_branch.name))
Beispiel #2
0
 def cmd_set_tracking(self, track_branch):
     remote_pointer = StrFmt.fmt_branch_remote_pointer(track_branch.name)
     merge_pointer = StrFmt.fmt_branch_merge_pointer(track_branch.name)
     rem_name = Git.set_conf_key(self.repo.path, remote_pointer,
                                 track_branch.remote.name)
     longname = Git.set_conf_key(
         self.repo.path, merge_pointer,
         StrFmt.fmt_branch_longname(track_branch.name))
Beispiel #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))
Beispiel #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))