Wed, 01 Aug 2018 16:06:53 +0200 extensions: add detailed loading information
Martijn Pieters <mj@zopatista.com> [Wed, 01 Aug 2018 16:06:53 +0200] rev 38838
extensions: add detailed loading information This lets you track down what exactly is happening during extension loading, and how long various steps took.
Wed, 01 Aug 2018 16:05:41 +0200 util: create a context manager to handle timing
Martijn Pieters <mj@zopatista.com> [Wed, 01 Aug 2018 16:05:41 +0200] rev 38837
util: create a context manager to handle timing The context manager is pulled out of the timed decorator function, and refactored to provide a stats instance, with added tests.
Wed, 01 Aug 2018 23:08:18 -0400 linelog: fix import statements to pass the import checker on py3
Augie Fackler <augie@google.com> [Wed, 01 Aug 2018 23:08:18 -0400] rev 38836
linelog: fix import statements to pass the import checker on py3 Differential Revision: https://phab.mercurial-scm.org/D4050
Mon, 30 Jul 2018 10:42:37 -0400 linelog: add a Python implementation of the linelog datastructure
Augie Fackler <augie@google.com> [Mon, 30 Jul 2018 10:42:37 -0400] rev 38835
linelog: add a Python implementation of the linelog datastructure This datastructure was originally developed by Jun Wu at Facebook, inspired by SCCS weaves. It's useful as a cache for blame information, but also is the magic that makes `hg absorb` easy to implement. In service of importing the code to Mercurial, I wanted to actually /understand/ it, and once I did I decided to take a run at implementing it. The help/internals/linelog.txt document is the README from Jun Wu's implementaiton. It all applies to our linelog implementation. Differential Revision: https://phab.mercurial-scm.org/D3990
Sat, 28 Jul 2018 11:40:31 -0700 changegroup: move file matcher from narrow extension
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 11:40:31 -0700] rev 38834
changegroup: move file matcher from narrow extension Sparse changegroup generation requires the use of a matcher to filter which files are relevant. This commit moves the file matcher from the narrow extension to core and updates the narrow extension to use it. I'm not sure why the narrow extension was storing the matcher as a callable that resolved to a matcher. So I changed it to be a simple matcher instance. In addition, code from narrow to intersect the matcher with the local narrow spec is now performed automatically when the changegroup packer is created. If a matcher is not passed into getbundler() an alwaysmatcher() is assumed. This ensures that a matcher is always defined for all operations. Differential Revision: https://phab.mercurial-scm.org/D4011
Thu, 26 Jul 2018 17:11:03 -0700 resolve: add option to warn/abort on -m with unresolved conflict markers
Kyle Lippincott <spectral@google.com> [Thu, 26 Jul 2018 17:11:03 -0700] rev 38833
resolve: add option to warn/abort on -m with unresolved conflict markers When a user is dropped out of Mercurial to a terminal to resolve files, we emit messages like: conflicts while merging file1! (edit, then use 'hg resolve --mark') conflicts while merging file2! (edit, then use 'hg resolve --mark') We don't mention a file name in the hint, so some users might do something like `$EDITOR file1; hg resolve --mark`, see that it says "(no more unresolved files)" and forget to deal with file2 before running the next command. Even if we did mention a file name in the hint, it's too easy to forget it (maybe the merge spans a couple days or something). This option lets us inform the user that they might have missed something. In the scenario above, the output would be something like: warning: the following files still have conflict markers: file2 (no more unresolved files) Differential Revision: https://phab.mercurial-scm.org/D4035
Mon, 02 Jul 2018 18:39:48 -0700 exchange: refactor control flow of _getbundlechangegrouppart()
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Jul 2018 18:39:48 -0700] rev 38832
exchange: refactor control flow of _getbundlechangegrouppart() The use of early return makes the control flow of this function much easier to reason about IMO. Differential Revision: https://phab.mercurial-scm.org/D4010
Mon, 02 Jul 2018 18:32:20 -0700 exchange: move _computeellipsis() from narrow
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Jul 2018 18:32:20 -0700] rev 38831
exchange: move _computeellipsis() from narrow This is also referenced as part of the narrow changegroup code and therefore needs to move to core before we can integrate the narrow changegroup code into core. Differential Revision: https://phab.mercurial-scm.org/D4009
Mon, 02 Jul 2018 18:24:26 -0700 exchange: move narrow acl functionality into core
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 02 Jul 2018 18:24:26 -0700] rev 38830
exchange: move narrow acl functionality into core This function is called by the custom changegroup generation code in the narrow extension. I want to move that changegroup code into core. That means we need to move this function. The code is kinda hacky in that assumes existence of REMOTE_USER, which is only present on authenticated HTTP requests. I've added a comment indicating that. Differential Revision: https://phab.mercurial-scm.org/D4008
Sat, 28 Jul 2018 10:41:23 -0700 exchange: move disabling of rev-branch-cache bundle part out of narrow
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 Jul 2018 10:41:23 -0700] rev 38829
exchange: move disabling of rev-branch-cache bundle part out of narrow I'm attempting to refactor changegroup code in order to better support alternate storage backends. The narrow extension is performing a lot of monkeypatching to this code and it is making it difficult to reason about how everything works. I'm reasonably certain I would be unable to abstract storage without requiring extensive rework of narrow. I believe it is less effort to move narrow code into core so it can be accounted for when changegroup code is refactored. So I'll be doing that. The first part of this is integrating the disabling of the cache:rev-branch-cache bundle2 part into core. This doesn't seem like it is related to changegroup, but narrow's modifications to changegroup are invasive and also require taking its code for bundle generation and exchange into core in order for the changegroup code to work. Differential Revision: https://phab.mercurial-scm.org/D4007
Tue, 24 Jul 2018 10:47:42 -0700 dispatch: show a short error message when invalid global option given
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Jul 2018 10:47:42 -0700] rev 38828
dispatch: show a short error message when invalid global option given Similar reasoning as the previous patch. Differential Revision: https://phab.mercurial-scm.org/D4025
Tue, 24 Jul 2018 10:22:07 -0700 dispatch: don't show list of commands on bogus command
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Jul 2018 10:22:07 -0700] rev 38827
dispatch: don't show list of commands on bogus command If a command is ambiguous, you get this: $ hg ve hg: command 've' is ambiguous: verify version [255] If you typo a command, you get this: $ hg comit hg: unknown command 'comit' (did you mean one of commit, incoming, mycommit?) [255] But if you completely mistype a command so it no longer looks like any existing commands, you get a full list of commands. That might be useful the first time you use Mercurial, but after that it's probably more annoying than help, especially if you have the pager enabled and have a short terminal. Let's instead give a short hint telling the user to run `hg help` for more help. Differential Revision: https://phab.mercurial-scm.org/D4024
Tue, 24 Jul 2018 22:51:11 -0700 histedit: avoid repeating name of state file in a few places
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Jul 2018 22:51:11 -0700] rev 38826
histedit: avoid repeating name of state file in a few places We can depend on the state object instead. Differential Revision: https://phab.mercurial-scm.org/D4006
Wed, 01 Aug 2018 13:10:07 -0700 py3: stop rewriting xrange() to pycompat.xrange()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 13:10:07 -0700] rev 38825
py3: stop rewriting xrange() to pycompat.xrange() We now require the use of pycompat.xrange() in source. One less feature in the module importer gets us one step closer to Python 3 native source code. Differential Revision: https://phab.mercurial-scm.org/D4034
Wed, 01 Aug 2018 13:08:00 -0700 check-code: ban use of bare xrange()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 13:08:00 -0700] rev 38824
check-code: ban use of bare xrange() We want everyone to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4033
Wed, 01 Aug 2018 13:00:45 -0700 global: use pycompat.xrange()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 13:00:45 -0700] rev 38823
global: use pycompat.xrange() On Python 3, our module importer automatically rewrites xrange() to pycompat.xrange(). We want to move away from the custom importer on Python 3. This commit converts all instances of xrange() to use pycompat.xrange(). Differential Revision: https://phab.mercurial-scm.org/D4032
Wed, 01 Aug 2018 12:57:15 -0700 pycompat: add xrange alias for Python 2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 01 Aug 2018 12:57:15 -0700] rev 38822
pycompat: add xrange alias for Python 2 We assign xrange on Python 3 but not Python 2. Adding the missing symbol on Python 2 allows us to use `pycompat.xrange` to get a generator range function. Differential Revision: https://phab.mercurial-scm.org/D4031
Tue, 31 Jul 2018 19:37:54 +0200 manifest: persist the manifestfulltext cache
Martijn Pieters <mj@zopatista.com> [Tue, 31 Jul 2018 19:37:54 +0200] rev 38821
manifest: persist the manifestfulltext cache Reconstructing the manifest from the revlog takes time, so much so that there already is a LRU cache to avoid having to load a manifest multiple times. This patch persists that LRU cache in the .hg/cache directory, so we can re-use this cache across hg commands. Commit benchmark (run on Macos 10.13 on a 2017-model Macbook Pro with Core i7 2.9GHz and flash drive), testing without and with patch run 5 times, baseline is r2a227782e754: * committing to an existing file, against the mozilla-central repository. Baseline real time average 1.9692, with patch 1.3786. A new debugcommand "hg debugmanifestfulltextcache" lets you inspect the cache, clear it, or add specific manifest nodeids to it. When calling repo.updatecaches(), the manifest(s) for the working copy parents are added to the cache. The hg perfmanifest command has an additional --clear-disk switch to clear this cache when testing manifest loading performance. Using this command to test performance on the firefox repository for revision f947d902ed91, whose manifest has a delta chain length of 60540, we see: $ hg perfmanifest f947d902ed91 --clear-disk ! wall 0.972253 comb 0.970000 user 0.850000 sys 0.120000 (best of 10) $ hg debugmanifestfulltextcache -a `hg log --debug -r f947d902ed91 | grep manifest | cut -d: -f3` Cache contains 1 manifest entries, in order of most to least recent: id: 0294517df4aad07c70701db43bc7ff24c3ce7dbc, size 25.6 MB Total cache data size 25.6 MB, on-disk 0 bytes $ hg perfmanifest f947d902ed91 ! wall 0.036748 comb 0.040000 user 0.020000 sys 0.020000 (best of 100) Worst-case scenario: a manifest text loaded from a single delta; in the firefox repository manifest node 9a1246ff762e is the chain base for the manifest attached to revision f947d902ed91. Loading this from a full cache file is just as fast as without the cache; the extra node ids ensure a big full cache: $ for node in 9a1246ff762e 1a1922c14a3e 54a31d11a36a 0294517df4aa; do > hgd debugmanifestfulltextcache -a $node > /dev/null > done $ hgd perfmanifest -m 9a1246ff762e ! wall 0.077513 comb 0.080000 user 0.030000 sys 0.050000 (best of 100) $ hgd perfmanifest -m 9a1246ff762e --clear-disk ! wall 0.078547 comb 0.080000 user 0.070000 sys 0.010000 (best of 100)
Tue, 31 Jul 2018 19:37:48 +0200 debug: allow specifying a manifest node rather than a revision
Martijn Pieters <mj@zopatista.com> [Tue, 31 Jul 2018 19:37:48 +0200] rev 38820
debug: allow specifying a manifest node rather than a revision
Fri, 20 Jul 2018 11:37:31 -0700 perfmoonwalk: make work with filtered repo
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 11:37:31 -0700] rev 38819
perfmoonwalk: make work with filtered repo This also fixes the out-of-range "len(repo)" that weirdly works (and gets the nullid). I suspect it wasn't intentional to include the timing of reading the null revision. Differential Revision: https://phab.mercurial-scm.org/D4017
Fri, 20 Jul 2018 11:17:33 -0700 revlog: don't include trailing nullrev in revlog.revs(stop=len(revlog))
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 11:17:33 -0700] rev 38818
revlog: don't include trailing nullrev in revlog.revs(stop=len(revlog)) This was an odd side effect of the nullid entry that's in the index. The existing callers (mostly repair.py) seem to have handled it fine. It doesn't seem intentional, and it's pretty surprising, so let's remove that surprise. Differential Revision: https://phab.mercurial-scm.org/D4015
Mon, 16 Jul 2018 14:15:29 -0400 patchbomb: ensure all headers and values given to email mod are native strings
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 14:15:29 -0400] rev 38817
patchbomb: ensure all headers and values given to email mod are native strings This lets test-patch-bookmark.t only fail with some harmless header output changes on Python 3, so I think patchbomb might be basically useful on Python 3 now. Differential Revision: https://phab.mercurial-scm.org/D3952
Mon, 30 Jul 2018 14:37:36 -0700 context: delete an obsolete comment
Martin von Zweigbergk <martinvonz@google.com> [Mon, 30 Jul 2018 14:37:36 -0700] rev 38816
context: delete an obsolete comment Obsolete since 91618801d5c3 (context: raise ProgrammingError on repo['my-tag'], 2018-07-06). Differential Revision: https://phab.mercurial-scm.org/D4002
Fri, 27 Jul 2018 14:48:58 -0700 templatekw: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Jul 2018 14:48:58 -0700] rev 38815
templatekw: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2) Differential Revision: https://phab.mercurial-scm.org/D4001
Fri, 27 Jul 2018 14:48:34 -0700 patch: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Jul 2018 14:48:34 -0700] rev 38814
patch: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2) Differential Revision: https://phab.mercurial-scm.org/D4000
Fri, 27 Jul 2018 14:48:06 -0700 fileset: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Jul 2018 14:48:06 -0700] rev 38813
fileset: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2) Differential Revision: https://phab.mercurial-scm.org/D3999
Fri, 27 Jul 2018 14:47:38 -0700 uncommit: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Jul 2018 14:47:38 -0700] rev 38812
uncommit: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2) Differential Revision: https://phab.mercurial-scm.org/D3998
Fri, 27 Jul 2018 14:46:59 -0700 fix: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Jul 2018 14:46:59 -0700] rev 38811
fix: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2) Differential Revision: https://phab.mercurial-scm.org/D3997
Fri, 27 Jul 2018 14:49:45 -0700 amend: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 27 Jul 2018 14:49:45 -0700] rev 38810
amend: use ctx1.status(ctx2) instead of repo.status(ctx1, ctx2) Differential Revision: https://phab.mercurial-scm.org/D3996
Thu, 19 Jul 2018 23:22:05 -0700 dispatch: making all hg abortions be output with a specific label
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Thu, 19 Jul 2018 23:22:05 -0700] rev 38809
dispatch: making all hg abortions be output with a specific label This allows abortions to be highlighted specially and separately from warnings - for instance, red is a reasonable color for when hg aborts, but is overly dramatic for most warnings produced elsewhere. Differential Revision: https://phab.mercurial-scm.org/D3967
Thu, 19 Jul 2018 15:21:28 -0400 ui: fix implicit unicode-to-bytes conversion introduced in 9df29b7c62cf
Augie Fackler <augie@google.com> [Thu, 19 Jul 2018 15:21:28 -0400] rev 38808
ui: fix implicit unicode-to-bytes conversion introduced in 9df29b7c62cf This is harmless, unless you try and run hg with HGUNICODEPEDANTRY enabled. It's technically wrong, so let's go ahead and fix it. Differential Revision: https://phab.mercurial-scm.org/D3989
Wed, 01 Aug 2018 10:23:57 -0400 merge with stable
Augie Fackler <augie@google.com> [Wed, 01 Aug 2018 10:23:57 -0400] rev 38807
merge with stable
Wed, 10 Oct 2018 12:25:28 -0400 lfs: avoid a potential variable reference before assignment error in cmdserver stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 10 Oct 2018 12:25:28 -0400] rev 38806
lfs: avoid a potential variable reference before assignment error in cmdserver A coworker hit this once yesterday when pulling in thg (a retry worked), and then I hit it with strip after a pull. I had a difficult time recreating a test for this (at least one of the tricks was to not use '-R', which seems to cause reposetup() to be called for each command), so I'm not sure how large of a window there actually is for this. Calling reposetup() *after* the requirement is added will skip the hook entirely. The other issue I had was adding a couple `ui.status()` lines around the check that installs the hook. On Windows, the cmdserver process ballooned to 1.6GB and hung. Changing that to `ui.warn()` avoided the hang. It also hung on macOS, but without the large memory usage.
Mon, 01 Oct 2018 16:07:38 -0400 Added signature for changeset 5405cb1a7901 stable
Augie Fackler <raf@durin42.com> [Mon, 01 Oct 2018 16:07:38 -0400] rev 38805
Added signature for changeset 5405cb1a7901
Mon, 01 Oct 2018 16:07:36 -0400 Added tag 4.7.2 for changeset 5405cb1a7901 stable
Augie Fackler <raf@durin42.com> [Mon, 01 Oct 2018 16:07:36 -0400] rev 38804
Added tag 4.7.2 for changeset 5405cb1a7901
Wed, 05 Sep 2018 21:23:29 +0900 manifest: fix out-of-bounds read of corrupted manifest entry stable 4.7.2
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:23:29 +0900] rev 38803
manifest: fix out-of-bounds read of corrupted manifest entry Spotted by ASAN.
Wed, 05 Sep 2018 21:32:45 +0900 manifest: rewrite pathlen() to not cross entry boundary stable
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:32:45 +0900] rev 38802
manifest: rewrite pathlen() to not cross entry boundary Even though the entire manifest data should be terminated by '\0', it seems not nice to scan '\0' over the entry terminator, '\n'.
Wed, 26 Sep 2018 21:24:14 +0900 chgserver: do not send system() back to client if stdio redirected (issue5992) stable
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Sep 2018 21:24:14 +0900] rev 38801
chgserver: do not send system() back to client if stdio redirected (issue5992) As the chg client doesn't know server-side stdio redirection, the server shouldn't upcall on "runsystem" request if the stdio streams are redirected. This patch teaches ui to remember the redirection flag, which is updated by the caller right now. Future patches (for default) will add ui methods to manage this flag internally.
Wed, 26 Sep 2018 21:21:05 +0900 chgserver: update comment describing when to fall back to core _runsystem() stable
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Sep 2018 21:21:05 +0900] rev 38800
chgserver: update comment describing when to fall back to core _runsystem() The condition "output needs to be captured" was moved to the core ui, and removed at fbce78c58f1e "chg: refactor ui.system() to be partly overridden." The next patch will add one more "if" to address the issue 5992.
Wed, 26 Sep 2018 20:53:59 +0900 procutil: compare fd number to see if stdio protection is needed (issue5992) stable
Yuya Nishihara <yuya@tcha.org> [Wed, 26 Sep 2018 20:53:59 +0900] rev 38799
procutil: compare fd number to see if stdio protection is needed (issue5992) When I wrote this function for commandserver at 69f86b937035, testing object identity was suffice, and I was sloppy enough not to compare fileno() values. However, it doesn't work in chg session because chgserver reopens stdio to apply new buffering mode. This patch partially fixes the issue 5992. Still we have another problem in chgui._runsystem().
Tue, 25 Sep 2018 23:06:02 +0900 test-ssh: show that stdio redirection doesn't work with chg stable
Yuya Nishihara <yuya@tcha.org> [Tue, 25 Sep 2018 23:06:02 +0900] rev 38798
test-ssh: show that stdio redirection doesn't work with chg Running tests with --chg doesn't mean all hg invocations are replaced by chg. This patch explicitly adds the test for "chg serve --stdio", which does weird stdio dance.
Tue, 25 Sep 2018 16:32:38 -0400 revset: make heads(commonancestors(x + x^)) be x^, not x stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 16:32:38 -0400] rev 38797
revset: make heads(commonancestors(x + x^)) be x^, not x Differential Revision: https://phab.mercurial-scm.org/D4742
Tue, 25 Sep 2018 16:29:39 -0400 revset: add tests of heads(commonancestors(..)) stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 16:29:39 -0400] rev 38796
revset: add tests of heads(commonancestors(..)) The second-to-last one shows the same bug as commonancestors(..): the result should be 8, not 9. Differential Revision: https://phab.mercurial-scm.org/D4741
Tue, 25 Sep 2018 16:18:43 -0400 revset: reword commonancestor()'s help stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 16:18:43 -0400] rev 38795
revset: reword commonancestor()'s help The new version seems a bit more consistent with other doc comments, and feels clearer to me (doesn't explain "commonancestors(set)" as "common ancestors of set"). Differential Revision: https://phab.mercurial-scm.org/D4740
Tue, 25 Sep 2018 16:14:57 -0400 revset: remove part of the commonancestors() comment stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 16:14:57 -0400] rev 38794
revset: remove part of the commonancestors() comment The reason is that: - it shows up in "hg help revset", but it doesn't look like documentation targeted at users - it doesn't make sense to me: it doesn't say what happens with < 2 revisions, and is not quite right because my understanding is that this revset was created precisely because "::x and ::y" was not quite the same (when x and y don't evaluate to singletons). Differential Revision: https://phab.mercurial-scm.org/D4739
Tue, 25 Sep 2018 16:05:21 -0400 revset: make commonancestors(x + x^) be ::(x^), not ::x stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 16:05:21 -0400] rev 38793
revset: make commonancestors(x + x^) be ::(x^), not ::x Differential Revision: https://phab.mercurial-scm.org/D4738
Tue, 25 Sep 2018 15:27:41 -0400 revset: add test demonstrating a bug with commonancestor() stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 15:27:41 -0400] rev 38792
revset: add test demonstrating a bug with commonancestor() Specifically, 9 is clearly not in "::8 and ::9". Differential Revision: https://phab.mercurial-scm.org/D4737
Tue, 25 Sep 2018 16:03:14 -0400 revset: fix commonancestor test so it demonstrates correct behavior stable
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Tue, 25 Sep 2018 16:03:14 -0400] rev 38791
revset: fix commonancestor test so it demonstrates correct behavior The problem is that hg log -r 'head()' is every changeset in the repository, because in this test repository, every changeset has a different branch. The author probably assumed all commits were on the default branch, and that they were getting topological heads, 7 and 9. As a result, this test was showing that the common ancestors of 0:9 are 0+1+2+4, which is not correct (next commit will test this). Differential Revision: https://phab.mercurial-scm.org/D4736
Tue, 11 Sep 2018 13:52:17 -0400 subrepo: mask out passwords embedded in the messages displaying a URL stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 11 Sep 2018 13:52:17 -0400] rev 38790
subrepo: mask out passwords embedded in the messages displaying a URL I noticed the password in maintenance logs for the "no changes since last push" and "pushing to" messages when pushing with an explicit path. But the test case here with :pushurl was also affected. I didn't see that cloning or pulling subrepos on demand had this problem, but it seems safer to just mask that too. There's a bit of a disconnect here, because it looks like clone is slicing off the password (makes sense not to store it in the hgrc in cleartext). But not shearing it off of an explicit path causes the subrepo not to realize that it already pushed the latest stuff. This is the easiest fix, however.
Wed, 05 Sep 2018 16:39:47 -0400 buildrpm: remove TODO that looks done to me stable
Augie Fackler <raf@durin42.com> [Wed, 05 Sep 2018 16:39:47 -0400] rev 38789
buildrpm: remove TODO that looks done to me Differential Revision: https://phab.mercurial-scm.org/D4494
Wed, 05 Sep 2018 16:29:31 -0400 buildrpm: fix embarassing bug in shell variable expansions stable
Augie Fackler <raf@durin42.com> [Wed, 05 Sep 2018 16:29:31 -0400] rev 38788
buildrpm: fix embarassing bug in shell variable expansions `$distance_$node` looks up and concatenates `$distance_` and `$node`. `$distance_` is empty, so we were getting the node without the distance. Using the curly braces makes our intent explicit and produces better-versioned RPMS. Differential Revision: https://phab.mercurial-scm.org/D4493
Wed, 05 Sep 2018 21:49:44 +0900 manifest: fix leak on error return from lazymanifest_filtercopy() stable
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:49:44 +0900] rev 38787
manifest: fix leak on error return from lazymanifest_filtercopy() Spotted by ASAN. free(copy->lines) and Py_DECREF(copy->pydata) are replaced by Py_XDECREF(copy), which should call lazymanifest_dealloc(). Freeing half-initialized copy->lines is safe since copy->numlines holds a valid value.
Wed, 05 Sep 2018 21:46:53 +0900 manifest: incref/decref copy->pydata to clarify 'copy' holds a reference stable
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:46:53 +0900] rev 38786
manifest: incref/decref copy->pydata to clarify 'copy' holds a reference
Wed, 05 Sep 2018 20:52:22 +0900 dirstate: use tuple interface to fix leak in pack_dirstate() stable
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 20:52:22 +0900] rev 38785
dirstate: use tuple interface to fix leak in pack_dirstate() Spotted by ASAN. Unlike PyTuple_GET_ITEM(), PySequence_ITEM() returns a new reference. This bug could be fixed by inserting Py_CLEAR() and Py_XDECREF() appropriately, but I think requiring a tuple object is simpler and less error-prone. The cext version is jumped to 10 since 6..9 are used in the default branch. We'll need to bump it again at merge.
Wed, 05 Sep 2018 22:10:41 +0900 xdiff: fix leak in hunk_consumer() stable
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 22:10:41 +0900] rev 38784
xdiff: fix leak in hunk_consumer() Spotted by ASAN. Since PyList_Append() does not "steal" a reference, Py_DECREF() is always required. Perhaps, this is the largest leak in this series.
Wed, 05 Sep 2018 20:57:38 +0900 base85: fix leak on error return from b85decode() stable
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 20:57:38 +0900] rev 38783
base85: fix leak on error return from b85decode() Spotted by ASAN. We don't need to initialize 'out' to NULL, but I decided to do that for clarity.
Tue, 04 Sep 2018 11:59:12 -0400 Added signature for changeset ede3bf31fe63 stable
Augie Fackler <raf@durin42.com> [Tue, 04 Sep 2018 11:59:12 -0400] rev 38782
Added signature for changeset ede3bf31fe63
Tue, 04 Sep 2018 11:59:09 -0400 Added tag 4.7.1 for changeset ede3bf31fe63 stable
Augie Fackler <raf@durin42.com> [Tue, 04 Sep 2018 11:59:09 -0400] rev 38781
Added tag 4.7.1 for changeset ede3bf31fe63
Fri, 31 Aug 2018 21:44:24 +0900 hgweb: load revcount + 1 entries to fill nextentry in log page (issue5972) stable 4.7.1
Yuya Nishihara <yuya@tcha.org> [Fri, 31 Aug 2018 21:44:24 +0900] rev 38780
hgweb: load revcount + 1 entries to fill nextentry in log page (issue5972) "revcount + 1" is moved to the call site to make it clearer.
Fri, 24 Aug 2018 18:21:55 -0700 scmutil: avoid quadratic membership testing (issue5969) stable
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Aug 2018 18:21:55 -0700] rev 38779
scmutil: avoid quadratic membership testing (issue5969) tr.changes['revs'] is an xrange, which has an O(n) __contains__ implementation. The `rev not in newrevs` lookup a few lines below will therefore be O(n^2) if all incoming changesets are public. This issue isn't present on @ because 45e05d39d9ce introduced a custom type implementing an xrange primitive with O(1) contains and switched tr.changes['revs'] to be an instance of that type. We work around the problem on the stable branch by casting the xrange to a set. This is a bit hacky because it requires allocating memory to hold each integer in the range. But we are already holding the full set of pulled revision numbers in memory multiple times (such as in `tr.changes['phases']`). So this is a relatively minor problem. This issue has been present since the phases reporting code was introduced in the 4.7 cycle by eb9835014d20. This change should be reverted/ignored when stable is merged into default. On the mozilla-unified repository with 483492 changesets, `hg clone` time improves substantially: before: 1843.700s user; 29.810s sys after: 461.170s user; 29.360s sys
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip