Mercurial > hg
comparison tests/test-largefiles-update.t @ 22289:e26df4e774f6
largefiles: update largefiles even if transplant is aborted by conflict
Before this patch, largefiles in the working directory aren't updated
correctly, if transplant is aborted by conflict. This prevents users
from viewing appropriate largefiles while resolving conflicts.
While transplant, largefiles in the working directory are updated only
at successful committing in the special code path of
"lfilesrepo.commit()".
To update largefiles even if transplant is aborted by conflict, this
patch wraps "scmutil.marktouched", which is invoked from "patch.patch"
with "files" list of added/modified/deleted files.
This patch invokes "updatelfiles" with:
- "printmessage=False", to suppress "getting changed largefiles ..."
messages while automated committing by transplant
- "normallookup=True", because "patch.patch" doesn't update dirstate
for modified files
in such case, "normallookup=False" may cause marking modified
largefiles as "clean" unexpectedly
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 24 Aug 2014 23:47:26 +0900 |
parents | 4e2559841d6c |
children | 9ab18a912c44 |
comparison
equal
deleted
inserted
replaced
22288:4e2559841d6c | 22289:e26df4e774f6 |
---|---|
483 large1 in #1 | 483 large1 in #1 |
484 | 484 |
485 $ hg rebase -q --abort | 485 $ hg rebase -q --abort |
486 rebase aborted | 486 rebase aborted |
487 | 487 |
488 Test that transplant updates largefiles, of which standins are safely | |
489 changed, even if it is aborted by conflict of other. | |
490 | |
491 $ hg update -q -C 5 | |
492 $ cat .hglf/large1 | |
493 e5bb990443d6a92aaf7223813720f7566c9dd05b | |
494 $ cat large1 | |
495 large1 in #3 | |
496 $ hg diff -c 4 .hglf/largeX | grep '^[+-][0-9a-z]' | |
497 +fa44618ea25181aff4f48b70428294790cec9f61 | |
498 $ hg transplant 4 | |
499 applying 07d6153b5c04 | |
500 patching file .hglf/large1 | |
501 Hunk #1 FAILED at 0 | |
502 1 out of 1 hunks FAILED -- saving rejects to file .hglf/large1.rej | |
503 patch failed to apply | |
504 abort: fix up the merge and run hg transplant --continue | |
505 [255] | |
506 $ hg status -A large1 | |
507 C large1 | |
508 $ cat .hglf/large1 | |
509 e5bb990443d6a92aaf7223813720f7566c9dd05b | |
510 $ cat large1 | |
511 large1 in #3 | |
512 $ hg status -A largeX | |
513 A largeX | |
514 $ cat .hglf/largeX | |
515 fa44618ea25181aff4f48b70428294790cec9f61 | |
516 $ cat largeX | |
517 largeX | |
518 | |
488 $ cd .. | 519 $ cd .. |