[PATCH] - perform hg id instead of hg tip

Darshaka Pathirana dpat at syn-net.org
Wed Apr 16 03:47:57 CEST 2008


On 16.04.2008 02:27, Vadim Lebedev wrote:
> Le 16 avr. 08 à 02:21, Darshaka Pathirana a écrit :
> 
>> On 15.04.2008 15:43, Vadim Lebedev wrote:
>>> Le 15 avr. 08 à 15:24, Darshaka Pathirana a écrit :
>>>
>>>> On 15.04.2008 15:07, Vadim Lebedev wrote:
>>>>> Le 15 avr. 08 à 13:10, Darshaka Pathirana a écrit :
>>>>>
>>>>>> On 15.04.2008 13:04, Darshaka Pathirana wrote:
>>>>>>> diff -r d242af548735 -r a08d09f7caa9
>>>>>>> owbuild/owbuild/OWGetMercurialRevision.cmake
>>>>>>> --- a/owbuild/owbuild/OWGetMercurialRevision.cmake    Tue Apr 08
>>>>>>> 14:12:05 2008 +0200
>>>>>>> +++ b/owbuild/owbuild/OWGetMercurialRevision.cmake    Fri Apr 11
>>>>>>> 21:50:35 2008 +0200
>>>>>> After trying to build some older revisions I noticed that the
>>>>>> version-string always shows the "hg tip"-revision.
>>>>>>
>>>>>> I updated the code (with some modifications from Ralf  
>>>>>> Schlatterbeck,
>>>>>> thx!) so the current revision is shown (svn-status behavior).
>>>>>>
>>>>>> Any objections?
>>>>>>
>>>>> Darshaka,
>>>>>
>>>>> First your patch does not not apply on my Mac and probably will not
>>>>> apply  on Linux too ---  i suspect EOL issue.
>>>>> Second,
>>>>>
>>>>> it can be MUCH simplier by replacing origonal 'hg tip -- 
>>>>> template ....'
>>>>> by:  'hg id -i'
>>>>> so the regex-replace is not needed
>>>> Funny! That has been my first patch! But some older versions of hg  
>>>> do
>>>> not support the "-i" option so I tried to apply a generic
>>>> regex-replace.
>>>>
>>>> This patch has been tested under Linux and Windows.
>>>> I am not sure what cause the problem with the Mac. EOL should be
>>>> stripped. Maybe you can give some more feedback to improve the  
>>>> patch.
>>> What happens is:  when i do hg import of the patch mercurial  
>>> rejects 2
>>> hunks of 2
>> Hmm. How did you apply the patch?
>>
>> I just cloned the qutecom-repository on a Debian/Etch machine,
>> copy&pasted my submitted patch into "gethg.patch" and did and got the
>> following:
>>
>> % patch -p 1 < ../gethg.patch
>> (Stripping trailing CRs from patch.)
>> patching file owbuild/owbuild/OWGetMercurialRevision.cmake
> 
> I save the email into a file,
> cd QuteCom-2.2
> hg import ../file.eml

So it worked! Fine!

Just curious: Any idea what the problem has been before?

FTR, my output of "hg import":

% hg import ../gethg.patch.eml
applying ../gethg.patch.eml
(Stripping trailing CRs from patch.)
patching file owbuild/owbuild/OWGetMercurialRevision.cmake

Greetings,
 - Darsha



More information about the QuteCom-dev mailing list