git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Christophe Simonis <christophe@kn.gl>,
	Simon Ruderich <simon@ruderich.org>, Max Horn <max@quendi.de>
Subject: Re: [PATCH 5/9] remote-hg: use hashlib instead of hg sha1 util
Date: Thu, 25 Apr 2013 14:30:48 -0500	[thread overview]
Message-ID: <CAMP44s2et3sCgtdEbQzo3VTmAE=9-RCXQn2eQKtU6b2HPk0Vhw@mail.gmail.com> (raw)
In-Reply-To: <CALkWK0=Q2KZPioYD21pYLzruBnFh_cpFLh_rDj7QDa3bOaCO6g@mail.gmail.com>

On Thu, Apr 25, 2013 at 1:25 PM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> Felipe Contreras wrote:
>> To be in sync with remote-bzr.
>
> Huh?  Why do you have to be in sync with remote-bzr?  Are you sharing
> code between remote-hg and remote-bzr?

We don't have to.

>> @@ -830,7 +831,7 @@ def main(args):
>>
>>      if alias[4:] == url:
>>          is_tmp = True
>> -        alias = util.sha1(alias).hexdigest()
>> +        alias = hashlib.sha1(alias).hexdigest()
>
> Did you eve bother justifying this change with a line in the commit
> message?  How is the new form different from the old form?

Why would it be any difference? It's a hex version of the SHA-1
digest. It would be the same in every language and every tool.

And a bit of context: historically the reason I started remote-bzr was
to show that we didn't need the *huge* infrastructure that is sitting
git_remote_helpers, which is nothing compared to what was prepared to
be merged for msysgit's remote-hg. I wrote it as a proof-of-concept to
show we didn't need a framework, and if we do, it would only be clear
after having _two_ remote helpers, which we now do. It might make
sense to refactor the common parts into a framework later on, so
having them in sync as much as it's reasonably possible makes sense.

But if even if it wasn't, there's nothing wrong with this patch. Also,
who knows, maybe old versions of mercurial don't have util.sha1(), or
maybe newer ones will move it, who knows.

Cheers.

-- 
Felipe Contreras

  reply	other threads:[~2013-04-25 19:30 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-25 11:20 [PATCH 0/9] remote-helpers: fixes and cleanups Felipe Contreras
2013-04-25 11:20 ` [PATCH 1/9] remote-bzr: trivial cleanups Felipe Contreras
2013-04-25 18:19   ` Ramkumar Ramachandra
2013-04-25 19:20     ` Felipe Contreras
2013-04-25 20:30       ` Thomas Rast
2013-04-25 20:52         ` Felipe Contreras
2013-04-25 21:37           ` Junio C Hamano
2013-04-25 21:49             ` Felipe Contreras
2013-04-25 20:36       ` Junio C Hamano
2013-04-25 21:35         ` Felipe Contreras
2013-04-25 22:01           ` Junio C Hamano
2013-04-25 22:58             ` Felipe Contreras
2013-04-25 23:11               ` Junio C Hamano
2013-04-26  1:19                 ` Felipe Contreras
2013-04-26 12:19               ` Ramkumar Ramachandra
2013-04-26 18:48                 ` Felipe Contreras
2013-04-26 18:53                   ` Ramkumar Ramachandra
2013-04-26 19:39                     ` Felipe Contreras
2013-04-26 19:56                       ` Ramkumar Ramachandra
2013-04-26 20:23                         ` Felipe Contreras
2013-04-26 22:10                           ` Junio C Hamano
2013-04-26 22:22                             ` Felipe Contreras
2013-04-26 19:39                   ` Ramkumar Ramachandra
2013-04-26  9:32           ` Ramkumar Ramachandra
2013-04-26 18:34             ` Felipe Contreras
2013-04-26 19:30               ` Ramkumar Ramachandra
2013-04-26 19:59                 ` Ramkumar Ramachandra
2013-04-26 20:00                 ` Felipe Contreras
2013-04-26 20:03                   ` Ramkumar Ramachandra
2013-04-26 20:28                     ` Felipe Contreras
2013-04-26 20:28                   ` Ramkumar Ramachandra
2013-04-26 20:46                     ` Felipe Contreras
2013-04-26 19:19             ` Felipe Contreras
2013-04-26 20:17               ` Ramkumar Ramachandra
2013-04-26 21:00                 ` Felipe Contreras
2013-04-25 19:29     ` Stefano Lattarini
2013-04-25 19:33       ` Felipe Contreras
2013-04-25 11:20 ` [PATCH 2/9] remote-hg: remove extra check Felipe Contreras
2013-04-25 18:23   ` Ramkumar Ramachandra
2013-04-25 19:22     ` Felipe Contreras
2013-04-25 11:20 ` [PATCH 3/9] remote-bzr: fix bad state issue Felipe Contreras
2013-04-25 11:20 ` [PATCH 4/9] remote-bzr: add support to push URLs Felipe Contreras
2013-04-25 11:20 ` [PATCH 5/9] remote-hg: use hashlib instead of hg sha1 util Felipe Contreras
2013-04-25 18:25   ` Ramkumar Ramachandra
2013-04-25 19:30     ` Felipe Contreras [this message]
2013-04-25 11:20 ` [PATCH 6/9] remote-bzr: store converted URL Felipe Contreras
2013-04-25 11:20 ` [PATCH 7/9] remote-hg: use python urlparse Felipe Contreras
2013-04-25 11:20 ` [PATCH 8/9] remote-bzr: tell bazaar to be quiet Felipe Contreras
2013-04-25 11:20 ` [PATCH 9/9] remote-bzr: strip extra newline 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='CAMP44s2et3sCgtdEbQzo3VTmAE=9-RCXQn2eQKtU6b2HPk0Vhw@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=christophe@kn.gl \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=max@quendi.de \
    --cc=simon@ruderich.org \
    /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).