[PATCH 0 of 2] [mq:qrefresh] Better handle setting/updating the date in the patch

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Wed Aug 5 13:39:35 CDT 2009


Dirkjan,
All,

On Wednesday 05 August 2009 13:15:05 Dirkjan Ochtman wrote:
> On Tue, Aug 4, 2009 at 21:54, Yann E.
> MORIN<yann.morin.1998 at anciens.enib.fr> wrote:
> > This patch series makes qref treat --date/--current-date the same way
> > --user/--current-user is handled.
> It looks promising, but I spot at least one coding style issue.

Line too long, is it? How should it be written? These are my very first
lines of code in Python... Would something like the following be better?
--8<--
            except ValueError:
                tmp = ['# HG changeset patch', '# Date ' + date, '']
                self.comments = tmp + self.comments
--8<--

> Also 
> please try to make your commit messages closer to what we generally
> use in Mercurial,
[--SNIP--]

OK, will do.

> More importantly, send the messages with 
> patches inline, so that they might be more easily reviewed.

That's what I intended to do, using the patchbomb extension as:
  hg email --inline [....]

Is that wrong? What should I have done?

> > That is, a patch in an email-like format, when one of the From: or Date:
> > field is missing, and the other is present.
> > Is the above possible? If so, then I'll rework the patchset to take this
> > possibility into account.
> What does it currently do if any of those unhandled cases pop up? It
> should at least die gracefully and not corrupt the patch.

It currently does not happen, because qrefresh does not _add_ the Date
field, it can just _update_ an existing one.

With this patchset, this would result in a dual-format patch, where one
field is in the email-like format ( eg. 'From:' or 'Date:' ) and the
other is in HG extended format (eg. '# User' or '# Date' ). The patch
per-se is not corrupted, but I didn't test doing actual commits and
patchbomb-ing. Will try.

Thanks for the review. :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'




More information about the Mercurial-devel mailing list