From: Giuseppe Bilotta Date: Mon, 29 Aug 2011 17:51:35 GMT Subject: Re: [PATCH 1/2] am: preliminary support for hg patches Message-ID: In-Reply-To: <7v62lg6tr3.fsf@alter.siamese.dyndns.org> On Mon, Aug 29, 2011 at 6:57 PM, Junio C Hamano wrote: > Giuseppe Bilotta writes: > >> Signed-off-by: Giuseppe Bilotta > > I'll leave nitpicking of this patch and helping to improve it to people > who actually have to deal with Hg generated patches for now. [snip] >> +                     # hg stores changeset metadata in #-commented lines preceding >> +                     # the commit message and diff(s). The only metadata we care about >> +                     # are the User and Date (Node ID and Parent are hashes which are >> +                     # only relevant to the hg repository and thus not useful to us) >> +                     # Since we cannot guarantee that the commit message is in git-friendly >> +                     # format, we put no Subject: line and just consume all of the message >> +                     # as the body > > Personally I am a bit worried about the phoney "diff --git" output Hg > seems to (be able to) produce. Do they have "index ..." line that express > the blob object names in git terms (implausible), for example? We _might_ > want to strip s/diff --git /diff / so that apply won't be confused if that > turns out to be a problem. Nope, it doesn't have index .... lines. Still, the patches seems to apply correctly. Well, the couple of patches I tested did, at least, even though they were marked as diff --git and they were lacking the index ... lines. -- Giuseppe "Oblomov" Bilotta