| 1 |
#testcases flat tree |
| 2 |
#testcases lfs-on lfs-off |
| 3 |
|
| 4 |
$ cat >> $HGRCPATH << EOF |
| 5 |
> [experimental] |
| 6 |
> evolution=createmarkers |
| 7 |
> EOF |
| 8 |
|
| 9 |
#if lfs-on |
| 10 |
$ cat >> $HGRCPATH <<EOF |
| 11 |
> [extensions] |
| 12 |
> lfs = |
| 13 |
> EOF |
| 14 |
#endif |
| 15 |
|
| 16 |
$ . "$TESTDIR/narrow-library.sh" |
| 17 |
|
| 18 |
#if tree |
| 19 |
$ cat << EOF >> $HGRCPATH |
| 20 |
> [experimental] |
| 21 |
> treemanifest = 1 |
| 22 |
> EOF |
| 23 |
#endif |
| 24 |
|
| 25 |
$ hg init master |
| 26 |
$ cd master |
| 27 |
$ cat >> .hg/hgrc <<EOF |
| 28 |
> [narrow] |
| 29 |
> serveellipses=True |
| 30 |
> EOF |
| 31 |
$ for x in `$TESTDIR/seq.py 0 10` |
| 32 |
> do |
| 33 |
> mkdir d$x |
| 34 |
> echo $x > d$x/f |
| 35 |
> hg add d$x/f |
| 36 |
> hg commit -m "add d$x/f" |
| 37 |
> done |
| 38 |
$ hg log -T "{rev}: {desc}\n" |
| 39 |
10: add d10/f |
| 40 |
9: add d9/f |
| 41 |
8: add d8/f |
| 42 |
7: add d7/f |
| 43 |
6: add d6/f |
| 44 |
5: add d5/f |
| 45 |
4: add d4/f |
| 46 |
3: add d3/f |
| 47 |
2: add d2/f |
| 48 |
1: add d1/f |
| 49 |
0: add d0/f |
| 50 |
$ hg admin::narrow-client --store-fingerprint |
| 51 |
abort: this command only makes sense in a narrow clone |
| 52 |
[255] |
| 53 |
$ cd .. |
| 54 |
|
| 55 |
Error if '.' or '..' are in the directory to track. |
| 56 |
$ hg clone --narrow ssh://user@dummy/master foo --include ./asdf |
| 57 |
abort: "." and ".." are not allowed in narrowspec paths |
| 58 |
[255] |
| 59 |
$ hg clone --narrow ssh://user@dummy/master foo --include asdf/.. |
| 60 |
abort: "." and ".." are not allowed in narrowspec paths |
| 61 |
[255] |
| 62 |
$ hg clone --narrow ssh://user@dummy/master foo --include a/./c |
| 63 |
abort: "." and ".." are not allowed in narrowspec paths |
| 64 |
[255] |
| 65 |
$ hg clone --narrow ssh://user@dummy/master foo --include ' ' |
| 66 |
abort: leading or trailing whitespace is not allowed in narrowspec paths |
| 67 |
[255] |
| 68 |
$ hg clone --narrow ssh://user@dummy/master foo --include 'a//c' |
| 69 |
abort: empty path components are not allowed in narrowspec paths |
| 70 |
[255] |
| 71 |
|
| 72 |
Names with '.' in them are OK. |
| 73 |
$ hg clone --narrow ./master should-work --include a/.b/c |
| 74 |
requesting all changes |
| 75 |
adding changesets |
| 76 |
adding manifests |
| 77 |
adding file changes |
| 78 |
added 1 changesets with 0 changes to 0 files |
| 79 |
new changesets * (glob) |
| 80 |
updating to branch default |
| 81 |
0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 82 |
|
| 83 |
The "narrow" repo requirement is ignored by [debugupgraderepo] |
| 84 |
|
| 85 |
$ (cd should-work; hg debugupgraderepo | grep 'no format upgrades found in existing repository') |
| 86 |
(no format upgrades found in existing repository) |
| 87 |
|
| 88 |
Test repo with local changes |
| 89 |
$ hg clone --narrow ssh://user@dummy/master narrow-local-changes --include d0 --include d3 --include d6 |
| 90 |
requesting all changes |
| 91 |
adding changesets |
| 92 |
adding manifests |
| 93 |
adding file changes |
| 94 |
added 6 changesets with 3 changes to 3 files |
| 95 |
new changesets *:* (glob) |
| 96 |
updating to branch default |
| 97 |
3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 98 |
$ cd narrow-local-changes |
| 99 |
$ hg admin::narrow-client --store-fingerprint |
| 100 |
9fdf07af370dd7b5cb4400fcbc9200824f1689632f657d2d87f4b604bf6844b6 |
| 101 |
$ echo local change >> d0/f |
| 102 |
$ hg ci -m 'local change to d0' |
| 103 |
$ hg co '.^' |
| 104 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 105 |
$ echo local change >> d3/f |
| 106 |
$ hg ci -m 'local hidden change to d3' |
| 107 |
created new head |
| 108 |
$ hg ci --amend -m 'local change to d3' |
| 109 |
$ hg tracked --removeinclude d0 |
| 110 |
comparing with ssh://user@dummy/master |
| 111 |
searching for changes |
| 112 |
looking for local changes to affected paths |
| 113 |
The following changeset(s) or their ancestors have local changes not on the remote: |
| 114 |
* (glob) |
| 115 |
abort: local changes found |
| 116 |
(use --force-delete-local-changes to ignore) |
| 117 |
[20] |
| 118 |
Check that nothing was removed by the failed attempts |
| 119 |
$ hg admin::narrow-client --store-fingerprint |
| 120 |
9fdf07af370dd7b5cb4400fcbc9200824f1689632f657d2d87f4b604bf6844b6 |
| 121 |
$ hg tracked |
| 122 |
I path:d0 |
| 123 |
I path:d3 |
| 124 |
I path:d6 |
| 125 |
$ hg files |
| 126 |
d0/f |
| 127 |
d3/f |
| 128 |
d6/f |
| 129 |
$ find * |
| 130 |
d0 |
| 131 |
d0/f |
| 132 |
d3 |
| 133 |
d3/f |
| 134 |
d6 |
| 135 |
d6/f |
| 136 |
$ hg verify -q |
| 137 |
Force deletion of local changes |
| 138 |
$ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
| 139 |
8: local change to d3 |
| 140 |
6: local change to d0 |
| 141 |
5: add d10/f outsidenarrow |
| 142 |
4: add d6/f |
| 143 |
3: add d5/f outsidenarrow |
| 144 |
2: add d3/f |
| 145 |
1: add d2/f outsidenarrow |
| 146 |
0: add d0/f |
| 147 |
$ hg tracked --removeinclude d0 --force-delete-local-changes |
| 148 |
comparing with ssh://user@dummy/master |
| 149 |
searching for changes |
| 150 |
looking for local changes to affected paths |
| 151 |
The following changeset(s) or their ancestors have local changes not on the remote: |
| 152 |
* (glob) |
| 153 |
moving unwanted changesets to backup |
| 154 |
saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
| 155 |
deleting data/d0/f.i |
| 156 |
deleting meta/d0/00manifest.i (tree !) |
| 157 |
deleting unwanted files from working copy |
| 158 |
|
| 159 |
Change that we've changed the tracked set |
| 160 |
$ hg admin::narrow-client --store-fingerprint |
| 161 |
739a856516974fdd350764e6d5430eeb39380c5fd6103a727d9d624bb5fa7ba6 |
| 162 |
$ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
| 163 |
7: local change to d3 |
| 164 |
5: add d10/f outsidenarrow |
| 165 |
4: add d6/f |
| 166 |
3: add d5/f outsidenarrow |
| 167 |
2: add d3/f |
| 168 |
1: add d2/f outsidenarrow |
| 169 |
0: add d0/f outsidenarrow |
| 170 |
Can restore stripped local changes after widening |
| 171 |
$ hg tracked --addinclude d0 -q |
| 172 |
$ hg unbundle .hg/strip-backup/*-narrow.hg -q |
| 173 |
$ hg --hidden co -r 'desc("local change to d0")' -q |
| 174 |
$ cat d0/f |
| 175 |
0 |
| 176 |
local change |
| 177 |
Pruned commits affecting removed paths should not prevent narrowing |
| 178 |
$ hg co '.^' |
| 179 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 180 |
$ hg debugobsolete `hg log -T '{node}' -r 'desc("local change to d0")'` |
| 181 |
1 new obsolescence markers |
| 182 |
obsoleted 1 changesets |
| 183 |
$ hg tracked --removeinclude d0 |
| 184 |
comparing with ssh://user@dummy/master |
| 185 |
searching for changes |
| 186 |
looking for local changes to affected paths |
| 187 |
moving unwanted changesets to backup |
| 188 |
saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
| 189 |
deleting data/d0/f.i |
| 190 |
deleting meta/d0/00manifest.i (tree !) |
| 191 |
deleting unwanted files from working copy |
| 192 |
|
| 193 |
Updates off of stripped commit if necessary |
| 194 |
$ hg co -r 'desc("local change to d3")' -q |
| 195 |
$ echo local change >> d6/f |
| 196 |
$ hg ci -m 'local change to d6' |
| 197 |
$ hg tracked --removeinclude d3 --force-delete-local-changes |
| 198 |
comparing with ssh://user@dummy/master |
| 199 |
searching for changes |
| 200 |
looking for local changes to affected paths |
| 201 |
The following changeset(s) or their ancestors have local changes not on the remote: |
| 202 |
* (glob) |
| 203 |
* (glob) |
| 204 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 205 |
moving unwanted changesets to backup |
| 206 |
saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
| 207 |
deleting data/d3/f.i |
| 208 |
deleting meta/d3/00manifest.i (tree !) |
| 209 |
deleting unwanted files from working copy |
| 210 |
$ hg log -T '{desc}\n' -r . |
| 211 |
add d10/f |
| 212 |
Updates to nullid if necessary |
| 213 |
$ hg tracked --addinclude d3 -q |
| 214 |
$ hg co null -q |
| 215 |
$ mkdir d3 |
| 216 |
$ echo local change > d3/f |
| 217 |
$ hg add d3/f |
| 218 |
$ hg ci -m 'local change to d3' |
| 219 |
created new head |
| 220 |
$ hg tracked --removeinclude d3 --force-delete-local-changes |
| 221 |
comparing with ssh://user@dummy/master |
| 222 |
searching for changes |
| 223 |
looking for local changes to affected paths |
| 224 |
The following changeset(s) or their ancestors have local changes not on the remote: |
| 225 |
* (glob) |
| 226 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
| 227 |
moving unwanted changesets to backup |
| 228 |
saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob) |
| 229 |
deleting data/d3/f.i |
| 230 |
deleting meta/d3/00manifest.i (tree !) |
| 231 |
deleting unwanted files from working copy |
| 232 |
$ hg id |
| 233 |
000000000000 |
| 234 |
$ cd .. |
| 235 |
|
| 236 |
Narrowing doesn't resurrect old commits (unlike what regular `hg strip` does) |
| 237 |
$ hg clone --narrow ssh://user@dummy/master narrow-obsmarkers --include d0 --include d3 -q |
| 238 |
$ cd narrow-obsmarkers |
| 239 |
$ echo a >> d0/f2 |
| 240 |
$ hg add d0/f2 |
| 241 |
$ hg ci -m 'modify d0/' |
| 242 |
$ echo a >> d3/f2 |
| 243 |
$ hg add d3/f2 |
| 244 |
$ hg commit --amend -m 'modify d0/ and d3/' |
| 245 |
$ hg log -T "{rev}: {desc}\n" |
| 246 |
5: modify d0/ and d3/ |
| 247 |
3: add d10/f |
| 248 |
2: add d3/f |
| 249 |
1: add d2/f |
| 250 |
0: add d0/f |
| 251 |
$ hg tracked --removeinclude d3 --force-delete-local-changes -q |
| 252 |
$ hg log -T "{rev}: {desc}\n" |
| 253 |
3: add d10/f |
| 254 |
2: add d3/f |
| 255 |
1: add d2/f |
| 256 |
0: add d0/f |
| 257 |
$ cd .. |
| 258 |
|
| 259 |
Widening doesn't lose bookmarks |
| 260 |
$ hg clone --narrow ssh://user@dummy/master widen-bookmarks --include d0 -q |
| 261 |
$ cd widen-bookmarks |
| 262 |
$ hg bookmark my-bookmark |
| 263 |
$ hg log -T "{rev}: {desc} {bookmarks}\n" |
| 264 |
1: add d10/f my-bookmark |
| 265 |
0: add d0/f |
| 266 |
$ hg tracked --addinclude d3 -q |
| 267 |
$ hg log -T "{rev}: {desc} {bookmarks}\n" |
| 268 |
3: add d10/f my-bookmark |
| 269 |
2: add d3/f |
| 270 |
1: add d2/f |
| 271 |
0: add d0/f |
| 272 |
$ cd .. |
| 273 |
|
| 274 |
Can remove last include, making repo empty |
| 275 |
$ hg clone --narrow ssh://user@dummy/master narrow-empty --include d0 -r 5 |
| 276 |
adding changesets |
| 277 |
adding manifests |
| 278 |
adding file changes |
| 279 |
added 2 changesets with 1 changes to 1 files |
| 280 |
new changesets *:* (glob) |
| 281 |
updating to branch default |
| 282 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 283 |
$ cd narrow-empty |
| 284 |
$ hg tracked --removeinclude d0 |
| 285 |
comparing with ssh://user@dummy/master |
| 286 |
searching for changes |
| 287 |
looking for local changes to affected paths |
| 288 |
deleting data/d0/f.i |
| 289 |
deleting meta/d0/00manifest.i (tree !) |
| 290 |
deleting unwanted files from working copy |
| 291 |
$ hg tracked |
| 292 |
$ hg files |
| 293 |
[1] |
| 294 |
$ test -d d0 |
| 295 |
[1] |
| 296 |
Do some work in the empty clone |
| 297 |
$ hg diff --change . |
| 298 |
$ hg branch foo |
| 299 |
marked working directory as branch foo |
| 300 |
(branches are permanent and global, did you want a bookmark?) |
| 301 |
$ hg ci -m empty |
| 302 |
$ hg log -T "{rev}: {desc} {outsidenarrow}\n" |
| 303 |
2: empty |
| 304 |
1: add d5/f outsidenarrow |
| 305 |
0: add d0/f outsidenarrow |
| 306 |
$ hg pull -q |
| 307 |
Can widen the empty clone |
| 308 |
$ hg tracked --addinclude d0 |
| 309 |
comparing with ssh://user@dummy/master |
| 310 |
searching for changes |
| 311 |
saved backup bundle to $TESTTMP/narrow-empty/.hg/strip-backup/*-widen.hg (glob) |
| 312 |
adding changesets |
| 313 |
adding manifests |
| 314 |
adding file changes |
| 315 |
added 4 changesets with 1 changes to 1 files (+1 heads) |
| 316 |
$ hg tracked |
| 317 |
I path:d0 |
| 318 |
$ hg files |
| 319 |
d0/f |
| 320 |
$ find * |
| 321 |
d0 |
| 322 |
d0/f |
| 323 |
$ cd .. |
| 324 |
|
| 325 |
TODO(martinvonz): test including e.g. d3/g and then removing it once |
| 326 |
https://bitbucket.org/Google/narrowhg/issues/6 is fixed |
| 327 |
|
| 328 |
$ hg clone --narrow ssh://user@dummy/master narrow --include d0 --include d3 --include d6 --include d9 |
| 329 |
requesting all changes |
| 330 |
adding changesets |
| 331 |
adding manifests |
| 332 |
adding file changes |
| 333 |
added 8 changesets with 4 changes to 4 files |
| 334 |
new changesets *:* (glob) |
| 335 |
updating to branch default |
| 336 |
4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 337 |
$ cd narrow |
| 338 |
$ hg tracked |
| 339 |
I path:d0 |
| 340 |
I path:d3 |
| 341 |
I path:d6 |
| 342 |
I path:d9 |
| 343 |
$ hg tracked --removeinclude d6 |
| 344 |
comparing with ssh://user@dummy/master |
| 345 |
searching for changes |
| 346 |
looking for local changes to affected paths |
| 347 |
deleting data/d6/f.i |
| 348 |
deleting meta/d6/00manifest.i (tree !) |
| 349 |
deleting unwanted files from working copy |
| 350 |
$ hg tracked |
| 351 |
I path:d0 |
| 352 |
I path:d3 |
| 353 |
I path:d9 |
| 354 |
$ hg debugrebuildfncache |
| 355 |
fncache already up to date |
| 356 |
$ find * |
| 357 |
d0 |
| 358 |
d0/f |
| 359 |
d3 |
| 360 |
d3/f |
| 361 |
d9 |
| 362 |
d9/f |
| 363 |
$ hg verify -q |
| 364 |
$ hg tracked --addexclude d3/f |
| 365 |
comparing with ssh://user@dummy/master |
| 366 |
searching for changes |
| 367 |
looking for local changes to affected paths |
| 368 |
deleting data/d3/f.i |
| 369 |
deleting unwanted files from working copy |
| 370 |
$ hg tracked |
| 371 |
I path:d0 |
| 372 |
I path:d3 |
| 373 |
I path:d9 |
| 374 |
X path:d3/f |
| 375 |
$ hg debugrebuildfncache |
| 376 |
fncache already up to date |
| 377 |
$ find * |
| 378 |
d0 |
| 379 |
d0/f |
| 380 |
d9 |
| 381 |
d9/f |
| 382 |
$ hg verify -q |
| 383 |
$ hg tracked --addexclude d0 |
| 384 |
comparing with ssh://user@dummy/master |
| 385 |
searching for changes |
| 386 |
looking for local changes to affected paths |
| 387 |
deleting data/d0/f.i |
| 388 |
deleting meta/d0/00manifest.i (tree !) |
| 389 |
deleting unwanted files from working copy |
| 390 |
$ hg tracked |
| 391 |
I path:d3 |
| 392 |
I path:d9 |
| 393 |
X path:d0 |
| 394 |
X path:d3/f |
| 395 |
$ hg debugrebuildfncache |
| 396 |
fncache already up to date |
| 397 |
$ find * |
| 398 |
d9 |
| 399 |
d9/f |
| 400 |
|
| 401 |
Make a 15 of changes to d9 to test the path without --verbose |
| 402 |
(Note: using regexes instead of "* (glob)" because if the test fails, it |
| 403 |
produces more sensible diffs) |
| 404 |
$ hg tracked |
| 405 |
I path:d3 |
| 406 |
I path:d9 |
| 407 |
X path:d0 |
| 408 |
X path:d3/f |
| 409 |
$ for x in `$TESTDIR/seq.py 1 15` |
| 410 |
> do |
| 411 |
> echo local change >> d9/f |
| 412 |
> hg commit -m "change $x to d9/f" |
| 413 |
> done |
| 414 |
$ hg tracked --removeinclude d9 |
| 415 |
comparing with ssh://user@dummy/master |
| 416 |
searching for changes |
| 417 |
looking for local changes to affected paths |
| 418 |
The following changeset(s) or their ancestors have local changes not on the remote: |
| 419 |
^[0-9a-f]{12}$ (re) |
| 420 |
^[0-9a-f]{12}$ (re) |
| 421 |
^[0-9a-f]{12}$ (re) |
| 422 |
^[0-9a-f]{12}$ (re) |
| 423 |
^[0-9a-f]{12}$ (re) |
| 424 |
^[0-9a-f]{12}$ (re) |
| 425 |
^[0-9a-f]{12}$ (re) |
| 426 |
^[0-9a-f]{12}$ (re) |
| 427 |
^[0-9a-f]{12}$ (re) |
| 428 |
^[0-9a-f]{12}$ (re) |
| 429 |
...and 5 more, use --verbose to list all |
| 430 |
abort: local changes found |
| 431 |
(use --force-delete-local-changes to ignore) |
| 432 |
[20] |
| 433 |
Now test it *with* verbose. |
| 434 |
$ hg tracked --removeinclude d9 --verbose |
| 435 |
comparing with ssh://user@dummy/master |
| 436 |
searching for changes |
| 437 |
looking for local changes to affected paths |
| 438 |
The following changeset(s) or their ancestors have local changes not on the remote: |
| 439 |
^[0-9a-f]{12}$ (re) |
| 440 |
^[0-9a-f]{12}$ (re) |
| 441 |
^[0-9a-f]{12}$ (re) |
| 442 |
^[0-9a-f]{12}$ (re) |
| 443 |
^[0-9a-f]{12}$ (re) |
| 444 |
^[0-9a-f]{12}$ (re) |
| 445 |
^[0-9a-f]{12}$ (re) |
| 446 |
^[0-9a-f]{12}$ (re) |
| 447 |
^[0-9a-f]{12}$ (re) |
| 448 |
^[0-9a-f]{12}$ (re) |
| 449 |
^[0-9a-f]{12}$ (re) |
| 450 |
^[0-9a-f]{12}$ (re) |
| 451 |
^[0-9a-f]{12}$ (re) |
| 452 |
^[0-9a-f]{12}$ (re) |
| 453 |
^[0-9a-f]{12}$ (re) |
| 454 |
abort: local changes found |
| 455 |
(use --force-delete-local-changes to ignore) |
| 456 |
[20] |
| 457 |
$ cd .. |
| 458 |
|
| 459 |
Test --auto-remove-includes |
| 460 |
$ hg clone --narrow ssh://user@dummy/master narrow-auto-remove -q \ |
| 461 |
> --include d0 --include d1 --include d2 |
| 462 |
$ cd narrow-auto-remove |
| 463 |
$ echo a >> d0/f |
| 464 |
$ hg ci -m 'local change to d0' |
| 465 |
$ hg co '.^' |
| 466 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 467 |
$ echo a >> d1/f |
| 468 |
$ hg ci -m 'local change to d1' |
| 469 |
created new head |
| 470 |
$ hg debugobsolete $(hg log -T '{node}' -r 'desc("local change to d0")') |
| 471 |
1 new obsolescence markers |
| 472 |
obsoleted 1 changesets |
| 473 |
$ echo n | hg tracked --auto-remove-includes --config ui.interactive=yes |
| 474 |
comparing with ssh://user@dummy/master |
| 475 |
searching for changes |
| 476 |
looking for unused includes to remove |
| 477 |
path:d0 |
| 478 |
path:d2 |
| 479 |
remove these unused includes (Yn)? n |
| 480 |
$ hg tracked --auto-remove-includes |
| 481 |
comparing with ssh://user@dummy/master |
| 482 |
searching for changes |
| 483 |
looking for unused includes to remove |
| 484 |
path:d0 |
| 485 |
path:d2 |
| 486 |
remove these unused includes (Yn)? y |
| 487 |
looking for local changes to affected paths |
| 488 |
moving unwanted changesets to backup |
| 489 |
saved backup bundle to $TESTTMP/narrow-auto-remove/.hg/strip-backup/*-narrow.hg (glob) |
| 490 |
deleting data/d0/f.i |
| 491 |
deleting data/d2/f.i |
| 492 |
deleting meta/d0/00manifest.i (tree !) |
| 493 |
deleting meta/d2/00manifest.i (tree !) |
| 494 |
deleting unwanted files from working copy |
| 495 |
$ hg tracked |
| 496 |
I path:d1 |
| 497 |
$ hg files |
| 498 |
d1/f |
| 499 |
$ hg tracked --auto-remove-includes |
| 500 |
comparing with ssh://user@dummy/master |
| 501 |
searching for changes |
| 502 |
looking for unused includes to remove |
| 503 |
found no unused includes |
| 504 |
Test --no-backup |
| 505 |
$ hg tracked --addinclude d0 --addinclude d2 -q |
| 506 |
$ hg unbundle .hg/strip-backup/*-narrow.hg -q |
| 507 |
$ rm .hg/strip-backup/* |
| 508 |
$ hg tracked --auto-remove-includes --no-backup |
| 509 |
comparing with ssh://user@dummy/master |
| 510 |
searching for changes |
| 511 |
looking for unused includes to remove |
| 512 |
path:d0 |
| 513 |
path:d2 |
| 514 |
remove these unused includes (Yn)? y |
| 515 |
looking for local changes to affected paths |
| 516 |
deleting unwanted changesets |
| 517 |
deleting data/d0/f.i |
| 518 |
deleting data/d2/f.i |
| 519 |
deleting meta/d0/00manifest.i (tree !) |
| 520 |
deleting meta/d2/00manifest.i (tree !) |
| 521 |
deleting unwanted files from working copy |
| 522 |
$ ls .hg/strip-backup/ |
| 523 |
|
| 524 |
|
| 525 |
Test removing include while concurrently modifying file in that path |
| 526 |
$ hg clone --narrow ssh://user@dummy/master narrow-concurrent-modify -q \ |
| 527 |
> --include d0 --include d1 |
| 528 |
$ cd narrow-concurrent-modify |
| 529 |
$ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude d0 |
| 530 |
comparing with ssh://user@dummy/master |
| 531 |
searching for changes |
| 532 |
looking for local changes to affected paths |
| 533 |
deleting data/d0/f.i |
| 534 |
deleting meta/d0/00manifest.i (tree !) |
| 535 |
deleting unwanted files from working copy |
| 536 |
not deleting possibly dirty file d0/f |
| 537 |
|
| 538 |
|
| 539 |
Test removing `rootfilesin:` include |
| 540 |
$ hg clone --narrow ssh://user@dummy/master narrow-concurrent-modify -q \ |
| 541 |
> --include rootfilesin:d0 --include rootfilesin:d1 |
| 542 |
$ cd narrow-concurrent-modify |
| 543 |
$ hg --config 'hooks.pretxnopen = echo modified >> d0/f' tracked --removeinclude rootfilesin:d0 |
| 544 |
comparing with ssh://user@dummy/master |
| 545 |
searching for changes |
| 546 |
looking for local changes to affected paths |
| 547 |
deleting data/d0/f.i |
| 548 |
deleting meta/d0/00manifest.i (tree !) |
| 549 |
deleting unwanted files from working copy |
| 550 |
not deleting possibly dirty file d0/f |