annotate tests/test-narrow-sparse.t @ 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
41147
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
1 Testing interaction of sparse and narrow when both are enabled on the client
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
2 side and we do a non-ellipsis clone
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
3
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
4 #testcases tree flat
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
5 $ . "$TESTDIR/narrow-library.sh"
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
6 $ cat << EOF >> $HGRCPATH
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
7 > [extensions]
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
8 > sparse =
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
9 > EOF
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
10
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
11 #if tree
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
12 $ cat << EOF >> $HGRCPATH
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
13 > [experimental]
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
14 > treemanifest = 1
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
15 > EOF
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
16 #endif
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
17
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
18 $ hg init master
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
19 $ cd master
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
20
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
21 $ mkdir inside
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
22 $ echo 'inside' > inside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
23 $ hg add inside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
24 $ hg commit -m 'add inside'
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
25
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
26 $ mkdir widest
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
27 $ echo 'widest' > widest/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
28 $ hg add widest/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
29 $ hg commit -m 'add widest'
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
30
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
31 $ mkdir outside
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
32 $ echo 'outside' > outside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
33 $ hg add outside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
34 $ hg commit -m 'add outside'
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
35
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
36 $ cd ..
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
37
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
38 narrow clone the inside file
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
39
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
40 $ hg clone --narrow ssh://user@dummy/master narrow --include inside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
41 requesting all changes
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
42 adding changesets
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
43 adding manifests
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
44 adding file changes
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
45 added 3 changesets with 1 changes to 1 files
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
46 new changesets *:* (glob)
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
47 updating to branch default
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
49 $ cd narrow
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
50 $ hg tracked
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
51 I path:inside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
52 $ hg files
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
53 inside/f
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
54
41148
8eaf693b1409 sparse: don't enable on clone if it was a narrow clone
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41147
diff changeset
55 XXX: we should have a flag in `hg debugsparse` to list the sparse profile
8eaf693b1409 sparse: don't enable on clone if it was a narrow clone
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41147
diff changeset
56 $ test -f .hg/sparse
8eaf693b1409 sparse: don't enable on clone if it was a narrow clone
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41147
diff changeset
57 [1]
41147
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
58
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
59 $ cat .hg/requires
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
60 dotencode
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
61 fncache
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
62 generaldelta
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
63 narrowhg-experimental
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
64 revlogv1
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
65 sparserevlog
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
66 store
eb172f9c208c tests: add tests for narrow clone when both sparse and narrow are enabled
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
diff changeset
67 treemanifest (tree !)
41149
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
68
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
69 $ hg debugrebuilddirstate
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
70 ** unknown exception encountered, please report by visiting
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
71 ** https://mercurial-scm.org/wiki/BugTracker
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
72 ** Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
73 ** Mercurial Distributed SCM (version 4.8.1+588-479a5ea51ccc+20181224)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
74 ** Extensions loaded: narrow, sparse
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
75 Traceback (most recent call last):
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
76 File "/place/vartmp/hgtests.zMelCK/install/bin/hg", line 43, in <module>
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
77 dispatch.run()
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
78 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 99, in run
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
79 status = dispatch(req)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
80 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 225, in dispatch
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
81 ret = _runcatch(req) or 0
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
82 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 376, in _runcatch
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
83 return _callcatch(ui, _runcatchfunc)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
84 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 384, in _callcatch
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
85 return scmutil.callcatch(ui, func)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
86 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/scmutil.py", line 166, in callcatch
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
87 return func()
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
88 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 367, in _runcatchfunc
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
89 return _dispatch(req)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
90 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 1021, in _dispatch
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
91 cmdpats, cmdoptions)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
92 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 756, in runcommand
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
93 ret = _runcommand(ui, options, cmd, d)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
94 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 1030, in _runcommand
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
95 return cmdfunc()
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
96 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/dispatch.py", line 1018, in <lambda>
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
97 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
98 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/util.py", line 1670, in check
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
99 return func(*args, **kwargs)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
100 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/debugcommands.py", line 1998, in debugrebuilddirstate
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
101 dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
102 File "/place/vartmp/hgtests.zMelCK/install/lib/python/hgext/narrow/narrowdirstate.py", line 60, in rebuild
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
103 super(narrowdirstate, self).rebuild(parent, allfiles, changedfiles)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
104 File "/place/vartmp/hgtests.zMelCK/install/lib/python/mercurial/extensions.py", line 437, in closure
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
105 return func(*(args + a), **kw)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
106 File "/place/vartmp/hgtests.zMelCK/install/lib/python/hgext/sparse.py", line 213, in _rebuild
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
107 allfiles = allfiles.matches(matcher)
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
108 AttributeError: 'list' object has no attribute 'matches'
76dcf7958c5f tests: show that debugrebuilddirstate is broken with narrow+sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 41148
diff changeset
109 [1]