diff tests/test-largefiles-update.t @ 26627:832c98d79587

largefiles: better handling of merge of largefiles that not are available Before, when merging revisions with missing largefiles, the missing largefiles would be fetched as a part of the merge. If that failed (for example because the main repository temporarily was unavailable), the largefile would be left missing. However, the next commit would abort and (seemed to) fail when markcommitted tried to mark the standin file as normal and thus had to hash the largefile that didn't exist. (Actually, the commit would succeed but the largefile update that follows right after the commit transaction would abort - quite confusing.) To fix that, make sure that synclfdirstate only marks files as normal if they actually exist.
author Mads Kiilerich <madski@unity3d.com>
date Mon, 12 Oct 2015 19:22:34 +0200
parents ef1eb6df7071
children 27b89a0957ec
line wrap: on
line diff
--- a/tests/test-largefiles-update.t	Sun Oct 11 22:13:03 2015 -0700
+++ b/tests/test-largefiles-update.t	Mon Oct 12 19:22:34 2015 +0200
@@ -140,6 +140,28 @@
   $ cat .hglf/large1
   58e24f733a964da346e2407a2bee99d9001184f5
 
+(merge non-existing largefiles from "other" via conflict prompt -
+make sure the following commit doesn't abort in a confusing way when trying to
+mark the non-existing file as normal in lfdirstate)
+
+  $ mv .hg/largefiles/58e24f733a964da346e2407a2bee99d9001184f5 .
+  $ hg update -q -C 3
+  $ hg merge --config largefiles.usercache=not --config debug.dirstate.delaywrite=2 --tool :local --config ui.interactive=True <<EOF
+  > o
+  > EOF
+  largefile large1 has a merge conflict
+  ancestor was 4669e532d5b2c093a78eca010077e708a071bb64
+  keep (l)ocal e5bb990443d6a92aaf7223813720f7566c9dd05b or
+  take (o)ther 58e24f733a964da346e2407a2bee99d9001184f5? o
+  getting changed largefiles
+  large1: largefile 58e24f733a964da346e2407a2bee99d9001184f5 not available from file:/*/$TESTTMP/repo (glob)
+  0 largefiles updated, 0 removed
+  0 files updated, 2 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg commit -m '1-2-3 testing'
+  $ hg rollback -q
+  $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/
+
 Test that "hg revert -r REV" updates largefiles from "REV" correctly
 
   $ hg update -q -C 3