RFR: Make ext.py compatible with hg5 api

Jorn Vernee via github.com duke at openjdk.java.net
Thu Aug 22 12:30:57 UTC 2019


On Thu, 22 Aug 2019 12:25:19 GMT, Erik Duveblad via github.com <duke at openjdk.java.net> wrote:

> On Thu, 22 Aug 2019 12:04:42 GMT, Jorn Vernee via github.com <duke at openjdk.java.net> wrote:
> 
>> The HG api changes in version 5 to drop the first 2 parameters to `mercurial.match.exact`, which breaks the extension script.
>> 
>> This PR detects whether we're running on hg 5, and if so, calls the function without the first 2 arguments instead.
>> 
>> ----------------
>> 
>> Commits:
>>  - 741ee3e3:	Make ext.py compatible with hg5 api
>> 
>> Pull request:
>> https://git.openjdk.java.net/skara/pull/67
>> 
>> Webrev:
>> https://webrevs.openjdk.java.net/skara/67/webrev.00
>> 
>> Patch:
>> https://git.openjdk.java.net/skara/pull/67.diff
>> 
>> Fetch command:
>> git fetch https://git.openjdk.java.net/skara pull/67/head:pull/67
> 
> vcs/src/main/resources/ext.py line 31:
> 
>> 30: testedwith = '4.9.2 5.0.2'
>> 31: 
>> 32: def mode(fctx):
> 
> Does a space separated string named `testedWith` mean something special in Mercurial? Otherwise I would probably just have this a comment instead of a variable (or if you _really_ want a variable, why not use a `set`?)
> 
> PR: https://git.openjdk.java.net/skara/pull/67

It's used to mark supported versions per: https://www.mercurial-scm.org/wiki/WritingExtensions#Marking_compatible_versions

PR: https://git.openjdk.java.net/skara/pull/67


More information about the skara-dev mailing list