durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to