diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -562,8 +562,11 @@ def updatestandinsbymatch(repo, match): for f in match._files: fstandin = standin(f) - # ignore known largefiles and standins - if f in lfiles or fstandin in standins: + # For largefiles, only one of the normal and standin should be + # committed (except if one of them is a remove). + # Thus, skip plain largefile names but keep the standin. + if (f in lfiles or fstandin in standins) and \ + repo.dirstate[f] != 'r' and repo.dirstate[fstandin] != 'r': continue actualfiles.append(f) diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1850,7 +1850,7 @@ the add and the remove is committed. .hglf/normal3 .hglf/sub2/large6 .hglf/sub2/large7 - normal3 + large4-renamed sub/normal4 $ cd ..