mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-03 10:05:48 +01:00
Update to 'public' phase when pushing
This is what Mercurial does. Reported-by: Nathan Palmer Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
This commit is contained in:
@@ -992,9 +992,17 @@ def push_unsafe(repo, remote, parsed_refs, p_revs):
|
|||||||
if unbundle:
|
if unbundle:
|
||||||
if force:
|
if force:
|
||||||
remoteheads = ['force']
|
remoteheads = ['force']
|
||||||
return remote.unbundle(cg, remoteheads, 'push')
|
ret = remote.unbundle(cg, remoteheads, 'push')
|
||||||
else:
|
else:
|
||||||
return remote.addchangegroup(cg, 'push', repo.url())
|
ret = remote.addchangegroup(cg, 'push', repo.url())
|
||||||
|
|
||||||
|
phases = remote.listkeys('phases')
|
||||||
|
if phases:
|
||||||
|
for head in p_revs:
|
||||||
|
# update to public
|
||||||
|
remote.pushkey('phases', hghex(head), '1', '0')
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
def push(repo, remote, parsed_refs, p_revs):
|
def push(repo, remote, parsed_refs, p_revs):
|
||||||
if hasattr(remote, 'canpush') and not remote.canpush():
|
if hasattr(remote, 'canpush') and not remote.canpush():
|
||||||
|
|||||||
Reference in New Issue
Block a user