[PATCH] filectx: replace use of _filerev with _filenode

Durham Goode durham at fb.com
Mon Feb 8 18:01:53 EST 2016

On 2/8/16, 2:58 PM, "Martin von Zweigbergk" <martinvonz at google.com> wrote:

>On Mon, Feb 8, 2016 at 2:55 PM, Siddharth Agarwal <sid at less-broken.com> wrote:
>> On 2/8/16 14:48, Durham Goode wrote:
>>> # HG changeset patch
>>> # User Durham Goode <durham at fb.com>
>>> # Date 1454969831 28800
>>> #      Mon Feb 08 14:17:11 2016 -0800
>>> # Node ID b8f90918f80e13e468d0fa22ca2f678896223cbd
>>> # Parent  01a5143cd25f285f8c745a92986cd7186bb32c90
>>> filectx: replace use of _filerev with _filenode
>>> _filerev depends on the filelog implementation using revlogs and linkrevs.
>>> Alternative implementations, like remotefilelog, do not have rev numbers,
>>> so
>>> this call fails. Replacing it with _filenode means it doesn't rely on rev
>>> numbers, and doesn't cost anything extra, since _filerev is using
>>> _filenode
>>> under the hood anyway.
>> Someone else can easily reintroduce a dependency on _filerev without
>> realizing -- as a followup, can we deprecate it somehow?
>Can we simply delete it?

Probably.  From a quick grepping, it only looks used in hgweb.  But it seems kind of anti-mercurialy to hide one of the core pieces of revlogs (the revision number).  I'd rather come back to this area in the future when we start to get rid of rev numbers as a whole and do a real fix then.

More information about the Mercurial-devel mailing list