mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2026-07-20 09:31:44 +02:00
Add support for hg v3.0
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
# "$GIT_DIR/hg/origin/clone/.hg/".
|
||||
|
||||
from mercurial import hg, ui, bookmarks, context, encoding, node, error, extensions, discovery, util
|
||||
from mercurial import changegroup
|
||||
|
||||
import re
|
||||
import sys
|
||||
@@ -1024,7 +1025,10 @@ def push_unsafe(repo, remote, parsed_refs, p_revs):
|
||||
if not checkheads(repo, remote, p_revs):
|
||||
return None
|
||||
|
||||
cg = repo.getbundle('push', heads=list(p_revs), common=common)
|
||||
if check_version(3, 0):
|
||||
cg = changegroup.getbundle(repo, 'push', heads=list(p_revs), common=common)
|
||||
else:
|
||||
cg = repo.getbundle('push', heads=list(p_revs), common=common)
|
||||
|
||||
unbundle = remote.capable('unbundle')
|
||||
if unbundle:
|
||||
|
||||
Reference in New Issue
Block a user