git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: William Giokas <1007380@gmail.com>, Junio C Hamano <gitster@pobox.com>
Cc: "Torsten Bögershausen" <tboegi@web.de>,
	"Charles Brossollet" <chbrosso@lltech.fr>,
	git@vger.kernel.org,
	"Felipe Contreras" <felipe.contreras@gmail.com>
Subject: Re: Error using git-remote-hg
Date: Tue, 13 May 2014 14:09:55 -0500	[thread overview]
Message-ID: <53726e0355875_4aa4b312f892@nysa.notmuch> (raw)
In-Reply-To: <20140513184800.GF9051@wst420>

William Giokas wrote:
> On Tue, May 13, 2014 at 10:30:26AM -0700, Junio C Hamano wrote:

> >     Why do we "import changegroup" unconditionally, even though it
> >     is only used in the new codepath meant only for version 3.0 or
> >     higher, not inside the "if" block that decides if we need that
> >     module? 

> changegroup is prefectly /okay/ to import unconditionally, though as you
> say it will never be used.

As you say, it's perfectly OK.

> We can also be even more explicit with what we import by doing something
> like::
> 
>   try:
>       from mercurial.changegroup import getbundle
> 
>   except ImportError:
>       def getbundle(__empty__, **kwargs):
>           return repo.getbundle(**kwargs)

We could try that, but that would assume we want to maintain getbundle()
for the long run, and I personally don't want to do that. I would rather
contact the Mercurial developers about ways in which the push() method
can be improved so we don't need to have our own version. Hopefully
after it's improved we wouldn't have to call getbundle().

Moreover, eventually there will be a Mercurial 4.0, even 5.0, and at
some point we would want to remove the hacks for older versions. When we
do so we would want the import to remain unconditionally, and remove the
'check_version(3, 0)' which is already helping to explain what the code
is for without the need of comments.

> I was really sad to see that, and didn't have time to really look at it
> because of work and other projects, but I hope this presents a better
> solution than the current patch.

Either way Junio doesn't maintain this code, I do. And it's not
maintained in git.git, git's maintained out-of-tree (thanks to Junio's
decisions).

So please post your suggestions and patches to git-fc@googlegroups.com,
and use the latest code at https://github.com/felipec/git-remote-hg.

Cheers.

-- 
Felipe Contreras

  reply	other threads:[~2014-05-13 19:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 15:16 Error using git-remote-hg Charles Brossollet
2014-05-12 19:01 ` Torsten Bögershausen
2014-05-12 19:37   ` Felipe Contreras
2014-05-13  7:54     ` Charles Brossollet
2014-05-13 15:01       ` Torsten Bögershausen
2014-05-13 17:30         ` Junio C Hamano
2014-05-13 18:21           ` Felipe Contreras
2014-05-13 18:48           ` William Giokas
2014-05-13 19:09             ` Felipe Contreras [this message]
2014-05-13 19:39               ` William Giokas
2014-05-13 20:24                 ` Felipe Contreras
2014-05-13 21:01                   ` William Giokas
2014-05-13 22:16                     ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53726e0355875_4aa4b312f892@nysa.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=1007380@gmail.com \
    --cc=chbrosso@lltech.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=tboegi@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).