D2186: narrowrevlog: replace AssertionError with ProgrammingError
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Mon Feb 12 23:18:24 UTC 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG142ce66a4118: narrowrevlog: replace AssertionError with ProgrammingError (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2186?vs=5516&id=5555
REVISION DETAIL
https://phab.mercurial-scm.org/D2186
AFFECTED FILES
hgext/narrow/narrowrevlog.py
CHANGE DETAILS
diff --git a/hgext/narrow/narrowrevlog.py b/hgext/narrow/narrowrevlog.py
--- a/hgext/narrow/narrowrevlog.py
+++ b/hgext/narrow/narrowrevlog.py
@@ -8,6 +8,7 @@
from __future__ import absolute_import
from mercurial import (
+ error,
manifest,
revlog,
util,
@@ -67,8 +68,8 @@
return excludeddir(self._dir, self._node)
def write(self, *args):
- raise AssertionError('Attempt to write manifest from excluded dir %s' %
- self._dir)
+ raise error.ProgrammingError(
+ 'attempt to write manifest from excluded dir %s' % self._dir)
class excludedmanifestrevlog(manifest.manifestrevlog):
"""Stand-in for excluded treemanifest revlogs.
@@ -84,20 +85,20 @@
self._dir = dir
def __len__(self):
- raise AssertionError('Attempt to get length of excluded dir %s' %
- self._dir)
+ raise error.ProgrammingError(
+ 'attempt to get length of excluded dir %s' % self._dir)
def rev(self, node):
- raise AssertionError('Attempt to get rev from excluded dir %s' %
- self._dir)
+ raise error.ProgrammingError(
+ 'attempt to get rev from excluded dir %s' % self._dir)
def linkrev(self, node):
- raise AssertionError('Attempt to get linkrev from excluded dir %s' %
- self._dir)
+ raise error.ProgrammingError(
+ 'attempt to get linkrev from excluded dir %s' % self._dir)
def node(self, rev):
- raise AssertionError('Attempt to get node from excluded dir %s' %
- self._dir)
+ raise error.ProgrammingError(
+ 'attempt to get node from excluded dir %s' % self._dir)
def add(self, *args, **kwargs):
# We should never write entries in dirlogs outside the narrow clone.
To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list