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 34046
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 34045
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, 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 34044
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 34043
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 34042
python3: whitelist another 5 passing tests found with the ratchet script
Tue, 22 Aug 2017 20:06:58 -0400 python3: replace sorted(<dict>.iterkeys()) with sorted(<dict>)
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 20:06:58 -0400] rev 34041
python3: replace sorted(<dict>.iterkeys()) with sorted(<dict>)
Tue, 22 Aug 2017 20:03:07 -0400 python3: wrap all uses of <exception>.strerror with strtolocal
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 20:03:07 -0400] rev 34040
python3: wrap all uses of <exception>.strerror with strtolocal Our string literals are bytes, and we mostly want to %-format a strerror into a one of those literals, so this fixes a ton of issues.
Wed, 30 Aug 2017 14:04:55 -0700 pager: do not start pager if `ui` has been `pushbuffer`-ed
Jun Wu <quark@fb.com> [Wed, 30 Aug 2017 14:04:55 -0700] rev 34039
pager: do not start pager if `ui` has been `pushbuffer`-ed The `pushbuffer`, `popbuffer` APIs are intended to capture internal output. They will prevent `ui.write` from writing to the actual `ui.fout`. So a pager won't receive the output and do the right thing. In general, it does not make sense to start a pager if ui is in the "pushbuffer" mode. Differential Revision: https://phab.mercurial-scm.org/D574
Wed, 30 Aug 2017 16:05:12 -0700 revset: do not flip "and" arguments when optimizing
Jun Wu <quark@fb.com> [Wed, 30 Aug 2017 16:05:12 -0700] rev 34038
revset: do not flip "and" arguments when optimizing Rewrite `flipand(y, x)` to `andsmally(x, y)` so the AST order is unchanged, which could be more friendly to developers. Differential Revision: https://phab.mercurial-scm.org/D579
Wed, 30 Aug 2017 22:51:28 +0900 revset: make match function follow given subset if specified (API)
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Aug 2017 22:51:28 +0900] rev 34037
revset: make match function follow given subset if specified (API) This should be sensible default since mfunc(subset) is roughly equivalent to 'subset & mfunc'. The order argument is still there so we can specify 'anyorder' if the order doesn't really matter.
Wed, 30 Aug 2017 22:41:36 +0900 revset: move order argument to run-time match function
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Aug 2017 22:41:36 +0900] rev 34036
revset: move order argument to run-time match function We no longer need the order flag to build a parsed tree.
Wed, 30 Aug 2017 23:53:30 +0900 revset: fix example describing how ordering is determined
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Aug 2017 23:53:30 +0900] rev 34035
revset: fix example describing how ordering is determined It was 'X & !Y' before.
Wed, 30 Aug 2017 22:32:47 +0900 revset: move order constants from revsetlang
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Aug 2017 22:32:47 +0900] rev 34034
revset: move order constants from revsetlang Thanks to the recent refactor, the ordering rule is fully processed at runtime.
Tue, 29 Aug 2017 11:25:22 +0200 tag: use filtered repo when creating new tags (issue5539)
Denis Laxalde <denis@laxalde.org> [Tue, 29 Aug 2017 11:25:22 +0200] rev 34033
tag: use filtered repo when creating new tags (issue5539) When pruning a changeset that added a tag and then adding another tag, the "pruned" tag gets restored. This is because the tag creation step (tags._tag() call in tags.tag()) is currently done on the unfiltered repo. This behavior has been there from 7977d35df13b which backs out b08af8f0ac01 with no clear reason but caution on unthought situations at that time. In this changeset, we pass the filtered repo to tags._tag(), preventing "pruned" tags to reappear. This somehow restores b08af8f0ac01, though now we arguably have a valid use case for.
(0) -30000 -10000 -3000 -1000 -300 -100 -14 +14 +100 +300 +1000 +3000 +10000 tip