Patchwork drawdag: provide filenode for its dummy filectx

login
register
mail settings
Submitter Jun Wu
Date May 17, 2017, 5:49 p.m.
Message ID <c695cb7da7792def875d.1495043353@x1c>
Download mbox | patch
Permalink /patch/20662/
State Accepted
Headers show

Comments

Jun Wu - May 17, 2017, 5:49 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1495043336 25200
#      Wed May 17 10:48:56 2017 -0700
# Node ID c695cb7da7792def875dfd45c37dc402dc5d73b6
# Parent  37bcb4665529f5cc59b8dffb1014ac0cab37492c
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r c695cb7da779
drawdag: provide filenode for its dummy filectx

basefctx has filenode, which will be used in a future fast path of skipping
flag processor during repo._filecommit.

This patch adds filenode to drawdag's faked filectx so we don't need to use
hasattr in localrepo.py.
Augie Fackler - May 17, 2017, 7:39 p.m.
On Wed, May 17, 2017 at 10:49:13AM -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1495043336 25200
> #      Wed May 17 10:48:56 2017 -0700
> # Node ID c695cb7da7792def875dfd45c37dc402dc5d73b6
> # Parent  37bcb4665529f5cc59b8dffb1014ac0cab37492c
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r c695cb7da779
> drawdag: provide filenode for its dummy filectx

queued, thanks

Patch

diff --git a/tests/drawdag.py b/tests/drawdag.py
--- a/tests/drawdag.py
+++ b/tests/drawdag.py
@@ -215,4 +215,7 @@  class simplefilectx(object):
         return self._data
 
+    def filenode(self):
+        return None
+
     def path(self):
         return self._path