mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-05-06 16:37:21 +02:00
Remove push_unsafe()
It's not needed anymore. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -1016,7 +1016,13 @@ def checkheads(repo, remote, p_revs):
|
||||
|
||||
return ret
|
||||
|
||||
def push_unsafe(repo, remote, parsed_refs, p_revs):
|
||||
def push(repo, remote, parsed_refs, p_revs):
|
||||
if hasattr(remote, 'canpush') and not remote.canpush():
|
||||
print("error cannot push")
|
||||
|
||||
if not p_revs:
|
||||
# nothing to push
|
||||
return
|
||||
|
||||
force = force_push
|
||||
|
||||
@@ -1050,16 +1056,6 @@ def push_unsafe(repo, remote, parsed_refs, p_revs):
|
||||
|
||||
return ret
|
||||
|
||||
def push(repo, remote, parsed_refs, p_revs):
|
||||
if hasattr(remote, 'canpush') and not remote.canpush():
|
||||
print("error cannot push")
|
||||
|
||||
if not p_revs:
|
||||
# nothing to push
|
||||
return
|
||||
|
||||
return push_unsafe(repo, remote, parsed_refs, p_revs)
|
||||
|
||||
def check_tip(ref, kind, name, heads):
|
||||
try:
|
||||
ename = '%s/%s' % (kind, name)
|
||||
|
||||
Reference in New Issue
Block a user