Example #1
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)
Example #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)
Example #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)
Example #4
0
 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)
Example #5
0
def gpush(ui, repo, remote_name='origin', branch=None):
    git = GitHandler(repo, ui)
    git.push(remote_name)