Thu, 31 Aug 2017 11:28:59 -0700 filemerge: move a util copy call to filectx.write
Phil Cohen <phillco@fb.com> [Thu, 31 Aug 2017 11:28:59 -0700] rev 34033
filemerge: move a util copy call to filectx.write This way a future in-memory-merge context can intercept them. Differential Revision: https://phab.mercurial-scm.org/D400
Thu, 31 Aug 2017 11:28:59 -0700 filemerge: eliminate most uses of tempfiles
Phil Cohen <phillco@fb.com> [Thu, 31 Aug 2017 11:28:59 -0700] rev 34032
filemerge: eliminate most uses of tempfiles Emphasize that they're unused so we can more easily remove them later. Differential Revision: https://phab.mercurial-scm.org/D399
Thu, 31 Aug 2017 11:05:19 -0700 filemerge: extract _maketemp and _makebackup
Phil Cohen <phillco@fb.com> [Thu, 31 Aug 2017 11:05:19 -0700] rev 34031
filemerge: extract _maketemp and _makebackup These functions will be modified by in-memory merge, so let's extract them first and add some comments. This also shortens `_filemerge` a bit. Differential Revision: https://phab.mercurial-scm.org/D388
Thu, 31 Aug 2017 21:56:40 +0900 encoding: check overflow while calculating size of JSON escape buffer
Yuya Nishihara <yuya@tcha.org> [Thu, 31 Aug 2017 21:56:40 +0900] rev 34030
encoding: check overflow while calculating size of JSON escape buffer The minimum input size to exploit is ~682MB (= INT_MAX / len('\\u0000') * 2) on 32bit system, which isn't easy to achieve using Python str in 2GB process address space, but probably doable.
Wed, 30 Aug 2017 20:25:56 +0000 editor: use an unambiguous path suffix for editor files
Michael Bolin <mbolin@fb.com> [Wed, 30 Aug 2017 20:25:56 +0000] rev 34029
editor: use an unambiguous path suffix for editor files Changes the API of `ui.edit()` to take an optional `action` argument, which is used when constructing the suffix of the temp file. Previously, it was possible to set the suffix by specifying a `suffix` to the optional `extra` dict that was passed to `ui.edit()`, but the goal is to drop support for `extra.suffix` and make `action` a required argument. To this end, `ui.edit()` now yields a `develwarn()` if `action` is not set or if `extra.suffix` is set. I updated all calls to `ui.edit()` I could find in `hg-crew` to specify the appropriate `action`. This means that when creating a commit, instead of the path to the editor file being something like: `/tmp/hg-editor-XXXXXX.txt` it is now something like: `/tmp/hg-editor-XXXXXX.commit.hg.txt` Some editors (such as Atom) make it possible to statically define a [TextMate] grammar for files with a particular suffix. For example, because Git reliably uses `.git/COMMIT_EDITMSG` and `.git/MERGE_MSG` as the paths for commit-type messages, it is trivial to define a grammar that is applied when files of either name are opened in Atom: https://github.com/atom/language-git/blob/v0.19.1/grammars/git%20commit%20message.cson#L4-L5 Because Hg historically used a generic `.txt` suffix, it was much harder to disambiguate whether a file was an arbitrary text file as opposed to one created for the specific purpose of authoring an Hg commit message. This also makes it easier to add special support for `histedit`, as it has its own suffix that is distinct from a commit: `/tmp/hg-histedit-XXXXXX.histedit.hg.txt` Test Plan: Added an integration test: `test-editor-filename.t`. Manually tested: ran `hg ci --amend` for this change and saw that it used `/tmp/hg-editor-ZZjcz0.commit.hg.txt` as the path instead of `/tmp/hg-editor-ZZjcz0.txt` as the path. Verified `make tests` passes. Differential Revision: https://phab.mercurial-scm.org/D464
Wed, 30 Aug 2017 09:21:31 -0700 revlog: move check for wdir from changelog to revlog
Martin von Zweigbergk <martinvonz@google.com> [Wed, 30 Aug 2017 09:21:31 -0700] rev 34028
revlog: move check for wdir from changelog to revlog Yuya said he preferred this (to keep them in one place, I think). Differential Revision: https://phab.mercurial-scm.org/D569
Tue, 29 Aug 2017 16:38:10 -0400 debugssl: allow a URL to be specified without a local repository stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 29 Aug 2017 16:38:10 -0400] rev 34027
debugssl: allow a URL to be specified without a local repository This was the original intent, but I bungled the logic. Otherwise if there is a certificate chain issue, the repository can't be cloned in order for there to be a repo object. I think I missed this case because I was inside of a Mercurial clone as I was originally developing and testing this.
Tue, 22 Aug 2017 21:21:43 -0400 revlog: use pycompat.bytestr() to reliably have a %s-able value
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 21:21:43 -0400] rev 34026
revlog: use pycompat.bytestr() to reliably have a %s-able value
Tue, 22 Aug 2017 23:11:35 -0400 debugcommands: stabilize output of debugbundle by having a custom repr
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 23:11:35 -0400] rev 34025
debugcommands: stabilize output of debugbundle by having a custom repr We handle all dict-like things the same, and don't worry about it actually being a repr.
Tue, 22 Aug 2017 20:25:08 -0400 python3: whitelist another 5 passing tests found with the ratchet script
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 20:25:08 -0400] rev 34024
python3: whitelist another 5 passing tests found with the ratchet script
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip