mercurial/revlog.py
changeset 34028 bfb38c5cebf4
parent 34026 b2eb0aa445cb
child 34147 b96cfc309ac5
--- a/mercurial/revlog.py	Tue Aug 22 21:21:43 2017 -0400
+++ b/mercurial/revlog.py	Wed Aug 30 09:21:31 2017 -0700
@@ -1697,6 +1697,10 @@
         if node == nullid:
             raise RevlogError(_("%s: attempt to add null revision") %
                               (self.indexfile))
+        if node == wdirid:
+            raise RevlogError(_("%s: attempt to add wdir revision") %
+                              (self.indexfile))
+
         btext = [rawtext]
         def buildtext():
             if btext[0] is not None: