示例#1
0
文件: hgrepo.py 项目: dgladkov/hg-git
 def push(self, remote, force=False, revs=None, newbranch=None):
     if isinstance(remote, gitrepo):
         git = GitHandler(self, self.ui)
         git.push(remote.path, revs, force)
     else: #pragma: no cover
         # newbranch was added in 1.6
         if newbranch is None:
             return super(hgrepo, self).push(remote, force, revs)
         else:
             return super(hgrepo, self).push(remote, force, revs,
                                             newbranch)
示例#2
0
 def push(self, remote, force=False, revs=None, newbranch=None):
     if isinstance(remote, gitrepo):
         git = GitHandler(self, self.ui)
         git.push(remote.path, revs, force)
     else:  #pragma: no cover
         # newbranch was added in 1.6
         if newbranch is None:
             return super(hgrepo, self).push(remote, force, revs)
         else:
             return super(hgrepo, self).push(remote, force, revs,
                                             newbranch)
示例#3
0
 def push(self, remote, force=False, revs=None, newbranch=None):
     if isinstance(remote, gitrepo):
         git = GitHandler(self, self.ui)
         # This is needed for bookmark deletion to work.
         remote.git_handler = git
         return git.push(remote.path, revs, force)
     else: #pragma: no cover
         # newbranch was added in 1.6
         if newbranch is None:
             return super(hgrepo, self).push(remote, force, revs)
         else:
             return super(hgrepo, self).push(remote, force, revs,
                                             newbranch)
示例#4
0
文件: hgrepo.py 项目: abtris/dotfiles
 def push(self, remote, force=False, revs=None):
     if isinstance(remote, gitrepo):
         git = GitHandler(self, self.ui)
         git.push(remote.path, revs, force)
     else: #pragma: no cover
         return super(hgrepo, self).push(remote, force, revs)
示例#5
0
def gpush(ui, repo, remote_name='origin', branch=None):
    git = GitHandler(repo, ui)
    git.push(remote_name)