Bug 4334 - log --patch doesn't work when largefiles is enabled
Summary: log --patch doesn't work when largefiles is enabled
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: largefiles (show other bugs)
Version: 3.1
Hardware: PC Mac OS
: urgent bug
Assignee: Siddharth Agarwal
URL:
Keywords:
: 4120 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-13 02:47 UTC by Andrew Taumoefolau
Modified: 2015-01-22 15:04 UTC (History)
10 users (show)

See Also:
Python Version: ---


Attachments
Creates a repo, runs hg log -p with largefiles enabled (203 bytes, application/x-sh)
2014-08-13 03:11 UTC, Andrew Taumoefolau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Taumoefolau 2014-08-13 02:47 UTC
`hg log -p` no longer shows patches if the largefiles extension is enabled.

This is a regression between 3.0.1 and 3.1.
Comment 1 Pierre-Yves David 2014-08-13 02:50 UTC
I cannot reproduce. Can you provide us with a small list of step to reproduce (or even better a small script)
Comment 2 Andrew Taumoefolau 2014-08-13 03:11 UTC
Created attachment 1784 [details]
Creates a repo, runs hg log -p with largefiles enabled
Comment 3 Andrew Taumoefolau 2014-08-13 03:13 UTC
On 3.1 the attached script does not show patch data, tested on OS X 10.9 & Centos 6. Patch data is displayed as expected on 3.0.1.
Comment 4 Pierre-Yves David 2014-08-13 03:15 UTC
Hum, works better when I do not mis spell largefiles. I can reproduce:

  % 0:14 pyd@marginatus /tmp/babar > hg --config extensions.largefiles= log -p 
  changeset:   0:c976fad4e630
  tag:         tip
  user:        Pierre-Yves David <pierre-yves.david@fb.com>
  date:        Tue Aug 12 23:49:07 2014 -0700
  summary:     t
Comment 5 Pierre-Yves David 2014-08-13 03:18 UTC
Using `hg bisect` to narrow it down to the changesets that broke it in mercurial would be a good next step.

(adding Sean Farley that changed changectx code recently and mads kiilerich who currently maintains most of the largefile burden)
Comment 6 Andrew Taumoefolau 2014-08-13 06:39 UTC
This was my first time using bisect! Fun! The breaking changeset is 5809d62e7106.
Comment 7 Siddharth Agarwal 2014-08-13 11:52 UTC
yay largefiles
Comment 8 Matt Mackall 2014-08-13 12:13 UTC
Regression -> urgent

How did this get past our test suite?

$ grep -- --- tests/*largefiles*
$

I see.. not a single diff test. <facepalm>
Comment 9 Long Vu 2014-08-14 16:16 UTC
*** Bug 4120 has been marked as a duplicate of this bug. ***
Comment 10 Long Vu 2014-08-14 16:21 UTC
Problem was there since mercurial 2.5.4.

sh -x /tmp/largefiles.sh 
+ export HGRCPATH=
+ HGRCPATH=
+ mkdir largefilestest
+ cd largefilestest
/home/lvu/repos/trunk/largefilestest
+ hg init
+ echo foo
+ hg add
adding bar
+ hg ci -m 'adding bar' -u testuser
+ hg log -p --config extensions.largefiles=
changeset:   0:fa232aeb9c80
tag:         tip
user:        testuser
date:        Thu Aug 14 16:19:05 2014 -0400
summary:     adding bar

diff -r 000000000000 -r fa232aeb9c80 bar
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/bar       Thu Aug 14 16:19:05 2014 -0400
@@ -0,0 +1,1 @@
+foo

+ cd ..
+ rm -rf largefilestest
Comment 11 Siddharth Agarwal 2014-08-14 16:23 UTC
Yes, this is a semi-regression (it was always broken when largefiles were present -- in 3.1, it also broke when no largefiles were present). The patches I've sent to the mailing list should fix hg log --patch for both cases.
Comment 12 HG Bot 2014-08-14 17:30 UTC
Fixed by http://selenic.com/repo/hg/rev/1b9d0dc1bbe1
Siddharth Agarwal <sid0@fb.com>
largefiles: drop setting lfstatus in overridelog (issue4334)

lfstatus should only be True for operations where we want standins to be
printed out. We explicitly do not want that for historical operations like log.
Other historical operations like hg diff -r A -r B don't print out standins
either.

This is required to fix issue4334, but doesn't fix anything by itself. That's
why there aren't any tests accompanying this patch.

(please test the fix)
Comment 13 HG Bot 2014-08-14 17:30 UTC
Fixed by http://selenic.com/repo/hg/rev/35cc5b07b3fc
Siddharth Agarwal <sid0@fb.com>
largefiles: in overridelog, use non-lf matcher for patch generation (issue4334)

This has actually been broken since at least Mercurial 2.8 -- hg log --patch
with largefiles only used to work when no largefiles existed. Rev 5809d62e7106
exposed this bug for all cases.

(please test the fix)
Comment 14 HG Bot 2014-08-14 17:30 UTC
Fixed by http://selenic.com/repo/hg/rev/0e1b02f984c7
Siddharth Agarwal <sid0@fb.com>
largefiles: don't override matchandpats for always matchers (issue4334)

This makes hg log --follow --patch work, since in cmdutil._makelogrevset we
use the non-follow matcher for hg log --follow --patch with no file arguments.

(please test the fix)
Comment 15 Andrew Taumoefolau 2014-09-01 20:00 UTC
Works for me, thanks!
Comment 16 Matt Mackall 2015-01-22 15:04 UTC
Bulk testing -> fixed