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

Re: [PATCH v2] remote-hg: getbundle changed in mercurial 3.0

From
Junio C Hamano <gitster@pobox.com>
Date
May 13, 2014, 21:00 UTC
Message-ID
<xmqqmwelmm1p.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1400012506-20705-1-git-send-email-1007380@gmail.com>
William Giokas <1007380@gmail.com> writes:
Show 17 quoted lines
> +try:
> +    from mercurial.changegroup import getbundle
> +
> +except ImportError:
> +    def getbundle(repo, **kwargs):
> +        return repo.getbundle(**kwargs)
> +
>  import re
>  import sys
>  import os
> @@ -985,7 +992,8 @@ 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)
> +    cg = getbundle(repo=repo, source='push', heads=list(p_revs),
> +                   common=common)

Yikes, this is starting to look bad, but the thing being in Python, perhaps that is the best we could do if we want a solution that is viable in the longer term.

As a short-term band-aid to be merged/cherry-picked to maintenance tracks post 2.0 final, I actually would prefer 58aee086 (remote-hg: add support for hg v3.0, 2014-05-03) for its simplicity.

I dunno.  Thankfully I do not have to decide right now ;-)
Previous: William GiokasNext: Junio C Hamano
Message 3 of 5 in “remote-hg: getbundle changed in mercurial 3.0”
  1. remote-hg: getbundle changed in mercurial 3.0William Giokas, May 13, 2014
  2. remote-hg: getbundle changed in mercurial 3.0William Giokas, May 13, 2014
  3. Junio C HamanoMay 13, 2014
  4. Junio C HamanoMay 13, 2014
  5. Felipe ContrerasMay 13, 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.