diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -316,9 +316,14 @@ def overridelog(orig, ui, repo, *pats, * for i in range(0, len(m._files)): standin = lfutil.standin(m._files[i]) + # If the "standin" is a directory, append instead of replace to + # support naming a directory on the command line with only + # largefiles. The original directory is kept to support normal + # files. if standin in repo[ctx.node()]: m._files[i] = standin - elif m._files[i] not in repo[ctx.node()]: + elif m._files[i] not in repo[ctx.node()] \ + and repo.wvfs.isdir(standin): m._files.append(standin) pats.add(standin) diff --git a/tests/test-log.t b/tests/test-log.t --- a/tests/test-log.t +++ b/tests/test-log.t @@ -45,6 +45,13 @@ changeset graph $ hg mv dir/b e $ hg ci -me -d '5 0' +Make sure largefiles doesn't interfere with logging a regular file + $ hg log a --config extensions.largefiles= + changeset: 0:9161b9aeaf16 + user: test + date: Thu Jan 01 00:00:01 1970 +0000 + summary: a + $ hg log a changeset: 0:9161b9aeaf16 user: test @@ -1629,6 +1636,12 @@ hg log -f dir across branches | o a +Ensure that largefiles doesn't intefere with following a normal file + $ hg --config extensions.largefiles= log -f d -T '{desc}' -G + @ c + | + o a + $ hg log -f d/a -T '{desc}' -G @ c |