[RFC] Store Message-Id for mimported patches

Yann E. MORIN yann.morin.1998 at free.fr
Wed Apr 25 15:43:58 CDT 2012


Hello All!

In the project I maintain, I am now used to sending a reply-mail to authors
when their patches have been pushed in the upstream repository.

So far, I've been doing this manually. Whenever I was running 'hg push',
I'd look at the changelog, digging up the corresponding message in the list
in my mailer, hitting "Reply", and always typing the same message, over and
over again, just changing the greetings and the hash of the applied cset.

This is a tedious task that is error prone: I sometime forget to send that
mail, or I mis-type the message, or forget the greetings, or reply to the
wrong message (eg. if there are multiple rounds in a submission).

My idea is to have this mail automatically sent (with a hook) whenever a
cset lands in the upstream repository. Currently, the cset has almost every
thing needed to send such a mail: author, subject, and hash. The original
message-id is not available, so it is not possible to send a proper "reply".

After a few discussions on IRC with 'bos', 'pmezard' and 'kiilerix', we came
up with three possibilities to store this info in the repository.

1) (ab)use 'extra' fields to store the message-id
  - my original idea
  - hidden from the default display of 'hg log'
  - requires heavy works in ptch handling: import, export, qimport, mimport
    and maybe others I've not yet identified
  - bos is not really happy with this solution (and he has good points there):
     "i think that's dodgy"
     "you then have a piece of cruft in the tree that is really only relevant
      once"
     "i wouldn't accept a patch that tried to do this"

2) use a .emailid file (file name to decide) in the repository
  - pmezard's suggestion:
     "the preferred method is to use .emailid files like .hgtags"
  - does not touch Mercurial's core code
  - only impacts mimport
  - hidden from the default 'hg log'
  - yet unknown how to format this file
  - probably relatively easy to code when format of .emailid is known

3) add the message-id as sob-like tags in the commit message
  - kiilerix' idea:
     "just put the extra information in the commit message"
  - eg.:  Msg-Id: <blabla-123456789 at foo.bar>
  - does not touch Mercurial's core code
  - only impacts mimport
  - visible with the default 'hg log'
  - probably relatively easy to code

It has been decided to first seek comments on the list before actually doing
anything:

a- is this a feature that would be accepted upstream?
   -> in Mercurial and mimport for the first solution
   -> in mimport for the other two

b- if so, which is the preferred solution?

Thank you for your attention! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the Mercurial-devel mailing list