diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py index 2446b63c89ec82e07cb8e94561b83265d34b932f_aGdleHQvbGFyZ2VmaWxlcy9vdmVycmlkZXMucHk=..25248e2ebaee2b2e718fc5f3456fdb4c593ac883_aGdleHQvbGFyZ2VmaWxlcy9vdmVycmlkZXMucHk= 100644 --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -81,7 +81,7 @@ ui.warn(_('%s already a largefile\n') % f) continue - if exact or not exists: + if (exact or not exists) and not lfutil.isstandin(f): wfile = repo.wjoin(f) # In case the file was removed previously, but not committed diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t index 2446b63c89ec82e07cb8e94561b83265d34b932f_dGVzdHMvdGVzdC1sYXJnZWZpbGVzLnQ=..25248e2ebaee2b2e718fc5f3456fdb4c593ac883_dGVzdHMvdGVzdC1sYXJnZWZpbGVzLnQ= 100644 --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -383,7 +383,6 @@ $ cd .. $ hg -R a addremove removing sub/large4 - adding a/.hglf/testaddremove.dat as a largefile (glob) adding a/testaddremove.dat as a largefile (glob) removing normal3 adding normaladdremove @@ -489,6 +488,26 @@ C sub2/large6 C sub2/large7 +Test that a standin can't be added as a large file + + $ touch large + $ hg add --large large + $ hg ci -m "add" + Invoking status precommit hook + A large + Invoking status postcommit hook + C large + C normal + C normal3 + C sub/large4 + C sub/normal4 + C sub2/large6 + C sub2/large7 + $ hg remove large + $ touch large + $ hg addremove --config largefiles.patterns=**large --traceback + adding large as a largefile + $ cd ../a Clone a largefiles repo.