diff hgext/largefiles/lfutil.py @ 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 56b2bcea2529
children 4a82cb5c1dc8
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Sun Oct 11 22:13:03 2015 -0700
+++ b/hgext/largefiles/lfutil.py	Mon Oct 12 19:22:34 2015 +0200
@@ -399,7 +399,8 @@
     else:
         state, mtime = '?', -1
     if state == 'n':
-        if normallookup or mtime < 0:
+        if (normallookup or mtime < 0 or
+            not os.path.exists(repo.wjoin(lfile))):
             # state 'n' doesn't ensure 'clean' in this case
             lfdirstate.normallookup(lfile)
         else: