Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 23:56:59 -0800] rev 41647
diff: make `hg diff --root=subrepo` work
The root prefix is currently stripped before adding the subrepo
prefix. It seems to me that if you run `hg diff --root=subrepo` and a
subrepo/ path is visited (say "subrepo/foo"), then the path generated
for the diff would initially be just "foo" and we then fail (if the
developer warning is active) to strip the "subrepo/" from the path. It
seems like we should first add the prefix in order to produce a path
that's relative to the top-level repo, and then we can remove the root
prefix from that. There are no tests for this, it seems, and I don't
care enough to add one.
Differential Revision: https://phab.mercurial-scm.org/D5895
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 23:12:56 -0800] rev 41646
patch: replace "prefix" and "relroot" arguments by "pathfn" (API)
The two arguments serve a very similar purpose: "relroot" is stripped
from the front of the path, and then "prefix" (a subrepo path) is
added (also to the front). Passing in a function that does that is
more generic and will make it easier to respect ui.relative-paths in
later patches (don't worry, I'm not going to respect that option for
regular patches, only for --stat). I'm deliberately not calling it
"uipathfn", because it's generally for producing valid diffs
(including when prefix is non-empty), so things like using backslash
on Windows is not an option.
Differential Revision: https://phab.mercurial-scm.org/D5894
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:24:32 +0100] rev 41645
test: use `printenv.py --line` in `test-static-http.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:24:19 +0100] rev 41644
test: use `printenv.py --line` in `test-ssh.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:23:49 +0100] rev 41643
test: use `printenv.py --line` in `test-ssh-bundle1.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:23:29 +0100] rev 41642
test: use `printenv.py --line` in `test-push-http.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:22:20 +0100] rev 41641
test: use `printenv.py --line` in `test-https.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:20:35 +0100] rev 41640
test: use `printenv.py --line` in `test-http-bundle1.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:20:03 +0100] rev 41639
test: use `printenv.py --line` in `test-hook.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:19:43 +0100] rev 41638
test: use `printenv.py --line` in `test-bundle2-multiple-changegroups.t`
This makes the output easier to update and read.
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:19:15 +0100] rev 41637
test: use `printenv.py --line` in `test-bundle.t`
This makes the output easier to update and read.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:41:44 -0800] rev 41636
debugignore: respect ui.relative-paths
Not because I care about this, but I want to get rid of match.uipath()
and it's easier to respect the config than not.
Differential Revision: https://phab.mercurial-scm.org/D5898
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:31:26 -0800] rev 41635
annotate: respect ui.relative-paths for "binary file" message
Differential Revision: https://phab.mercurial-scm.org/D5917
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 23:29:07 -0800] rev 41634
remotefilelog: replace matchandpats() by match()
It doesn't seem like replacing "pats" was useful here. Replacing ("",)
by [] doesn't seem like it would make a difference and glob-expansion
only happens on Windows. It seem like we should just pass the patterns
on to orig() unmodified.
Differential Revision: https://phab.mercurial-scm.org/D5920
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 12:49:22 -0800] rev 41633
blackbox: test that track=* works to log everything
Differential Revision: https://phab.mercurial-scm.org/D5784
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 11:55:02 -0800] rev 41632
blackbox: test that unsetting track disables blackbox logging
Differential Revision: https://phab.mercurial-scm.org/D5783
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 10:20:57 -0800] rev 41631
subrepo: adjust subrepo prefix before calling subrepo.archive() (API)
Differential Revision: https://phab.mercurial-scm.org/D5887
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:52:36 -0800] rev 41630
subrepo: adjust subrepo prefix before calling subrepo.diff() (API)
Differential Revision: https://phab.mercurial-scm.org/D5886
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 10:01:55 -0800] rev 41629
subrepo: adjust subrepo prefix before calling subrepo.addremove() (API)
Differential Revision: https://phab.mercurial-scm.org/D5885
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:59:27 -0800] rev 41628
subrepo: adjust subrepo prefix before calling subrepo.add() (API)
Differential Revision: https://phab.mercurial-scm.org/D5884
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:52:22 -0800] rev 41627
subrepo: adjust subrepo prefix before calling subrepo.forget() (API)
Differential Revision: https://phab.mercurial-scm.org/D5883
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:40:37 -0800] rev 41626
subrepo: adjust subrepo prefix before calling subrepo.removefiles() (API)
That's what we do with the matcher so it seems more consistent.
Differential Revision: https://phab.mercurial-scm.org/D5882
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:46:36 -0800] rev 41625
subrepo: avoid calculating subrepo prefix twice for cat() (API)
Differential Revision: https://phab.mercurial-scm.org/D5881
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 07 Feb 2019 16:43:42 +0300] rev 41624
py3: make sure __repr__ returns str
No test fails but I found it while debugging test-commit-interactive-curses.t
failure.
# skip-blame because just r'' prefix
Differential Revision: https://phab.mercurial-scm.org/D5878
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 07 Feb 2019 16:44:43 +0300] rev 41623
py3: use bytes.startswith() instead of comparing with bytes[0]
This is because bytes[0] will return the ascii value and comparison will fail.
This makes test-commit-interactive-curses.t pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5879
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 22:57:26 -0800] rev 41622
match: remove unused "exact" argument (API)
It seems that all callers use match.exact() instead of match.match(exact=True).
Differential Revision: https://phab.mercurial-scm.org/D5919
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 23:03:42 -0800] rev 41621
tests: replace match.match(exact=True) by match.exact()
Differential Revision: https://phab.mercurial-scm.org/D5918
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 22:52:49 -0800] rev 41620
patch: accept second matcher that applies only to copy sources (API)
See previous patch for motivation.
Differential Revision: https://phab.mercurial-scm.org/D5893
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 17:46:20 -0800] rev 41619
patch: let caller pass in root-filtering matcher (API)
The --root option to `hg diff` does two things:
* Shows paths relative to the given root
* Filters paths by the given root, including copy sources
The root argument is passed through down to patch.diff(). I feel like
we can make patch.diff() more generic by not passing down the root
argument, but instead pass:
* A function for taking a repo-relative path and printing it. I want
to reuse this for showing cwd-relative paths later. This is the
actual motivation for this patch.
* A matcher that's already been filtered by the root argument
* A second matcher that filters the copy sources
This is one step towards that.
Differential Revision: https://phab.mercurial-scm.org/D5892
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 17:27:43 -0800] rev 41618
patch: pass in context objects into diffhunks() (API)
It's a pretty low-level function and having the contexts in
patch.diff() makes future patches easier.
Differential Revision: https://phab.mercurial-scm.org/D5891