Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changelog.py @ 34045:bfb38c5cebf4
revlog: move check for wdir from changelog to revlog
Yuya said he preferred this (to keep them in one place, I think).
Differential Revision: https://phab.mercurial-scm.org/D569
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 30 Aug 2017 09:21:31 -0700 |
parents | 3939b30d0cb7 |
children | 0fa781320203 |
line wrap: on
line diff
--- a/mercurial/changelog.py Tue Aug 22 21:21:43 2017 -0400 +++ b/mercurial/changelog.py Wed Aug 30 09:21:31 2017 -0700 @@ -14,7 +14,6 @@ bin, hex, nullid, - wdirid, ) from . import ( @@ -536,9 +535,6 @@ # overlay over the standard revlog._addrevision to track the new # revision on the transaction. rev = len(self) - if node == wdirid: # nullid is checked in super method - raise error.RevlogError(_("%s: attempt to add wdir revision") % - (self.indexfile)) node = super(changelog, self)._addrevision(node, rawtext, transaction, *args, **kwargs) revs = transaction.changes.get('revs')