changeset 41149:76dcf7958c5f

tests: show that debugrebuilddirstate is broken with narrow+sparse This adds a test to show that debugrebuildirstate is broken when both narrow and sparse extensions are enabled. Differential Revision: https://phab.mercurial-scm.org/D5480
author Pulkit Goyal <pulkit@yandex-team.ru>
date Mon, 24 Dec 2018 15:57:54 +0300
parents 8eaf693b1409
children b05eb98a6b67
files tests/test-narrow-sparse.t
diffstat 1 files changed, 42 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-narrow-sparse.t	Mon Dec 24 15:30:39 2018 +0300
+++ b/tests/test-narrow-sparse.t	Mon Dec 24 15:57:54 2018 +0300
@@ -65,3 +65,45 @@
   sparserevlog
   store
   treemanifest (tree !)
+
+  $ hg debugrebuilddirstate
+  ** unknown exception encountered, please report by visiting
+  ** https://mercurial-scm.org/wiki/BugTracker
+  ** Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
+  ** Mercurial Distributed SCM (version 4.8.1+588-479a5ea51ccc+20181224)
+  ** Extensions loaded: narrow, sparse
+  Traceback (most recent call last):
+    File "/place/vartmp/hgtests.zMelCK/install/bin/hg", line 43, in <module>
+      dispatch.run()
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 99, in run
+      status = dispatch(req)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 225, in dispatch
+      ret = _runcatch(req) or 0
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 376, in _runcatch
+      return _callcatch(ui, _runcatchfunc)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 384, in _callcatch
+      return scmutil.callcatch(ui, func)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/scmutil.py", line 166, in callcatch
+      return func()
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 367, in _runcatchfunc
+      return _dispatch(req)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 1021, in _dispatch
+      cmdpats, cmdoptions)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 756, in runcommand
+      ret = _runcommand(ui, options, cmd, d)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 1030, in _runcommand
+      return cmdfunc()
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 1018, in <lambda>
+      d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/util.py", line 1670, in check
+      return func(*args, **kwargs)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/debugcommands.py", line 1998, in debugrebuilddirstate
+      dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/hgext/narrow/narrowdirstate.py", line 60, in rebuild
+      super(narrowdirstate, self).rebuild(parent, allfiles, changedfiles)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/extensions.py", line 437, in closure
+      return func(*(args + a), **kw)
+    File "/place/vartmp/hgtests.zMelCK/install/lib/python/hgext/sparse.py", line 213, in _rebuild
+      allfiles = allfiles.matches(matcher)
+  AttributeError: 'list' object has no attribute 'matches'
+  [1]