equal
deleted
inserted
replaced
118 $ hg st -c |
118 $ hg st -c |
119 C hgext/zeroconf.py |
119 C hgext/zeroconf.py |
120 C hgext3rd/__init__.py |
120 C hgext3rd/__init__.py |
121 |
121 |
122 $ cd .. |
122 $ cd .. |
|
123 |
|
124 Check that the old dirstate data file is removed correctly and the new one is |
|
125 valid. |
|
126 |
|
127 $ dirstate_data_files () { |
|
128 > find .hg -maxdepth 1 -name "dirstate.*" |
|
129 > } |
|
130 |
|
131 $ find_dirstate_uuid () { |
|
132 > dirstate_data_files | sed 's#.hg/dirstate.##' |
|
133 > } |
|
134 |
|
135 $ dirstate_uuid_has_not_changed () { |
|
136 > # Pure Python always rewrites the whole dirstate |
|
137 > if [ $# -eq 1 ] || [ "$HGMODULEPOLICY" = *"rust"* ] || [ -n "$RHG_INSTALLED_AS_HG" ]; then |
|
138 > test $current_uid = $(find_dirstate_uuid) |
|
139 > fi |
|
140 > } |
|
141 |
|
142 $ cd .. |
|
143 $ hg init append-mostly |
|
144 $ cd append-mostly |
|
145 $ mkdir dir dir2 |
|
146 $ touch dir/a dir/b dir/c dir/d dir/e dir2/f |
|
147 $ hg commit -Aqm initial |
|
148 $ hg st |
|
149 $ dirstate_data_files | wc -l |
|
150 *1 (re) |
|
151 $ current_uid=$(find_dirstate_uuid) |
|
152 |
|
153 Nothing changes here |
|
154 |
|
155 $ hg st |
|
156 $ dirstate_data_files | wc -l |
|
157 *1 (re) |
|
158 $ dirstate_uuid_has_not_changed |
|
159 |
|
160 Trigger an append with a small change |
|
161 |
|
162 $ echo "modified" > dir2/f |
|
163 $ hg st |
|
164 M dir2/f |
|
165 $ dirstate_data_files | wc -l |
|
166 *1 (re) |
|
167 $ dirstate_uuid_has_not_changed |
|
168 |
|
169 Delete most of the dirstate to trigger a non-append |
|
170 $ hg rm dir/a dir/b dir/c dir/d |
|
171 $ dirstate_data_files | wc -l |
|
172 *1 (re) |
|
173 $ dirstate_uuid_has_not_changed also-if-python |
|
174 [1] |
|
175 |
|
176 $ cd .. |
123 #endif |
177 #endif |