git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Lattarini <stefano.lattarini@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Felipe Contreras <felipe.contreras@gmail.com>,
	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 1/9] remote-bzr: trivial cleanups
Date: Thu, 25 Apr 2013 21:29:49 +0200	[thread overview]
Message-ID: <5179842D.6060500@gmail.com> (raw)
In-Reply-To: <CALkWK0meg1FgU=-4MFoFGjpDq_oa9XR_+qeiseR0J85mS71dNg@mail.gmail.com>

On 04/25/2013 08:19 PM, Ramkumar Ramachandra wrote:
> Felipe Contreras wrote:
>> diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
>> index aa7bc97..82bf7c7 100755
>> --- a/contrib/remote-helpers/git-remote-bzr
>> +++ b/contrib/remote-helpers/git-remote-bzr
>> @@ -94,7 +94,7 @@ class Marks:
>>          return self.last_mark
>>
>>      def is_marked(self, rev):
>> -        return self.marks.has_key(rev)
>> +        return rev in self.marks
> 
> Why?  Is the new form faster than the older one?
>
I think the has_key() method is "deprecated" in modern python,
and the 'key in dict' usage is more idiomatic.

>> @@ -224,7 +224,7 @@ def export_files(tree, files):
>>              else:
>>                  mode = '100644'
>>
>> -            # is the blog already exported?
>> +            # is the blob already exported?
> 
> What is this?  Whitespace?
>
Typofix: s/blog/blob/

>> @@ -521,7 +521,7 @@ def c_style_unescape(string):
>>      return string
>>
>>  def parse_commit(parser):
>> -    global marks, blob_marks, bmarks, parsed_refs
>> +    global marks, blob_marks, parsed_refs
> 
> How is this trivial?  You just removed one argument.
>
Maybe bmarks was no longer used there as a global variable
(left-over from previous patches?), so there is no longer any
need to declare it global.

>> @@ -555,7 +555,7 @@ def parse_commit(parser):
>>              mark = int(mark_ref[1:])
>>              f = { 'mode' : m, 'data' : blob_marks[mark] }
>>          elif parser.check('D'):
>> -            t, path = line.split(' ')
>> +            t, path = line.split(' ', 1)
> 
> How on earth is this trivial?  It changes the entire meaning!
>
Indeed, that should best go in a separate path with a proper
explanation in the commit message.

>> @@ -643,6 +643,7 @@ def do_export(parser):
>>                  wt = repo.bzrdir.open_workingtree()
>>                  wt.update()
>>          print "ok %s" % ref
>> +
> 
> Whitespace?
>
Isn't that obvious?

> I'm outraged by this.  What kind of changes are you pushing to
> remote-hg?  A "trivial cleanups" bundling miscellaneous changes, with
> no commit message?  Why don't you just squash everything into one
> "miscellaneous changes" patch?
>
I have no opinion on this, so I won't comment.

Regard,
  Stefano

  parent reply	other threads:[~2013-04-25 19:29 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 [this message]
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
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=5179842D.6060500@gmail.com \
    --to=stefano.lattarini@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=christophe@kn.gl \
    --cc=felipe.contreras@gmail.com \
    --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).