Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 22 Feb 2019 03:52:10 +0530] rev 41784
diff: make sure we output stat even when --git is not passed (
issue4037) (BC)
Before this patch, `hg diff --stat` will give an empty output. It will not show
the stat information. I debugged and found that the underlying code does not
return the diff header and due to that, other code paths fails to parse that as
a diff.
I looked into why we don't return diff headers in quiet mode and found the
behavior is from
8f8bb77d560e70bcc95577e4dfa877df18d876ab which does not have
any mention about why it is done. We also show the diff headers in git, so I
think it's fine showing diff header in normal diff in quiet mode.
Differential Revision: https://phab.mercurial-scm.org/D6007
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 23 Feb 2019 04:50:46 +0530] rev 41783
tests: add test to demonstrate
issue4037
`hg diff --stat -q --config diff.git=0` does not output anything whereas it
should print the stat. This is a quiet old bug dating to 2013 and looking at
code I think it exists it since 2005 or when --stat was introduced. The next
patch will fix the bug.
Differential Revision: https://phab.mercurial-scm.org/D6006
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jan 2019 11:07:46 -0800] rev 41782
grep: reuse getrenamedfn() from scmutil
My motivation is to reduce uses of filectx.renamed(). Reusing
scmutil.getrenamedfn() also means that we get some caching of copy
information per file and revision. I don't think that matters for `hg
grep` (I doubt it speeds up significantly, and I doubt it wastes
significant memory), but I'm not sure.
Differential Revision: https://phab.mercurial-scm.org/D6022
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 Feb 2019 10:54:29 -0800] rev 41781
templatekw: move getrenamedfn() to scmutil (API)
The function is already used by `hg log` (for following renames, not
for templates), so it seems it does not belong in templatekw.
Differential Revision: https://phab.mercurial-scm.org/D6021
Martin von Zweigbergk <martinvonz@google.com> [Sat, 23 Feb 2019 09:32:07 -0800] rev 41780
mq: get copy source from context object instead of from filelog
This removes dependence on filelog.renamed().
Differential Revision: https://phab.mercurial-scm.org/D6020
Martin von Zweigbergk <martinvonz@google.com> [Sat, 23 Feb 2019 09:30:49 -0800] rev 41779
mq: slightly modernize by using context object
Context objects have existed since mid-2006.
Differential Revision: https://phab.mercurial-scm.org/D6019
Martin von Zweigbergk <martinvonz@google.com> [Sat, 23 Feb 2019 09:15:36 -0800] rev 41778
absorb: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6018
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Feb 2019 15:28:04 -0800] rev 41777
fix: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6017
Martin von Zweigbergk <martinvonz@google.com> [Sun, 25 Mar 2018 22:07:35 -0700] rev 41776
memfilefromctx: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6016
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Dec 2017 22:32:27 -0800] rev 41775
largefiles: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6015
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Dec 2017 22:31:24 -0800] rev 41774
commit: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6014
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Dec 2017 22:31:00 -0800] rev 41773
tests: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6013
Martin von Zweigbergk <martinvonz@google.com> [Mon, 26 Mar 2018 10:41:42 -0700] rev 41772
templatekw: migrate to new method for getting copy info
Differential Revision: https://phab.mercurial-scm.org/D6012
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 Dec 2017 22:27:05 -0800] rev 41771
convert: migrate to new method for getting copy source
Differential Revision: https://phab.mercurial-scm.org/D6011
Martin von Zweigbergk <martinvonz@google.com> [Sun, 25 Mar 2018 21:30:31 -0700] rev 41770
context: move equivalent renamed() implementations to superclass
Now that renamed() in workingfilectx and in overlayfilectx are written
in terms of copysource(), they are functionally identical and can be
reused.
Differential Revision: https://phab.mercurial-scm.org/D6010