| 1 |
This file contains testcases that tend to be related to special cases or less |
| 2 |
common commands affecting largefile. |
| 3 |
|
| 4 |
$ hg init requirements |
| 5 |
$ cd requirements |
| 6 |
|
| 7 |
# largefiles not loaded by default. |
| 8 |
|
| 9 |
$ hg config extensions |
| 10 |
[1] |
| 11 |
|
| 12 |
# Adding largefiles to requires file will auto-load largefiles extension. |
| 13 |
|
| 14 |
$ echo largefiles >> .hg/requires |
| 15 |
$ hg config extensions |
| 16 |
extensions.largefiles= |
| 17 |
|
| 18 |
# But only if there is no config entry for the extension already. |
| 19 |
|
| 20 |
$ cat > .hg/hgrc << EOF |
| 21 |
> [extensions] |
| 22 |
> largefiles=! |
| 23 |
> EOF |
| 24 |
|
| 25 |
$ hg config extensions |
| 26 |
abort: repository requires features unknown to this Mercurial: largefiles |
| 27 |
(see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
| 28 |
[255] |
| 29 |
|
| 30 |
$ cat > .hg/hgrc << EOF |
| 31 |
> [extensions] |
| 32 |
> largefiles= |
| 33 |
> EOF |
| 34 |
|
| 35 |
$ hg config extensions |
| 36 |
extensions.largefiles= |
| 37 |
|
| 38 |
$ cat > .hg/hgrc << EOF |
| 39 |
> [extensions] |
| 40 |
> largefiles = missing.py |
| 41 |
> EOF |
| 42 |
|
| 43 |
$ hg config extensions |
| 44 |
\*\*\* failed to import extension "largefiles" from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) |
| 45 |
abort: repository requires features unknown to this Mercurial: largefiles |
| 46 |
(see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
| 47 |
[255] |
| 48 |
|
| 49 |
$ cd .. |
| 50 |
|
| 51 |
Each sections should be independent of each others. |
| 52 |
|
| 53 |
$ USERCACHE="$TESTTMP/cache"; export USERCACHE |
| 54 |
$ mkdir "${USERCACHE}" |
| 55 |
$ cat >> $HGRCPATH <<EOF |
| 56 |
> [extensions] |
| 57 |
> largefiles= |
| 58 |
> purge= |
| 59 |
> rebase= |
| 60 |
> transplant= |
| 61 |
> [phases] |
| 62 |
> publish=False |
| 63 |
> [largefiles] |
| 64 |
> minsize=2 |
| 65 |
> patterns=glob:**.dat |
| 66 |
> usercache=${USERCACHE} |
| 67 |
> [hooks] |
| 68 |
> precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status" |
| 69 |
> EOF |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
Test copies and moves from a directory other than root (issue3516) |
| 74 |
========================================================================= |
| 75 |
|
| 76 |
$ hg init lf_cpmv |
| 77 |
$ cd lf_cpmv |
| 78 |
$ mkdir dira |
| 79 |
$ mkdir dira/dirb |
| 80 |
$ touch dira/dirb/largefile |
| 81 |
$ hg add --large dira/dirb/largefile |
| 82 |
$ hg commit -m "added" |
| 83 |
Invoking status precommit hook |
| 84 |
A dira/dirb/largefile |
| 85 |
$ cd dira |
| 86 |
$ hg cp dirb/largefile foo/largefile |
| 87 |
|
| 88 |
TODO: Ideally, this should mention the largefile, not the standin |
| 89 |
$ hg log -T '{rev}\n' --stat 'set:clean()' |
| 90 |
0 |
| 91 |
.hglf/dira/dirb/largefile | 1 + |
| 92 |
1 files changed, 1 insertions(+), 0 deletions(-) |
| 93 |
|
| 94 |
$ hg ci -m "deep copy" |
| 95 |
Invoking status precommit hook |
| 96 |
A dira/foo/largefile |
| 97 |
$ find . | sort |
| 98 |
. |
| 99 |
./dirb |
| 100 |
./dirb/largefile |
| 101 |
./foo |
| 102 |
./foo/largefile |
| 103 |
$ hg mv foo/largefile baz/largefile |
| 104 |
$ hg ci -m "moved" |
| 105 |
Invoking status precommit hook |
| 106 |
A dira/baz/largefile |
| 107 |
R dira/foo/largefile |
| 108 |
$ find . | sort |
| 109 |
. |
| 110 |
./baz |
| 111 |
./baz/largefile |
| 112 |
./dirb |
| 113 |
./dirb/largefile |
| 114 |
$ cd .. |
| 115 |
$ hg mv dira dirc |
| 116 |
moving .hglf/dira/baz/largefile to .hglf/dirc/baz/largefile |
| 117 |
moving .hglf/dira/dirb/largefile to .hglf/dirc/dirb/largefile |
| 118 |
$ find * | sort |
| 119 |
dirc |
| 120 |
dirc/baz |
| 121 |
dirc/baz/largefile |
| 122 |
dirc/dirb |
| 123 |
dirc/dirb/largefile |
| 124 |
|
| 125 |
$ hg clone -q . ../fetch |
| 126 |
$ hg --config extensions.fetch= fetch ../fetch |
| 127 |
abort: uncommitted changes |
| 128 |
[20] |
| 129 |
$ hg up -qC |
| 130 |
$ cd .. |
| 131 |
|
| 132 |
Clone a local repository owned by another user |
| 133 |
=================================================== |
| 134 |
|
| 135 |
#if unix-permissions |
| 136 |
|
| 137 |
We have to simulate that here by setting $HOME and removing write permissions |
| 138 |
$ ORIGHOME="$HOME" |
| 139 |
$ mkdir alice |
| 140 |
$ HOME="`pwd`/alice" |
| 141 |
$ cd alice |
| 142 |
$ hg init pubrepo |
| 143 |
$ cd pubrepo |
| 144 |
$ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null |
| 145 |
$ hg add --large a-large-file |
| 146 |
$ hg commit -m "Add a large file" |
| 147 |
Invoking status precommit hook |
| 148 |
A a-large-file |
| 149 |
$ cd .. |
| 150 |
$ chmod -R a-w pubrepo |
| 151 |
$ cd .. |
| 152 |
$ mkdir bob |
| 153 |
$ HOME="`pwd`/bob" |
| 154 |
$ cd bob |
| 155 |
$ hg clone --pull ../alice/pubrepo pubrepo |
| 156 |
requesting all changes |
| 157 |
adding changesets |
| 158 |
adding manifests |
| 159 |
adding file changes |
| 160 |
added 1 changesets with 1 changes to 1 files |
| 161 |
new changesets 09a186cfa6da (1 drafts) |
| 162 |
updating to branch default |
| 163 |
getting changed largefiles |
| 164 |
1 largefiles updated, 0 removed |
| 165 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 166 |
$ cd .. |
| 167 |
$ chmod -R u+w alice/pubrepo |
| 168 |
$ HOME="$ORIGHOME" |
| 169 |
|
| 170 |
#endif |
| 171 |
|
| 172 |
|
| 173 |
Symlink to a large largefile should behave the same as a symlink to a normal file |
| 174 |
===================================================================================== |
| 175 |
|
| 176 |
#if symlink |
| 177 |
|
| 178 |
$ hg init largesymlink |
| 179 |
$ cd largesymlink |
| 180 |
$ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null |
| 181 |
$ hg add --large largefile |
| 182 |
$ hg commit -m "commit a large file" |
| 183 |
Invoking status precommit hook |
| 184 |
A largefile |
| 185 |
$ ln -s largefile largelink |
| 186 |
$ hg add largelink |
| 187 |
$ hg commit -m "commit a large symlink" |
| 188 |
Invoking status precommit hook |
| 189 |
A largelink |
| 190 |
$ rm -f largelink |
| 191 |
$ hg up >/dev/null |
| 192 |
$ test -f largelink |
| 193 |
[1] |
| 194 |
$ test -L largelink |
| 195 |
[1] |
| 196 |
$ rm -f largelink # make next part of the test independent of the previous |
| 197 |
$ hg up -C >/dev/null |
| 198 |
$ test -f largelink |
| 199 |
$ test -L largelink |
| 200 |
$ cd .. |
| 201 |
|
| 202 |
#endif |
| 203 |
|
| 204 |
|
| 205 |
test for pattern matching on 'hg status': |
| 206 |
============================================== |
| 207 |
|
| 208 |
|
| 209 |
to boost performance, largefiles checks whether specified patterns are |
| 210 |
related to largefiles in working directory (NOT to STANDIN) or not. |
| 211 |
|
| 212 |
$ hg init statusmatch |
| 213 |
$ cd statusmatch |
| 214 |
|
| 215 |
$ mkdir -p a/b/c/d |
| 216 |
$ echo normal > a/b/c/d/e.normal.txt |
| 217 |
$ hg add a/b/c/d/e.normal.txt |
| 218 |
$ echo large > a/b/c/d/e.large.txt |
| 219 |
$ hg add --large a/b/c/d/e.large.txt |
| 220 |
$ mkdir -p a/b/c/x |
| 221 |
$ echo normal > a/b/c/x/y.normal.txt |
| 222 |
$ hg add a/b/c/x/y.normal.txt |
| 223 |
$ hg commit -m 'add files' |
| 224 |
Invoking status precommit hook |
| 225 |
A a/b/c/d/e.large.txt |
| 226 |
A a/b/c/d/e.normal.txt |
| 227 |
A a/b/c/x/y.normal.txt |
| 228 |
|
| 229 |
(1) no pattern: no performance boost |
| 230 |
$ hg status -A |
| 231 |
C a/b/c/d/e.large.txt |
| 232 |
C a/b/c/d/e.normal.txt |
| 233 |
C a/b/c/x/y.normal.txt |
| 234 |
|
| 235 |
(2) pattern not related to largefiles: performance boost |
| 236 |
$ hg status -A a/b/c/x |
| 237 |
C a/b/c/x/y.normal.txt |
| 238 |
|
| 239 |
(3) pattern related to largefiles: no performance boost |
| 240 |
$ hg status -A a/b/c/d |
| 241 |
C a/b/c/d/e.large.txt |
| 242 |
C a/b/c/d/e.normal.txt |
| 243 |
|
| 244 |
(4) pattern related to STANDIN (not to largefiles): performance boost |
| 245 |
$ hg status -A .hglf/a |
| 246 |
C .hglf/a/b/c/d/e.large.txt |
| 247 |
|
| 248 |
(5) mixed case: no performance boost |
| 249 |
$ hg status -A a/b/c/x a/b/c/d |
| 250 |
C a/b/c/d/e.large.txt |
| 251 |
C a/b/c/d/e.normal.txt |
| 252 |
C a/b/c/x/y.normal.txt |
| 253 |
|
| 254 |
verify that largefiles doesn't break filesets |
| 255 |
|
| 256 |
$ hg log --rev . --exclude "set:binary()" |
| 257 |
changeset: 0:41bd42f10efa |
| 258 |
tag: tip |
| 259 |
user: test |
| 260 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 261 |
summary: add files |
| 262 |
|
| 263 |
sharing a largefile repo automatically enables largefiles on the share |
| 264 |
|
| 265 |
$ hg share --config extensions.share= . ../shared_lfrepo |
| 266 |
updating working directory |
| 267 |
getting changed largefiles |
| 268 |
1 largefiles updated, 0 removed |
| 269 |
3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 270 |
$ hg debugrequires -R ../shared_lfrepo | grep largefiles |
| 271 |
largefiles |
| 272 |
|
| 273 |
verify that large files in subrepos handled properly |
| 274 |
$ hg init subrepo |
| 275 |
$ echo "subrepo = subrepo" > .hgsub |
| 276 |
$ hg add .hgsub |
| 277 |
$ hg ci -m "add subrepo" |
| 278 |
Invoking status precommit hook |
| 279 |
A .hgsub |
| 280 |
? .hgsubstate |
| 281 |
$ echo "rev 1" > subrepo/large.txt |
| 282 |
$ hg add --large subrepo/large.txt |
| 283 |
$ hg sum |
| 284 |
parent: 1:8ee150ea2e9c tip |
| 285 |
add subrepo |
| 286 |
branch: default |
| 287 |
commit: 1 subrepos |
| 288 |
update: (current) |
| 289 |
phases: 2 draft |
| 290 |
$ hg st |
| 291 |
$ hg st -S |
| 292 |
A subrepo/large.txt |
| 293 |
$ hg ci -S -m "commit top repo" |
| 294 |
committing subrepository subrepo |
| 295 |
Invoking status precommit hook |
| 296 |
A large.txt |
| 297 |
Invoking status precommit hook |
| 298 |
M .hgsubstate |
| 299 |
# No differences |
| 300 |
$ hg st -S |
| 301 |
$ hg sum |
| 302 |
parent: 2:ce4cd0c527a6 tip |
| 303 |
commit top repo |
| 304 |
branch: default |
| 305 |
commit: (clean) |
| 306 |
update: (current) |
| 307 |
phases: 3 draft |
| 308 |
$ echo "rev 2" > subrepo/large.txt |
| 309 |
$ hg st -S |
| 310 |
M subrepo/large.txt |
| 311 |
$ hg sum |
| 312 |
parent: 2:ce4cd0c527a6 tip |
| 313 |
commit top repo |
| 314 |
branch: default |
| 315 |
commit: 1 subrepos |
| 316 |
update: (current) |
| 317 |
phases: 3 draft |
| 318 |
$ hg ci -m "this commit should fail without -S" |
| 319 |
abort: uncommitted changes in subrepository "subrepo" |
| 320 |
(use --subrepos for recursive commit) |
| 321 |
[255] |
| 322 |
|
| 323 |
Add a normal file to the subrepo, then test archiving |
| 324 |
|
| 325 |
$ echo 'normal file' > subrepo/normal.txt |
| 326 |
$ touch large.dat |
| 327 |
$ mv subrepo/large.txt subrepo/renamed-large.txt |
| 328 |
$ hg addremove -S --dry-run |
| 329 |
adding large.dat as a largefile |
| 330 |
removing subrepo/large.txt |
| 331 |
adding subrepo/normal.txt |
| 332 |
adding subrepo/renamed-large.txt |
| 333 |
$ hg status -S |
| 334 |
! subrepo/large.txt |
| 335 |
? large.dat |
| 336 |
? subrepo/normal.txt |
| 337 |
? subrepo/renamed-large.txt |
| 338 |
|
| 339 |
$ hg addremove --dry-run subrepo |
| 340 |
removing subrepo/large.txt |
| 341 |
adding subrepo/normal.txt |
| 342 |
adding subrepo/renamed-large.txt |
| 343 |
$ hg status -S |
| 344 |
! subrepo/large.txt |
| 345 |
? large.dat |
| 346 |
? subrepo/normal.txt |
| 347 |
? subrepo/renamed-large.txt |
| 348 |
$ cd .. |
| 349 |
|
| 350 |
$ hg -R statusmatch addremove --dry-run statusmatch/subrepo |
| 351 |
removing statusmatch/subrepo/large.txt |
| 352 |
adding statusmatch/subrepo/normal.txt |
| 353 |
adding statusmatch/subrepo/renamed-large.txt |
| 354 |
$ hg -R statusmatch status -S |
| 355 |
! subrepo/large.txt |
| 356 |
? large.dat |
| 357 |
? subrepo/normal.txt |
| 358 |
? subrepo/renamed-large.txt |
| 359 |
|
| 360 |
$ hg -R statusmatch addremove --dry-run -S |
| 361 |
adding large.dat as a largefile |
| 362 |
removing subrepo/large.txt |
| 363 |
adding subrepo/normal.txt |
| 364 |
adding subrepo/renamed-large.txt |
| 365 |
$ cd statusmatch |
| 366 |
|
| 367 |
$ mv subrepo/renamed-large.txt subrepo/large.txt |
| 368 |
$ hg addremove subrepo |
| 369 |
adding subrepo/normal.txt |
| 370 |
$ hg forget subrepo/normal.txt |
| 371 |
|
| 372 |
$ hg addremove -S |
| 373 |
adding large.dat as a largefile |
| 374 |
adding subrepo/normal.txt |
| 375 |
$ rm large.dat |
| 376 |
|
| 377 |
$ hg addremove subrepo |
| 378 |
$ hg addremove -S |
| 379 |
removing large.dat |
| 380 |
|
| 381 |
Lock in subrepo, otherwise the change isn't archived |
| 382 |
|
| 383 |
$ hg ci -S -m "add normal file to top level" |
| 384 |
committing subrepository subrepo |
| 385 |
Invoking status precommit hook |
| 386 |
M large.txt |
| 387 |
A normal.txt |
| 388 |
Invoking status precommit hook |
| 389 |
M .hgsubstate |
| 390 |
$ hg archive -S ../lf_subrepo_archive |
| 391 |
$ find ../lf_subrepo_archive | sort |
| 392 |
../lf_subrepo_archive |
| 393 |
../lf_subrepo_archive/.hg_archival.txt |
| 394 |
../lf_subrepo_archive/.hgsub |
| 395 |
../lf_subrepo_archive/.hgsubstate |
| 396 |
../lf_subrepo_archive/a |
| 397 |
../lf_subrepo_archive/a/b |
| 398 |
../lf_subrepo_archive/a/b/c |
| 399 |
../lf_subrepo_archive/a/b/c/d |
| 400 |
../lf_subrepo_archive/a/b/c/d/e.large.txt |
| 401 |
../lf_subrepo_archive/a/b/c/d/e.normal.txt |
| 402 |
../lf_subrepo_archive/a/b/c/x |
| 403 |
../lf_subrepo_archive/a/b/c/x/y.normal.txt |
| 404 |
../lf_subrepo_archive/subrepo |
| 405 |
../lf_subrepo_archive/subrepo/large.txt |
| 406 |
../lf_subrepo_archive/subrepo/normal.txt |
| 407 |
$ cat ../lf_subrepo_archive/.hg_archival.txt |
| 408 |
repo: 41bd42f10efa43698cc02052ea0977771cba506d |
| 409 |
node: d56a95e6522858bc08a724c4fe2bdee066d1c30b |
| 410 |
branch: default |
| 411 |
latesttag: null |
| 412 |
latesttagdistance: 4 |
| 413 |
changessincelatesttag: 4 |
| 414 |
|
| 415 |
Test update with subrepos. |
| 416 |
|
| 417 |
$ hg update 0 |
| 418 |
getting changed largefiles |
| 419 |
0 largefiles updated, 1 removed |
| 420 |
0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
| 421 |
$ hg status -S |
| 422 |
$ hg update tip |
| 423 |
getting changed largefiles |
| 424 |
1 largefiles updated, 0 removed |
| 425 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 426 |
$ hg status -S |
| 427 |
# modify a large file |
| 428 |
$ echo "modified" > subrepo/large.txt |
| 429 |
$ hg st -S |
| 430 |
M subrepo/large.txt |
| 431 |
# update -C should revert the change. |
| 432 |
$ hg update -C |
| 433 |
getting changed largefiles |
| 434 |
1 largefiles updated, 0 removed |
| 435 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 436 |
$ hg status -S |
| 437 |
|
| 438 |
Forget doesn't change the content of the file |
| 439 |
$ echo 'pre-forget content' > subrepo/large.txt |
| 440 |
$ hg forget -v subrepo/large.txt |
| 441 |
removing subrepo/large.txt |
| 442 |
$ cat subrepo/large.txt |
| 443 |
pre-forget content |
| 444 |
|
| 445 |
Test reverting a forgotten file |
| 446 |
$ hg revert -R subrepo subrepo/large.txt |
| 447 |
$ hg status -SA subrepo/large.txt |
| 448 |
C subrepo/large.txt |
| 449 |
|
| 450 |
$ hg rm -v subrepo/large.txt |
| 451 |
removing subrepo/large.txt |
| 452 |
$ hg revert -R subrepo subrepo/large.txt |
| 453 |
$ rm subrepo/large.txt |
| 454 |
$ hg addremove -S |
| 455 |
removing subrepo/large.txt |
| 456 |
$ hg st -S |
| 457 |
R subrepo/large.txt |
| 458 |
|
| 459 |
Test archiving a revision that references a subrepo that is not yet |
| 460 |
cloned (see test-subrepo-recursion.t): |
| 461 |
|
| 462 |
$ hg clone -U . ../empty |
| 463 |
$ cd ../empty |
| 464 |
$ hg archive --subrepos -r tip ../archive.tar.gz |
| 465 |
cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo |
| 466 |
$ cd .. |
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
Test addremove, forget and others |
| 474 |
============================================== |
| 475 |
|
| 476 |
Test that addremove picks up largefiles prior to the initial commit (issue3541) |
| 477 |
|
| 478 |
$ hg init addrm2 |
| 479 |
$ cd addrm2 |
| 480 |
$ touch large.dat |
| 481 |
$ touch large2.dat |
| 482 |
$ touch normal |
| 483 |
$ hg add --large large.dat |
| 484 |
$ hg addremove -v |
| 485 |
adding large2.dat as a largefile |
| 486 |
adding normal |
| 487 |
|
| 488 |
Test that forgetting all largefiles reverts to islfilesrepo() == False |
| 489 |
(addremove will add *.dat as normal files now) |
| 490 |
$ hg forget large.dat |
| 491 |
$ hg forget large2.dat |
| 492 |
$ hg addremove -v |
| 493 |
adding large.dat |
| 494 |
adding large2.dat |
| 495 |
|
| 496 |
Test commit's addremove option prior to the first commit |
| 497 |
$ hg forget large.dat |
| 498 |
$ hg forget large2.dat |
| 499 |
$ hg add --large large.dat |
| 500 |
$ hg ci -Am "commit" |
| 501 |
adding large2.dat as a largefile |
| 502 |
Invoking status precommit hook |
| 503 |
A large.dat |
| 504 |
A large2.dat |
| 505 |
A normal |
| 506 |
$ find .hglf | sort |
| 507 |
.hglf |
| 508 |
.hglf/large.dat |
| 509 |
.hglf/large2.dat |
| 510 |
|
| 511 |
Test actions on largefiles using relative paths from subdir |
| 512 |
|
| 513 |
$ mkdir sub |
| 514 |
$ cd sub |
| 515 |
$ echo anotherlarge > anotherlarge |
| 516 |
$ hg add --large anotherlarge |
| 517 |
$ hg st |
| 518 |
A sub/anotherlarge |
| 519 |
$ hg st anotherlarge |
| 520 |
A anotherlarge |
| 521 |
$ hg commit -m anotherlarge anotherlarge |
| 522 |
Invoking status precommit hook |
| 523 |
A sub/anotherlarge |
| 524 |
$ hg log anotherlarge |
| 525 |
changeset: 1:9627a577c5e9 |
| 526 |
tag: tip |
| 527 |
user: test |
| 528 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 529 |
summary: anotherlarge |
| 530 |
|
| 531 |
$ hg --debug log -T '{rev}: {desc}\n' ../sub/anotherlarge |
| 532 |
updated patterns: ../.hglf/sub/../sub/anotherlarge, ../sub/anotherlarge |
| 533 |
1: anotherlarge |
| 534 |
|
| 535 |
$ hg log -G anotherlarge |
| 536 |
@ changeset: 1:9627a577c5e9 |
| 537 |
| tag: tip |
| 538 |
~ user: test |
| 539 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 540 |
summary: anotherlarge |
| 541 |
|
| 542 |
|
| 543 |
$ hg log glob:another* |
| 544 |
changeset: 1:9627a577c5e9 |
| 545 |
tag: tip |
| 546 |
user: test |
| 547 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 548 |
summary: anotherlarge |
| 549 |
|
| 550 |
$ hg --debug log -T '{rev}: {desc}\n' -G glob:another* |
| 551 |
updated patterns: glob:../.hglf/sub/another*, glob:another* |
| 552 |
@ 1: anotherlarge |
| 553 |
| |
| 554 |
~ |
| 555 |
|
| 556 |
#if no-msys |
| 557 |
$ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys |
| 558 |
updated patterns: glob:../.hglf/sub/another* |
| 559 |
1: anotherlarge |
| 560 |
|
| 561 |
$ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys |
| 562 |
updated patterns: glob:../.hglf/sub/another* |
| 563 |
@ 1: anotherlarge |
| 564 |
| |
| 565 |
~ |
| 566 |
#endif |
| 567 |
|
| 568 |
$ echo more >> anotherlarge |
| 569 |
$ hg st . |
| 570 |
M anotherlarge |
| 571 |
$ hg cat anotherlarge |
| 572 |
anotherlarge |
| 573 |
$ hg revert anotherlarge |
| 574 |
$ hg st |
| 575 |
? sub/anotherlarge.orig |
| 576 |
|
| 577 |
Test orig files go where we want them |
| 578 |
$ echo moremore >> anotherlarge |
| 579 |
$ hg revert anotherlarge -v --config 'ui.origbackuppath=.hg/origbackups' |
| 580 |
creating directory: $TESTTMP/addrm2/.hg/origbackups/.hglf/sub |
| 581 |
saving current version of ../.hglf/sub/anotherlarge as ../.hg/origbackups/.hglf/sub/anotherlarge |
| 582 |
reverting ../.hglf/sub/anotherlarge |
| 583 |
creating directory: $TESTTMP/addrm2/.hg/origbackups/sub |
| 584 |
found 90c622cf65cebe75c5842f9136c459333faf392e in store |
| 585 |
found 90c622cf65cebe75c5842f9136c459333faf392e in store |
| 586 |
$ ls ../.hg/origbackups/sub |
| 587 |
anotherlarge |
| 588 |
$ cd .. |
| 589 |
|
| 590 |
Test glob logging from the root dir |
| 591 |
$ hg log glob:**another* |
| 592 |
changeset: 1:9627a577c5e9 |
| 593 |
tag: tip |
| 594 |
user: test |
| 595 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 596 |
summary: anotherlarge |
| 597 |
|
| 598 |
$ hg log -G glob:**another* |
| 599 |
@ changeset: 1:9627a577c5e9 |
| 600 |
| tag: tip |
| 601 |
~ user: test |
| 602 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 603 |
summary: anotherlarge |
| 604 |
|
| 605 |
|
| 606 |
$ cd .. |
| 607 |
|
| 608 |
Log from outer space |
| 609 |
$ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge' |
| 610 |
updated patterns: addrm2/.hglf/sub/anotherlarge, addrm2/sub/anotherlarge |
| 611 |
1: anotherlarge |
| 612 |
$ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge' |
| 613 |
updated patterns: addrm2/.hglf/sub/anotherlarge |
| 614 |
1: anotherlarge |
| 615 |
|
| 616 |
|
| 617 |
Check error message while exchange |
| 618 |
========================================================= |
| 619 |
|
| 620 |
issue3651: summary/outgoing with largefiles shows "no remote repo" |
| 621 |
unexpectedly |
| 622 |
|
| 623 |
$ mkdir issue3651 |
| 624 |
$ cd issue3651 |
| 625 |
|
| 626 |
$ hg init src |
| 627 |
$ echo a > src/a |
| 628 |
$ hg -R src add --large src/a |
| 629 |
$ hg -R src commit -m '#0' |
| 630 |
Invoking status precommit hook |
| 631 |
A a |
| 632 |
|
| 633 |
check messages when no remote repository is specified: |
| 634 |
"no remote repo" route for "hg outgoing --large" is not tested here, |
| 635 |
because it can't be reproduced easily. |
| 636 |
|
| 637 |
$ hg init clone1 |
| 638 |
$ hg -R clone1 -q pull src |
| 639 |
$ hg -R clone1 -q update |
| 640 |
$ hg -R clone1 paths | grep default |
| 641 |
[1] |
| 642 |
|
| 643 |
$ hg -R clone1 summary --large |
| 644 |
parent: 0:fc0bd45326d3 tip |
| 645 |
#0 |
| 646 |
branch: default |
| 647 |
commit: (clean) |
| 648 |
update: (current) |
| 649 |
phases: 1 draft |
| 650 |
largefiles: (no remote repo) |
| 651 |
|
| 652 |
check messages when there is no files to upload: |
| 653 |
|
| 654 |
$ hg -q clone src clone2 |
| 655 |
$ hg -R clone2 paths | grep default |
| 656 |
default = $TESTTMP/issue3651/src |
| 657 |
|
| 658 |
$ hg -R clone2 summary --large |
| 659 |
parent: 0:fc0bd45326d3 tip |
| 660 |
#0 |
| 661 |
branch: default |
| 662 |
commit: (clean) |
| 663 |
update: (current) |
| 664 |
phases: 1 draft |
| 665 |
largefiles: (no files to upload) |
| 666 |
$ hg -R clone2 outgoing --large |
| 667 |
comparing with $TESTTMP/issue3651/src |
| 668 |
searching for changes |
| 669 |
no changes found |
| 670 |
largefiles: no files to upload |
| 671 |
[1] |
| 672 |
|
| 673 |
$ hg -R clone2 outgoing --large --graph --template "{rev}" |
| 674 |
comparing with $TESTTMP/issue3651/src |
| 675 |
searching for changes |
| 676 |
no changes found |
| 677 |
largefiles: no files to upload |
| 678 |
[1] |
| 679 |
|
| 680 |
check messages when there are files to upload: |
| 681 |
|
| 682 |
$ echo b > clone2/b |
| 683 |
$ hg -R clone2 add --large clone2/b |
| 684 |
$ hg -R clone2 commit -m '#1' |
| 685 |
Invoking status precommit hook |
| 686 |
A b |
| 687 |
$ hg -R clone2 summary --large |
| 688 |
parent: 1:1acbe71ce432 tip |
| 689 |
#1 |
| 690 |
branch: default |
| 691 |
commit: (clean) |
| 692 |
update: (current) |
| 693 |
phases: 2 draft |
| 694 |
largefiles: 1 entities for 1 files to upload |
| 695 |
$ hg -R clone2 outgoing --large |
| 696 |
comparing with $TESTTMP/issue3651/src |
| 697 |
searching for changes |
| 698 |
changeset: 1:1acbe71ce432 |
| 699 |
tag: tip |
| 700 |
user: test |
| 701 |
date: Thu Jan 01 00:00:00 1970 +0000 |
| 702 |
summary: #1 |
| 703 |
|
| 704 |
largefiles to upload (1 entities): |
| 705 |
b |
| 706 |
|
| 707 |
$ hg -R clone2 outgoing --large --graph --template "{rev}" |
| 708 |
comparing with $TESTTMP/issue3651/src |
| 709 |
searching for changes |
| 710 |
@ 1 |
| 711 |
|
| 712 |
largefiles to upload (1 entities): |
| 713 |
b |
| 714 |
|
| 715 |
|
| 716 |
$ cp clone2/b clone2/b1 |
| 717 |
$ cp clone2/b clone2/b2 |
| 718 |
$ hg -R clone2 add --large clone2/b1 clone2/b2 |
| 719 |
$ hg -R clone2 commit -m '#2: add largefiles referring same entity' |
| 720 |
Invoking status precommit hook |
| 721 |
A b1 |
| 722 |
A b2 |
| 723 |
$ hg -R clone2 summary --large |
| 724 |
parent: 2:6095d0695d70 tip |
| 725 |
#2: add largefiles referring same entity |
| 726 |
branch: default |
| 727 |
commit: (clean) |
| 728 |
update: (current) |
| 729 |
phases: 3 draft |
| 730 |
largefiles: 1 entities for 3 files to upload |
| 731 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
| 732 |
comparing with $TESTTMP/issue3651/src |
| 733 |
searching for changes |
| 734 |
1:1acbe71ce432 |
| 735 |
2:6095d0695d70 |
| 736 |
largefiles to upload (1 entities): |
| 737 |
b |
| 738 |
b1 |
| 739 |
b2 |
| 740 |
|
| 741 |
$ hg -R clone2 cat -r 1 clone2/.hglf/b |
| 742 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 743 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true |
| 744 |
comparing with $TESTTMP/issue3651/src |
| 745 |
query 1; heads |
| 746 |
searching for changes |
| 747 |
all remote heads known locally |
| 748 |
1:1acbe71ce432 |
| 749 |
2:6095d0695d70 |
| 750 |
finding outgoing largefiles: 0/2 revisions (0.00%) |
| 751 |
finding outgoing largefiles: 1/2 revisions (50.00%) |
| 752 |
largefiles to upload (1 entities): |
| 753 |
b |
| 754 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 755 |
b1 |
| 756 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 757 |
b2 |
| 758 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 759 |
|
| 760 |
|
| 761 |
$ echo bbb > clone2/b |
| 762 |
$ hg -R clone2 commit -m '#3: add new largefile entity as existing file' |
| 763 |
Invoking status precommit hook |
| 764 |
M b |
| 765 |
$ echo bbbb > clone2/b |
| 766 |
$ hg -R clone2 commit -m '#4: add new largefile entity as existing file' |
| 767 |
Invoking status precommit hook |
| 768 |
M b |
| 769 |
$ cp clone2/b1 clone2/b |
| 770 |
$ hg -R clone2 commit -m '#5: refer existing largefile entity again' |
| 771 |
Invoking status precommit hook |
| 772 |
M b |
| 773 |
$ hg -R clone2 summary --large |
| 774 |
parent: 5:036794ea641c tip |
| 775 |
#5: refer existing largefile entity again |
| 776 |
branch: default |
| 777 |
commit: (clean) |
| 778 |
update: (current) |
| 779 |
phases: 6 draft |
| 780 |
largefiles: 3 entities for 3 files to upload |
| 781 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
| 782 |
comparing with $TESTTMP/issue3651/src |
| 783 |
searching for changes |
| 784 |
1:1acbe71ce432 |
| 785 |
2:6095d0695d70 |
| 786 |
3:7983dce246cc |
| 787 |
4:233f12ada4ae |
| 788 |
5:036794ea641c |
| 789 |
largefiles to upload (3 entities): |
| 790 |
b |
| 791 |
b1 |
| 792 |
b2 |
| 793 |
|
| 794 |
$ hg -R clone2 cat -r 3 clone2/.hglf/b |
| 795 |
c801c9cfe94400963fcb683246217d5db77f9a9a |
| 796 |
$ hg -R clone2 cat -r 4 clone2/.hglf/b |
| 797 |
13f9ed0898e315bf59dc2973fec52037b6f441a2 |
| 798 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true |
| 799 |
comparing with $TESTTMP/issue3651/src |
| 800 |
query 1; heads |
| 801 |
searching for changes |
| 802 |
all remote heads known locally |
| 803 |
1:1acbe71ce432 |
| 804 |
2:6095d0695d70 |
| 805 |
3:7983dce246cc |
| 806 |
4:233f12ada4ae |
| 807 |
5:036794ea641c |
| 808 |
finding outgoing largefiles: 0/5 revisions (0.00%) |
| 809 |
finding outgoing largefiles: 1/5 revisions (20.00%) |
| 810 |
finding outgoing largefiles: 2/5 revisions (40.00%) |
| 811 |
finding outgoing largefiles: 3/5 revisions (60.00%) |
| 812 |
finding outgoing largefiles: 4/5 revisions (80.00%) |
| 813 |
largefiles to upload (3 entities): |
| 814 |
b |
| 815 |
13f9ed0898e315bf59dc2973fec52037b6f441a2 |
| 816 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 817 |
c801c9cfe94400963fcb683246217d5db77f9a9a |
| 818 |
b1 |
| 819 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 820 |
b2 |
| 821 |
89e6c98d92887913cadf06b2adb97f26cde4849b |
| 822 |
|
| 823 |
|
| 824 |
Pushing revision #1 causes uploading entity 89e6c98d9288, which is |
| 825 |
shared also by largefiles b1, b2 in revision #2 and b in revision #5. |
| 826 |
|
| 827 |
Then, entity 89e6c98d9288 is not treated as "outgoing entity" at "hg |
| 828 |
summary" and "hg outgoing", even though files in outgoing revision #2 |
| 829 |
and #5 refer it. |
| 830 |
|
| 831 |
$ hg -R clone2 push -r 1 -q |
| 832 |
$ hg -R clone2 summary --large |
| 833 |
parent: 5:036794ea641c tip |
| 834 |
#5: refer existing largefile entity again |
| 835 |
branch: default |
| 836 |
commit: (clean) |
| 837 |
update: (current) |
| 838 |
phases: 6 draft |
| 839 |
largefiles: 2 entities for 1 files to upload |
| 840 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" |
| 841 |
comparing with $TESTTMP/issue3651/src |
| 842 |
searching for changes |
| 843 |
2:6095d0695d70 |
| 844 |
3:7983dce246cc |
| 845 |
4:233f12ada4ae |
| 846 |
5:036794ea641c |
| 847 |
largefiles to upload (2 entities): |
| 848 |
b |
| 849 |
|
| 850 |
$ hg -R clone2 outgoing --large -T "{rev}:{node|short}\n" --debug --config progress.debug=true |
| 851 |
comparing with $TESTTMP/issue3651/src |
| 852 |
query 1; heads |
| 853 |
searching for changes |
| 854 |
all remote heads known locally |
| 855 |
2:6095d0695d70 |
| 856 |
3:7983dce246cc |
| 857 |
4:233f12ada4ae |
| 858 |
5:036794ea641c |
| 859 |
finding outgoing largefiles: 0/4 revisions (0.00%) |
| 860 |
finding outgoing largefiles: 1/4 revisions (25.00%) |
| 861 |
finding outgoing largefiles: 2/4 revisions (50.00%) |
| 862 |
finding outgoing largefiles: 3/4 revisions (75.00%) |
| 863 |
largefiles to upload (2 entities): |
| 864 |
b |
| 865 |
13f9ed0898e315bf59dc2973fec52037b6f441a2 |
| 866 |
c801c9cfe94400963fcb683246217d5db77f9a9a |
| 867 |
|
| 868 |
|
| 869 |
$ cd .. |
| 870 |
|
| 871 |
merge action 'd' for 'local renamed directory to d2/g' which has no filename |
| 872 |
================================================================================== |
| 873 |
|
| 874 |
$ hg init merge-action |
| 875 |
$ cd merge-action |
| 876 |
$ touch l |
| 877 |
$ hg add --large l |
| 878 |
$ mkdir d1 |
| 879 |
$ touch d1/f |
| 880 |
$ hg ci -Aqm0 |
| 881 |
Invoking status precommit hook |
| 882 |
A d1/f |
| 883 |
A l |
| 884 |
$ echo > d1/f |
| 885 |
$ touch d1/g |
| 886 |
$ hg ci -Aqm1 |
| 887 |
Invoking status precommit hook |
| 888 |
M d1/f |
| 889 |
A d1/g |
| 890 |
$ hg up -qr0 |
| 891 |
$ hg mv d1 d2 |
| 892 |
moving d1/f to d2/f |
| 893 |
$ hg ci -qm2 |
| 894 |
Invoking status precommit hook |
| 895 |
A d2/f |
| 896 |
R d1/f |
| 897 |
$ hg merge |
| 898 |
merging d2/f and d1/f to d2/f |
| 899 |
1 files updated, 1 files merged, 0 files removed, 0 files unresolved |
| 900 |
(branch merge, don't forget to commit) |
| 901 |
$ cd .. |
| 902 |
|
| 903 |
|
| 904 |
Merge conflicts: |
| 905 |
===================== |
| 906 |
|
| 907 |
$ hg init merge |
| 908 |
$ cd merge |
| 909 |
$ echo 0 > f-different |
| 910 |
$ echo 0 > f-same |
| 911 |
$ echo 0 > f-unchanged-1 |
| 912 |
$ echo 0 > f-unchanged-2 |
| 913 |
$ hg add --large * |
| 914 |
$ hg ci -m0 |
| 915 |
Invoking status precommit hook |
| 916 |
A f-different |
| 917 |
A f-same |
| 918 |
A f-unchanged-1 |
| 919 |
A f-unchanged-2 |
| 920 |
$ echo tmp1 > f-unchanged-1 |
| 921 |
$ echo tmp1 > f-unchanged-2 |
| 922 |
$ echo tmp1 > f-same |
| 923 |
$ hg ci -m1 |
| 924 |
Invoking status precommit hook |
| 925 |
M f-same |
| 926 |
M f-unchanged-1 |
| 927 |
M f-unchanged-2 |
| 928 |
$ echo 2 > f-different |
| 929 |
$ echo 0 > f-unchanged-1 |
| 930 |
$ echo 1 > f-unchanged-2 |
| 931 |
$ echo 1 > f-same |
| 932 |
$ hg ci -m2 |
| 933 |
Invoking status precommit hook |
| 934 |
M f-different |
| 935 |
M f-same |
| 936 |
M f-unchanged-1 |
| 937 |
M f-unchanged-2 |
| 938 |
$ hg up -qr0 |
| 939 |
$ echo tmp2 > f-unchanged-1 |
| 940 |
$ echo tmp2 > f-unchanged-2 |
| 941 |
$ echo tmp2 > f-same |
| 942 |
$ hg ci -m3 |
| 943 |
Invoking status precommit hook |
| 944 |
M f-same |
| 945 |
M f-unchanged-1 |
| 946 |
M f-unchanged-2 |
| 947 |
created new head |
| 948 |
$ echo 1 > f-different |
| 949 |
$ echo 1 > f-unchanged-1 |
| 950 |
$ echo 0 > f-unchanged-2 |
| 951 |
$ echo 1 > f-same |
| 952 |
$ hg ci -m4 |
| 953 |
Invoking status precommit hook |
| 954 |
M f-different |
| 955 |
M f-same |
| 956 |
M f-unchanged-1 |
| 957 |
M f-unchanged-2 |
| 958 |
$ hg merge |
| 959 |
largefile f-different has a merge conflict |
| 960 |
ancestor was 09d2af8dd22201dd8d48e5dcfcaed281ff9422c7 |
| 961 |
you can keep (l)ocal e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e or take (o)ther 7448d8798a4380162d4b56f9b452e2f6f9e24e7a. |
| 962 |
what do you want to do? l |
| 963 |
getting changed largefiles |
| 964 |
1 largefiles updated, 0 removed |
| 965 |
1 files updated, 3 files merged, 0 files removed, 0 files unresolved |
| 966 |
(branch merge, don't forget to commit) |
| 967 |
$ cat f-different |
| 968 |
1 |
| 969 |
$ cat f-same |
| 970 |
1 |
| 971 |
$ cat f-unchanged-1 |
| 972 |
1 |
| 973 |
$ cat f-unchanged-2 |
| 974 |
1 |
| 975 |
$ cd .. |
| 976 |
|
| 977 |
Test largefile insulation (do not enabled a side effect |
| 978 |
======================================================== |
| 979 |
|
| 980 |
Check whether "largefiles" feature is supported only in repositories |
| 981 |
enabling largefiles extension. |
| 982 |
|
| 983 |
$ mkdir individualenabling |
| 984 |
$ cd individualenabling |
| 985 |
|
| 986 |
$ hg init enabledlocally |
| 987 |
$ echo large > enabledlocally/large |
| 988 |
$ hg -R enabledlocally add --large enabledlocally/large |
| 989 |
$ hg -R enabledlocally commit -m '#0' |
| 990 |
Invoking status precommit hook |
| 991 |
A large |
| 992 |
|
| 993 |
$ hg init notenabledlocally |
| 994 |
$ echo large > notenabledlocally/large |
| 995 |
$ hg -R notenabledlocally add --large notenabledlocally/large |
| 996 |
$ hg -R notenabledlocally commit -m '#0' |
| 997 |
Invoking status precommit hook |
| 998 |
A large |
| 999 |
|
| 1000 |
$ cat >> $HGRCPATH <<EOF |
| 1001 |
> [extensions] |
| 1002 |
> # disable globally |
| 1003 |
> largefiles=! |
| 1004 |
> EOF |
| 1005 |
$ cat >> enabledlocally/.hg/hgrc <<EOF |
| 1006 |
> [extensions] |
| 1007 |
> # enable locally |
| 1008 |
> largefiles= |
| 1009 |
> EOF |
| 1010 |
$ hg -R enabledlocally root |
| 1011 |
$TESTTMP/individualenabling/enabledlocally |
| 1012 |
$ hg -R notenabledlocally root |
| 1013 |
abort: repository requires features unknown to this Mercurial: largefiles |
| 1014 |
(see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
| 1015 |
[255] |
| 1016 |
|
| 1017 |
$ hg init push-dst |
| 1018 |
$ hg -R enabledlocally push push-dst |
| 1019 |
pushing to push-dst |
| 1020 |
abort: required features are not supported in the destination: largefiles |
| 1021 |
[255] |
| 1022 |
|
| 1023 |
$ hg init pull-src |
| 1024 |
$ hg -R pull-src pull enabledlocally |
| 1025 |
pulling from enabledlocally |
| 1026 |
abort: required features are not supported in the destination: largefiles |
| 1027 |
[255] |
| 1028 |
|
| 1029 |
$ hg clone enabledlocally clone-dst |
| 1030 |
abort: repository requires features unknown to this Mercurial: largefiles |
| 1031 |
(see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
| 1032 |
[255] |
| 1033 |
$ test -d clone-dst |
| 1034 |
[1] |
| 1035 |
$ hg clone --pull enabledlocally clone-pull-dst |
| 1036 |
abort: required features are not supported in the destination: largefiles |
| 1037 |
[255] |
| 1038 |
$ test -d clone-pull-dst |
| 1039 |
[1] |
| 1040 |
|
| 1041 |
#if serve |
| 1042 |
|
| 1043 |
Test largefiles specific peer setup, when largefiles is enabled |
| 1044 |
locally (issue4109) |
| 1045 |
|
| 1046 |
$ hg showconfig extensions | grep largefiles |
| 1047 |
extensions.largefiles=! |
| 1048 |
$ mkdir -p $TESTTMP/individualenabling/usercache |
| 1049 |
|
| 1050 |
$ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid |
| 1051 |
$ cat hg.pid >> $DAEMON_PIDS |
| 1052 |
|
| 1053 |
$ hg init pull-dst |
| 1054 |
$ cat > pull-dst/.hg/hgrc <<EOF |
| 1055 |
> [extensions] |
| 1056 |
> # enable locally |
| 1057 |
> largefiles= |
| 1058 |
> [largefiles] |
| 1059 |
> # ignore system cache to force largefiles specific wire proto access |
| 1060 |
> usercache=$TESTTMP/individualenabling/usercache |
| 1061 |
> EOF |
| 1062 |
$ hg -R pull-dst -q pull -u http://localhost:$HGPORT |
| 1063 |
|
| 1064 |
$ killdaemons.py |
| 1065 |
#endif |
| 1066 |
|
| 1067 |
Test overridden functions work correctly even for repos disabling |
| 1068 |
largefiles (issue4547) |
| 1069 |
|
| 1070 |
$ hg showconfig extensions | grep largefiles |
| 1071 |
extensions.largefiles=! |
| 1072 |
|
| 1073 |
(test updating implied by clone) |
| 1074 |
|
| 1075 |
$ hg init enabled-but-no-largefiles |
| 1076 |
$ echo normal1 > enabled-but-no-largefiles/normal1 |
| 1077 |
$ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal1 |
| 1078 |
$ hg -R enabled-but-no-largefiles commit -m '#0@enabled-but-no-largefiles' |
| 1079 |
Invoking status precommit hook |
| 1080 |
A normal1 |
| 1081 |
$ cat >> enabled-but-no-largefiles/.hg/hgrc <<EOF |
| 1082 |
> [extensions] |
| 1083 |
> # enable locally |
| 1084 |
> largefiles= |
| 1085 |
> EOF |
| 1086 |
$ hg clone -q enabled-but-no-largefiles no-largefiles |
| 1087 |
|
| 1088 |
$ echo normal2 > enabled-but-no-largefiles/normal2 |
| 1089 |
$ hg -R enabled-but-no-largefiles add enabled-but-no-largefiles/normal2 |
| 1090 |
$ hg -R enabled-but-no-largefiles commit -m '#1@enabled-but-no-largefiles' |
| 1091 |
Invoking status precommit hook |
| 1092 |
A normal2 |
| 1093 |
|
| 1094 |
$ echo normal3 > no-largefiles/normal3 |
| 1095 |
$ hg -R no-largefiles add no-largefiles/normal3 |
| 1096 |
$ hg -R no-largefiles commit -m '#1@no-largefiles' |
| 1097 |
Invoking status precommit hook |
| 1098 |
A normal3 |
| 1099 |
|
| 1100 |
$ hg -R no-largefiles -q pull --rebase |
| 1101 |
Invoking status precommit hook |
| 1102 |
A normal3 |
| 1103 |
|
| 1104 |
(test reverting) |
| 1105 |
|
| 1106 |
$ hg init subrepo-root |
| 1107 |
$ cat >> subrepo-root/.hg/hgrc <<EOF |
| 1108 |
> [extensions] |
| 1109 |
> # enable locally |
| 1110 |
> largefiles= |
| 1111 |
> EOF |
| 1112 |
$ echo large > subrepo-root/large |
| 1113 |
$ mkdir -p subrepo-root/dir/subdir |
| 1114 |
$ echo large2 > subrepo-root/dir/subdir/large.bin |
| 1115 |
$ hg -R subrepo-root add --large subrepo-root/large subrepo-root/dir/subdir/large.bin |
| 1116 |
$ hg clone -q no-largefiles subrepo-root/no-largefiles |
| 1117 |
$ cat > subrepo-root/.hgsub <<EOF |
| 1118 |
> no-largefiles = no-largefiles |
| 1119 |
> EOF |
| 1120 |
$ hg -R subrepo-root add subrepo-root/.hgsub |
| 1121 |
$ hg -R subrepo-root commit -m '#0' |
| 1122 |
Invoking status precommit hook |
| 1123 |
A .hgsub |
| 1124 |
A dir/subdir/large.bin |
| 1125 |
A large |
| 1126 |
? .hgsubstate |
| 1127 |
$ echo dirty >> subrepo-root/large |
| 1128 |
$ echo dirty >> subrepo-root/no-largefiles/normal1 |
| 1129 |
$ hg -R subrepo-root status -S |
| 1130 |
M large |
| 1131 |
M no-largefiles/normal1 |
| 1132 |
$ hg -R subrepo-root extdiff -p echo -S --config extensions.extdiff= |
| 1133 |
"*\\no-largefiles\\normal1" "*\\no-largefiles\\normal1" (glob) (windows !) |
| 1134 |
*/no-largefiles/normal1 */no-largefiles/normal1 (glob) (no-windows !) |
| 1135 |
[1] |
| 1136 |
$ hg -R subrepo-root revert --all |
| 1137 |
reverting subrepo-root/.hglf/large |
| 1138 |
reverting subrepo no-largefiles |
| 1139 |
reverting subrepo-root/no-largefiles/normal1 |
| 1140 |
|
| 1141 |
Move (and then undo) a directory move with only largefiles. |
| 1142 |
|
| 1143 |
$ cd subrepo-root |
| 1144 |
$ "$PYTHON" $TESTDIR/list-tree.py .hglf dir* large* |
| 1145 |
.hglf/ |
| 1146 |
.hglf/dir/ |
| 1147 |
.hglf/dir/subdir/ |
| 1148 |
.hglf/dir/subdir/large.bin |
| 1149 |
.hglf/large |
| 1150 |
dir/ |
| 1151 |
dir/subdir/ |
| 1152 |
dir/subdir/large.bin |
| 1153 |
large |
| 1154 |
large.orig |
| 1155 |
|
| 1156 |
$ hg mv dir/subdir dir/subdir2 |
| 1157 |
moving .hglf/dir/subdir/large.bin to .hglf/dir/subdir2/large.bin |
| 1158 |
|
| 1159 |
$ "$PYTHON" $TESTDIR/list-tree.py .hglf dir* large* |
| 1160 |
.hglf/ |
| 1161 |
.hglf/dir/ |
| 1162 |
.hglf/dir/subdir2/ |
| 1163 |
.hglf/dir/subdir2/large.bin |
| 1164 |
.hglf/large |
| 1165 |
dir/ |
| 1166 |
dir/subdir2/ |
| 1167 |
dir/subdir2/large.bin |
| 1168 |
large |
| 1169 |
large.orig |
| 1170 |
$ hg status -C |
| 1171 |
A dir/subdir2/large.bin |
| 1172 |
dir/subdir/large.bin |
| 1173 |
R dir/subdir/large.bin |
| 1174 |
? large.orig |
| 1175 |
|
| 1176 |
$ echo 'modified' > dir/subdir2/large.bin |
| 1177 |
$ hg status -C |
| 1178 |
A dir/subdir2/large.bin |
| 1179 |
dir/subdir/large.bin |
| 1180 |
R dir/subdir/large.bin |
| 1181 |
? large.orig |
| 1182 |
|
| 1183 |
$ hg revert --all |
| 1184 |
forgetting .hglf/dir/subdir2/large.bin |
| 1185 |
undeleting .hglf/dir/subdir/large.bin |
| 1186 |
reverting subrepo no-largefiles |
| 1187 |
|
| 1188 |
$ hg status -C |
| 1189 |
? dir/subdir2/large.bin |
| 1190 |
? large.orig |
| 1191 |
|
| 1192 |
The content of the forgotten file shouldn't be clobbered |
| 1193 |
|
| 1194 |
$ cat dir/subdir2/large.bin |
| 1195 |
modified |
| 1196 |
|
| 1197 |
The standin for subdir2 should be deleted, not just dropped |
| 1198 |
|
| 1199 |
$ "$PYTHON" $TESTDIR/list-tree.py .hglf dir* large* |
| 1200 |
.hglf/ |
| 1201 |
.hglf/dir/ |
| 1202 |
.hglf/dir/subdir/ |
| 1203 |
.hglf/dir/subdir/large.bin |
| 1204 |
.hglf/large |
| 1205 |
dir/ |
| 1206 |
dir/subdir/ |
| 1207 |
dir/subdir/large.bin |
| 1208 |
dir/subdir2/ |
| 1209 |
dir/subdir2/large.bin |
| 1210 |
large |
| 1211 |
large.orig |
| 1212 |
|
| 1213 |
$ rm -r dir/subdir2 |
| 1214 |
|
| 1215 |
'subdir' should not be in the destination. It would be if the subdir2 directory |
| 1216 |
existed under .hglf/. |
| 1217 |
$ hg mv dir/subdir dir/subdir2 |
| 1218 |
moving .hglf/dir/subdir/large.bin to .hglf/dir/subdir2/large.bin |
| 1219 |
|
| 1220 |
$ hg status -C |
| 1221 |
A dir/subdir2/large.bin |
| 1222 |
dir/subdir/large.bin |
| 1223 |
R dir/subdir/large.bin |
| 1224 |
? large.orig |
| 1225 |
|
| 1226 |
$ "$PYTHON" $TESTDIR/list-tree.py .hglf dir* large* |
| 1227 |
.hglf/ |
| 1228 |
.hglf/dir/ |
| 1229 |
.hglf/dir/subdir2/ |
| 1230 |
.hglf/dir/subdir2/large.bin |
| 1231 |
.hglf/large |
| 1232 |
dir/ |
| 1233 |
dir/subdir2/ |
| 1234 |
dir/subdir2/large.bin |
| 1235 |
large |
| 1236 |
large.orig |
| 1237 |
|
| 1238 |
Start from scratch, and rename something other than the final path component. |
| 1239 |
|
| 1240 |
$ hg up -qC . |
| 1241 |
$ hg --config extensions.purge= purge |
| 1242 |
|
| 1243 |
$ hg mv dir/subdir dir2/subdir |
| 1244 |
moving .hglf/dir/subdir/large.bin to .hglf/dir2/subdir/large.bin |
| 1245 |
|
| 1246 |
$ hg status -C |
| 1247 |
A dir2/subdir/large.bin |
| 1248 |
dir/subdir/large.bin |
| 1249 |
R dir/subdir/large.bin |
| 1250 |
|
| 1251 |
$ "$PYTHON" $TESTDIR/list-tree.py .hglf dir* large* |
| 1252 |
.hglf/ |
| 1253 |
.hglf/dir2/ |
| 1254 |
.hglf/dir2/subdir/ |
| 1255 |
.hglf/dir2/subdir/large.bin |
| 1256 |
.hglf/large |
| 1257 |
dir2/ |
| 1258 |
dir2/subdir/ |
| 1259 |
dir2/subdir/large.bin |
| 1260 |
large |
| 1261 |
|
| 1262 |
$ hg revert --all |
| 1263 |
forgetting .hglf/dir2/subdir/large.bin |
| 1264 |
undeleting .hglf/dir/subdir/large.bin |
| 1265 |
reverting subrepo no-largefiles |
| 1266 |
|
| 1267 |
$ hg status -C |
| 1268 |
? dir2/subdir/large.bin |
| 1269 |
|
| 1270 |
$ "$PYTHON" $TESTDIR/list-tree.py .hglf dir* large* |
| 1271 |
.hglf/ |
| 1272 |
.hglf/dir/ |
| 1273 |
.hglf/dir/subdir/ |
| 1274 |
.hglf/dir/subdir/large.bin |
| 1275 |
.hglf/large |
| 1276 |
dir/ |
| 1277 |
dir/subdir/ |
| 1278 |
dir/subdir/large.bin |
| 1279 |
dir2/ |
| 1280 |
dir2/subdir/ |
| 1281 |
dir2/subdir/large.bin |
| 1282 |
large |
| 1283 |
|
| 1284 |
$ cd ../.. |
| 1285 |
|
| 1286 |
Test "pull --rebase" when rebase is enabled before largefiles (issue3861) |
| 1287 |
========================================================================= |
| 1288 |
|
| 1289 |
$ hg showconfig extensions | grep largefiles |
| 1290 |
extensions.largefiles=! |
| 1291 |
|
| 1292 |
$ mkdir issue3861 |
| 1293 |
$ cd issue3861 |
| 1294 |
$ hg init src |
| 1295 |
$ hg clone -q src dst |
| 1296 |
$ echo a > src/a |
| 1297 |
$ hg -R src commit -Aqm "#0" |
| 1298 |
Invoking status precommit hook |
| 1299 |
A a |
| 1300 |
|
| 1301 |
$ cat >> dst/.hg/hgrc <<EOF |
| 1302 |
> [extensions] |
| 1303 |
> largefiles= |
| 1304 |
> EOF |
| 1305 |
$ hg -R dst pull --rebase |
| 1306 |
pulling from $TESTTMP/issue3861/src |
| 1307 |
requesting all changes |
| 1308 |
adding changesets |
| 1309 |
adding manifests |
| 1310 |
adding file changes |
| 1311 |
added 1 changesets with 1 changes to 1 files |
| 1312 |
new changesets bf5e395ced2c (1 drafts) |
| 1313 |
nothing to rebase - updating instead |
| 1314 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
| 1315 |
|
| 1316 |
$ cd .. |