git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/4] remote-hg: add support for hg v3.0

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 4, 2014, 02:16 UTC
Message-ID
<1399169814-20201-5-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1399169814-20201-1-git-send-email-felipe.contreras@gmail.com>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-hg | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg
index 34cda02..8b02803 100755
--- a/contrib/remote-helpers/git-remote-hg
+++ b/contrib/remote-helpers/git-remote-hg
@@ -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
@@ -985,7 +986,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:
-- 
1.9.2+fc1.20.g204a630
Previous: Felipe ContrerasNext: Junio C Hamano
Message 6 of 49 in “remote-hg: more improvements”
  1. 0/4 remote-hg: more improvementsFelipe Contreras, May 4, 2014
  2. 1/4 remote-hg: add more testsFelipe Contreras, May 4, 2014
  3. Eric SunshineMay 4, 2014
  4. 2/4 t: remote-hg: add file operation testsFelipe Contreras, May 4, 2014
  5. 3/4 t: remote-hg: trivial cleanups and fixesFelipe Contreras, May 4, 2014
  6. 4/4 remote-hg: add support for hg v3.0Felipe Contreras, May 4, 2014
  7. Junio C HamanoMay 7, 2014
  8. Felipe ContrerasMay 7, 2014
  9. Junio C HamanoMay 7, 2014
  10. Felipe ContrerasMay 7, 2014
  11. Junio C HamanoMay 7, 2014
  12. Felipe ContrerasMay 8, 2014
  13. James DenholmMay 8, 2014
  14. Felipe ContrerasMay 8, 2014
  15. Philippe VaucherMay 11, 2014
  16. Philippe VaucherMay 12, 2014
  17. Junio C HamanoMay 12, 2014
  18. Felipe ContrerasMay 12, 2014
  19. Junio C HamanoMay 12, 2014
  20. Felipe ContrerasMay 12, 2014
  21. Philippe VaucherMay 14, 2014
  22. David KastrupMay 14, 2014
  23. Philippe VaucherMay 14, 2014
  24. David KastrupMay 14, 2014
  25. Philippe VaucherMay 14, 2014
  26. David KastrupMay 14, 2014
  27. Philippe VaucherMay 14, 2014
  28. David KastrupMay 14, 2014
  29. Philippe VaucherMay 14, 2014
  30. Felipe ContrerasMay 14, 2014
  31. David KastrupMay 14, 2014
  32. Felipe ContrerasMay 14, 2014
  33. David KastrupMay 14, 2014
  34. Felipe ContrerasMay 14, 2014
  35. David KastrupMay 15, 2014
  36. Junio C HamanoMay 14, 2014
  37. David KastrupMay 14, 2014
  38. Junio C HamanoMay 14, 2014
  39. Junio C HamanoMay 8, 2014
  40. Felipe ContrerasMay 8, 2014
  41. Junio C HamanoMay 8, 2014
  42. Felipe ContrerasMay 8, 2014
  43. Junio C HamanoMay 8, 2014
  44. Felipe ContrerasMay 8, 2014
  45. Junio C HamanoMay 8, 2014
  46. Felipe ContrerasMay 8, 2014
  47. Felipe ContrerasMay 9, 2014
  48. Junio C HamanoMay 9, 2014
  49. Felipe ContrerasMay 9, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.