Remove push_unsafe()

It's not needed anymore.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
Felipe Contreras
2023-05-05 10:43:04 -06:00
parent 9c61c09ebf
commit 7713b7ecef

View File

@@ -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)