This is what Mercurial does.
Reported-by: Nathan Palmer
Signed-off-by: Felipe Contreras <[email protected]>
---
git-remote-hg.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/git-remote-hg.py b/git-remote-hg.py
index c849abb..204ceeb 100755
--- a/git-remote-hg.py
+++ b/git-remote-hg.py
@@ -995,9 +995,17 @@ def push_unsafe(repo, remote, parsed_refs, p_revs):
if unbundle:
if force:
remoteheads = ['force']
- return remote.unbundle(cg, remoteheads, 'push')
+ ret = remote.unbundle(cg, remoteheads, 'push')
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):
if hasattr(remote, 'canpush') and not remote.canpush():
--
1.9.2+fc1.3.gade8541
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html