Bug 4241 - hg log does not see largefiles (unless given a .hglf prefix)
Summary: hg log does not see largefiles (unless given a .hglf prefix)
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: largefiles (show other bugs)
Version: 2.9.2
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 09:46 UTC by esskov
Modified: 2014-07-11 06:01 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description esskov 2014-05-08 09:46 UTC
It appears that hg log only sees a largefile (or a changeset with a largefile) if an absolute path is specified with a ".hglf/" prefix. That is not what I would have expected.

The following commands demonstrate the issue:

>mkdir a
>echo 123  1> a\mylargefile
>hg add --large a\mylargefile
>hg ci -m "first mylargefile"
>echo 456  1>> a\mylargefile
>hg ci -m "second mylargefile"

>mkdir b
>echo abc  1> b\myfile
>hg add b\myfile
>hg ci -m "first myfile"

>hg log a

>hg log b
changeset:   2:dcc6da420b71 [...]
summary:     first myfile

>hg log -r "file('a/**')"

>hg log -r "file('b/**')"
changeset:   2:dcc6da420b71 [...]
summary:     first myfile

>hg log -r "file('a/mylargefile')"

>hg log -r "file('b/myfile')"
changeset:   2:dcc6da420b71 [...]
summary:     first myfile

>hg log -v -r -2
changeset:   1:aa5390401595 [...]
files:       .hglf/a/mylargefile
description:
second mylargefile

>hg log .hglf/a/mylargefile
changeset:   1:aa5390401595 [...]
summary:     second mylargefile

changeset:   0:8fb73be7d3d5 [...]
summary:     first mylargefile
Comment 1 Matt Mackall 2014-05-08 10:04 UTC
I can confirm that the following forms don't work in 3.0:

hg log subdir/largefile
hg log subdir  # with only a largefile
hg log -r 'file("subdir/largefile")'
hg log -r 'file("subdir/**")'
Comment 2 kiilerix 2014-05-08 10:46 UTC
My general experience and http://selenic.com/hg/file/54d7657d7d1e/tests/test-largefiles.t#l2224 suggests that it in general works.

Can you provide a full example, preferably as a .t test.
Comment 3 Matt Mackall 2014-05-08 12:16 UTC
Mads, try inserting the tests I listed against sub2/large6 after this line:

http://selenic.com/hg/file/tip/tests/test-largefiles.t#l385
Comment 4 kiilerix 2014-05-08 13:57 UTC
At that place sub2/large6 wasn't committed. Log on an existing largefile worked as expected.

Log on a directory didn't match largefiles in it - a patch has been sent.

Filesets and largefiles do apparently not work together. I haven't investigated further. That is so far left as a todo.
Comment 5 HG Bot 2014-05-09 16:15 UTC
Fixed by http://selenic.com/repo/hg/rev/c7e9fb881a5a
Mads Kiilerich <madski@unity3d.com>
largefiles: include largefiles when doing log on a directory (issue4241)

The matchers _files had to include both the real root and the standin version
of the root.

(please test the fix)
Comment 6 esskov 2014-07-11 06:01 UTC
I confirm that the issue has been resolved (hg 3.0.2) when not using filesets (thanks!)

However, opening a Revision History on a directory with TortoiseHg will produce a filter on the form "file('path:xxx/yyy')". As a consequence of this bug any changesets involving (only) largefiles will NOT be listed. If the filter is then manually changed to "xxx/yyy" the history will be correct, but it's a work-around that's easy to forget :)

Would it be relevant to open a new bug ...?