コード例 #1
0
ファイル: git.py プロジェクト: numerodix/re
 def cmd_merge(self, branch):
     longname = StrFmt.fmt_branch_remote_tracking(branch.remote.name, branch.name)
     if Git.commit_is_ahead_of(self.repo.path, self.name, longname):
         ioutils.suggest('Branch %s is ahead of %s, is pushable' %
                         (self.name, longname), minor=True)
         return True
     else:
         if self.cmd_checkout():
             remoted = StrFmt.fmt_branch_remote_tracking(branch.remote.name,
                                                         branch.name)
             merge_ok, output = Git.merge(self.repo.path, remoted)
             if merge_ok:
                 if output:
                     ioutils.inform('Merged %s on %s' % (longname, self.name),
                                    minor=True)
                     ioutils.output(output)
                 return True
             else:
                 Git.reset_hard(self.repo.path, self.name)
コード例 #2
0
 def cmd_merge(self, branch):
     longname = StrFmt.fmt_branch_remote_tracking(branch.remote.name,
                                                  branch.name)
     if Git.commit_is_ahead_of(self.repo.path, self.name, longname):
         ioutils.suggest('Branch %s is ahead of %s, is pushable' %
                         (self.name, longname),
                         minor=True)
         return True
     else:
         if self.cmd_checkout():
             remoted = StrFmt.fmt_branch_remote_tracking(
                 branch.remote.name, branch.name)
             merge_ok, output = Git.merge(self.repo.path, remoted)
             if merge_ok:
                 if output:
                     ioutils.inform('Merged %s on %s' %
                                    (longname, self.name),
                                    minor=True)
                     ioutils.output(output)
                 return True
             else:
                 Git.reset_hard(self.repo.path, self.name)
コード例 #3
0
ファイル: git.py プロジェクト: numerodix/re
 def do_check(output_always=False):
     is_compact, output = Git.check_compactness_local(self.path)
     if not is_compact or output_always:
         ioutils.output(output)
     return is_compact
コード例 #4
0
 def do_check(output_always=False):
     is_compact, output = Git.check_compactness_local(self.path)
     if not is_compact or output_always:
         ioutils.output(output)
     return is_compact