hgext/remotefilelog/remotefilelog.py
changeset 42095 864f9f63d3ed
parent 41365 876494fd967d
child 42725 7492899c6fc6
--- a/hgext/remotefilelog/remotefilelog.py	Mon Apr 08 10:56:55 2019 -0400
+++ b/hgext/remotefilelog/remotefilelog.py	Mon Apr 08 10:52:04 2019 -0400
@@ -10,7 +10,12 @@
 import collections
 import os
 
-from mercurial.node import bin, nullid
+from mercurial.node import (
+    bin,
+    nullid,
+    wdirfilenodeids,
+    wdirid,
+)
 from mercurial.i18n import _
 from mercurial import (
     ancestor,
@@ -306,6 +311,8 @@
         if len(node) != 20:
             raise error.LookupError(node, self.filename,
                                     _('invalid revision input'))
+        if node == wdirid or node in wdirfilenodeids:
+            raise error.WdirUnsupported
 
         store = self.repo.contentstore
         rawtext = store.get(self.filename, node)