Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 May 2014 21:48:41 -0700] rev 21247
fetch: declare command using decorator
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 May 2014 21:54:01 -0700] rev 21246
extdiff: declare command using decorator
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 May 2014 21:46:24 -0700] rev 21245
churn: declare command using decorator
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 May 2014 21:17:04 -0700] rev 21244
convert: declare commands using decorator
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 May 2014 21:19:31 -0700] rev 21243
debugshell: declare command using decorator
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 May 2014 21:09:06 -0700] rev 21242
largefiles: declare commands using decorator
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21241
cmdutil: omit redundant "savecommitmessage()" in "tryimportone()"
The preceding patch causes that "makememctx()" with "editor" argument
saves (manually edited) commit message into ".hg/last-message.txt":
saving itself is executed indirectly in "memctx.__init__()".
This makes it redundant to invoke "savecommitmessage()" on caller side
of "makememctx()".
This patch omits such redundant "savecommitmessage()" invocation in
"tryimportone()".
"tryimportone()" uses one of "commiteditor" or "commitforceeditor" as
"editor" argument, and this causes saving commit message always.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21240
amend: use "editor" argument for "memctx.__init__" to save commit message
This patch uses "editor" argument of "memctx.__init__" to save commit
message, instead of explicit editor invocation and saving commit
message by "localrepository.savecommitmessage()".
By passing one of "commiteditor" or "commitforceeditor" as "editor",
"memctx.__init__" saves commit message, even when editor invocation is
not needed.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21239
histedit: pass "editor" argument to "memctx.__init__()" for "collapse" command
The preceding patch causes that "memctx.__init__()" with "editor"
argument invokes editor and saves edited commit message into
".hg/last-message.txt".
This patch passes "editor" argument to "memctx.__init__()" instead of
explicit invocations of "commitforceeditor()" and
"savecommitmessage()" for "collapse" command.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21238
context: move editor invocation from "makememctx()" to "memctx.__init__()"
This patch introduces "editor" argument to "memctx.__init__()", and
moves editor invocation from "makememctx()" to "memctx.__init__()", to
centralize editor invocation into "memctx" object creation.
This relocation is needed, because "makememctx()" requires the "store"
object providing "getfile()" to create "memfilectx" object, and this
prevents some code paths from using "makememctx()" instead of
"memctx.__init__()".
This patch also invokes "localrepository.savecommitmessage()", when
"editor" is specified explicitly, to centralize saving commit message
into "memctx" object creation: passing "cmdutil.commiteditor" as
"editor" can achieve both suppressing editor invocation and saving
into ".hg/last-message.txt" for non empty commit messages.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21237
localrepo: add "editor" argument to "tag()"
Before this patch, "localrepository.tag()" doesn't take "editor"
argument, and this prevents callers from passing "editor" argument to
"localrepository.commit()" invoked internally.
This patch adds "editor" argument to "localrepository.tag()" (and
"_tag()", too), and makes "commands.tag()" invoke it with "editor"
argument.
This patch also omits explicit "localrepository.savecommitmesssage()"
invocation, because "localrepository.commit()" will invoke specified
"editor" and save edited commit message into ".hg/last-message.txt"
automatically.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21236
qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
Before this patch, "hg qrefresh" and "hg qfold" invoke "ui.edit()"
explicitly to get commit message edited manually.
This requires explicit "localrepository.savecommitmessage()"
invocation to save edited commit message into ".hg/last-message.txt",
because unexpected exception raising may abort command execution
before saving it in "localrepository.commit()".
This patch uses "editor" argument of "localrepository.commit()"
instead of explicit "ui.edit()" invocation for "hg qnew" and "hg qfold"
"localrepository.commit()" will invoke "desceditor()" function newly
added by this patch, and save edited commit message into
".hg/last-message.txt" automatically.
This patch passes not "editor" but "desceditor" to "commit()", because
"hg qnew" and "hg qfold" require editor function to return edited
message (and invoke "patchheader.setmessage()" with it) if not empty,
or default message otherwise.
This patch also avoids "not q.applied" check at "hg qrefresh --edit",
because it is also checked in "queue.refresh()", and it is not needed
to get commit message from patch header before "queue.refresh()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21235
qrefresh: relocate message/patch-header handling to delay message determination
Before this patch, commit message for refreshed MQ changeset is
determined, and written into refreshed patch file before
"localrepository.commit()" invocation.
This makes refactoring to use "editor" argument of "commit()" instead
of explicit "ui.edit()" invocation in succeeding patch difficult.
This patch relocates message/patch-header handling to delay message
determination.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21234
qnew: use "editor" argument of "commit()" instead of explicit "ui.edit()"
Before this patch, "hg qnew" invokes "ui.edit()" explicitly to get
commit message edited manually.
This requires explicit "localrepository.savecommitmessage()"
invocation to save edited commit message into ".hg/last-message.txt",
because unexpected exception raising may abort command execution
before saving it in "localrepository.commit()".
This patch uses "editor" argument of "localrepository.commit()"
instead of explicit "ui.edit()" invocation for "hg qnew".
"localrepository.commit()" will invoke "desceditor()" function newly
added by this patch, and save edited commit message into
".hg/last-message.txt" automatically.
This patch passes not "editor" but "desceditor" to "commit()", because
"hg qnew" requires editor function to return edited message if not
empty, or default message otherwise.
This patch applies "rstrip()" on "defaultmsg" at comparison between
"nctx.description()" and "defaultmsg", because the former should be
stripped by "changelog.stripdesc()" and the latter may have tail white
spaces inherited from "patchfn".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 05 May 2014 21:26:40 +0900] rev 21233
histedit: use "editor" argument of "commit()" instead of explicit "ui.edit()"
Before this patch, "message" action of "hg histedit" uses "ui.edit()"
explicitly to get commit message edited manually.
This requires explicit "localrepository.savecommitmessage()"
invocation to save edited commit message into ".hg/last-message.txt",
because unexpected exception raising may abort command execution
before saving it in "localrepository.commit()".
This patch uses "editor" argument of "localrepository.commit()"
instead of explicit "ui.edit()" invocation for "message" action of "hg
histedit"
"localrepository.commit()" will invoke "editor()" function newly added
in this patch, and save edited commit message into ".hg/last-message.txt"
automatically.
Yuya Nishihara <yuya@tcha.org> [Tue, 29 Apr 2014 12:54:01 +0900] rev 21232
test-pyflakes: detect undefined name error
It should be able to catch the following mistakes at
2606e7f227f6:
mercurial/exchange.py:590: undefined name 'UnknownPartError'
mercurial/match.py:346: undefined name 'pat'
mercurial/win32.py:365: undefined name '_ERROR_NO_MORE_FILES'
tests/killdaemons.py:46: undefined name 'check'
Yuya Nishihara <yuya@tcha.org> [Fri, 02 May 2014 18:25:23 +0900] rev 21231
run-tests: initialize global variables to suppress pyflakes warning
Matt Mackall <mpm@selenic.com> [Tue, 06 May 2014 12:47:59 -0500] rev 21230
merge with stable
Thomas Arendsen Hein <thomas@intevation.de> [Mon, 05 May 2014 16:54:15 +0200] rev 21229
setup.py, make: avoid problems with outdated, existing hgext/__index__.py*
"make clean" already removed __index__.py[cdo], but not the __index__.py
(automatically generated by "python setup.py build_hgextindex").
"setup.py build_hgextindex" did not generate a new index if file
__index__.py[cdo] already existed, because if __index__.py was removed,
the compiled file containing the old information was imported and used.
Generate an empty file (with a new timestamp to generate a new .py[cdo])
instead and make mercurial.extensions ignore the unset docs attribute.
One of the problems was a failed test-help.t, to reproduce:
$ rm hgext/__index__.py*
$ echo 'docs = {"mq": "dummy"}' > hgext/__index__.py
$ make test-help.t
With this a "make clean" or "python setup.py build_hgextindex" helps.
Yuya Nishihara <yuya@tcha.org> [Fri, 02 May 2014 18:24:10 +0900] rev 21228
factotum: initialize global variables to suppress pyflakes warning
Mads Kiilerich <madski@unity3d.com> [Sat, 03 May 2014 03:29:30 +0200] rev 21227
color: don't fail on error messages when no curses (
issue4237)
The error only occured when Python didn't have curses - such as on Windows and
when Python was built without curses support.
No curses can also be emulated by (re)moving .../lib/python2.7/curses/ from the
Python installation.
It is left as an exercise to figure out exactly what changed in Mercurial that
triggered this error.
Steve Borho <steve@borho.org> [Sat, 03 May 2014 10:33:54 +0200] rev 21226
win32: backout
1a9ebc83a74c
This change conflicted with TortoiseHg's use of QFileSystemWatcher. Files which
were being monitored (for file-system events) were unable to be reliably updated
using util.atomictempfile. Often the update would error out in the middle of
the process leaving neither the old or the new file in place.
My guess is that _kernel32.CreateFileA() is triggering an exception that is
not handled correctly within unlink()
Matt Mackall <mpm@selenic.com> [Mon, 05 May 2014 13:42:08 -0500] rev 21225
test-check-code-hg: use locate instead of manifest
Matt Mackall <mpm@selenic.com> [Mon, 05 May 2014 13:41:29 -0500] rev 21224
test-check-code-hg: drop manual check of non-.py scripts
Matt Mackall <mpm@selenic.com> [Mon, 05 May 2014 13:42:58 -0500] rev 21223
test-check-code-hg: use test-repo check
Matt Mackall <mpm@selenic.com> [Mon, 05 May 2014 13:37:59 -0500] rev 21222
check-code: look at shebang to identify Python scripts
Matt Mackall <mpm@selenic.com> [Fri, 02 May 2014 00:23:58 -0500] rev 21221
tests: use locate to find files for pyflakes check
Based on a suggestion by Yuya Nishihara
Matt Mackall <mpm@selenic.com> [Thu, 01 May 2014 19:24:03 -0500] rev 21220
merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 01 May 2014 17:48:02 -0500] rev 21219
Added signature for changeset
2195ac506c6a
Matt Mackall <mpm@selenic.com> [Thu, 01 May 2014 17:47:24 -0500] rev 21218
Added tag 3.0 for changeset
2195ac506c6a
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 01 May 2014 14:07:04 -0700] rev 21217
revset: directly use __contains__ instead of a lambda
We get rid of lambda in a bunch of other place. This is equivalent and much
faster. (no new timing as this is the same change as three other changesets)
Matt Mackall <mpm@selenic.com> [Thu, 01 May 2014 14:33:06 -0500] rev 21216
tests: suppress spurious lchmod error from unzip (
issue4088)
Because lchmod doesn't exist on Linux, unzip should be built without lchmod
support. A few distros get this wrong.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 01 May 2014 12:15:28 -0700] rev 21215
orderedlazyset: directly use __contains__ instead of a lambda
We apply the same speedup as in spanset, getting rid of the useless lambda.
(No new timing, as this is the very same change)
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 01 May 2014 12:15:00 -0700] rev 21214
lazyset: directly use __contains__ instead of a lambda
We apply the same speedup as in spanset, getting rid of the useless lambda.
(No new timing, as this is the very same change)
Matt Mackall <mpm@selenic.com> [Thu, 01 May 2014 13:42:12 -0500] rev 21213
merge with i18n
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 30 Apr 2014 23:20:46 +0900] rev 21212
i18n-ja: synchronized with
e9c2f76be74b
Wagner Bruna <wbruna@softwareexpress.com.br> [Wed, 30 Apr 2014 11:01:50 -0300] rev 21211
i18n-pt_BR: synchronized with
e9c2f76be74b
Mads Kiilerich <madski@unity3d.com> [Thu, 01 May 2014 16:47:50 +0200] rev 21210
rebase: empty revset should be a gentle no-op with exit code 1, not an error
Mads Kiilerich <madski@unity3d.com> [Thu, 01 May 2014 15:12:49 +0200] rev 21209
largefiles: better handling of log from other working directory (
issue4236)
When invoked from another directory, the matchers m._cwd will be the absolute
path. The code for calculating relative path to .hglf did not consider that and
log would fail with weird errors and paths.
For now, just don't do any largefile magic when invoked from other directories.
Matt Mackall <mpm@selenic.com> [Thu, 01 May 2014 09:42:23 -0500] rev 21208
tests: add repository check for pyflakes test
If this test was run from a tarball with no Mercurial repository, it
would fail because 'hg manifest' didn't work.
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 26 Apr 2014 00:38:02 -0700] rev 21207
spanset: directly use __contains__ instead of a lambda
Spanset are massively used in revset. First because the initial subset itself is
a repo wide spanset. We speed up the __and__ operation by getting rid of a
gratuitous lambda call. A more long terms solution would be to:
1. speed up operation between spansets,
2. have a special smartset for `all` revisions.
In the mean time, this is a very simple fix that buyback some of the performance
regression.
Below is performance benchmark for trival `and` operation between two spansets.
(Run on an unspecified fairly large repository.)
revset tip:0
2.9.2) wall 0.282543 comb 0.280000 user 0.260000 sys 0.020000 (best of 35)
before) wall 0.819181 comb 0.820000 user 0.820000 sys 0.000000 (best of 12)
after) wall 0.645358 comb 0.650000 user 0.650000 sys 0.000000 (best of 16)
Proof of concept implementation of an `all` smartset brings this to 0.10 but it's
too invasive for stable.
Durham Goode <durham@fb.com> [Wed, 30 Apr 2014 15:36:38 -0700] rev 21206
transaction: fix file descriptor leak for journal.backupfiles
The journal.backupfiles descriptor wasn't being closed. This resulted in
hgsubversion test runs having a bagillion descriptors open, which crashed on
platforms with low open file limits (like OSX).
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 25 Apr 2014 18:00:07 -0700] rev 21205
revset: also inline spanset._contained in __len__
For consistency with what happen in `__contains__`, we inline the range test
into `__len__` too.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 28 Apr 2014 15:15:36 -0700] rev 21204
revset: inline spanset containment check (fix perf regression)
Calling a function is super expensive in python. We inline the trivial range
comparison to get back to more sensible performance on common revset operation.
Benchmark result below:
Revision mapping:
0)
3f83fc5cfe71 2.9.2 release
1)
bcfd44abad93 current @
2) This revision
revset #0: public()
0) wall 0.010890 comb 0.010000 user 0.010000 sys 0.000000 (best of 201)
1) wall 0.012109 comb 0.010000 user 0.010000 sys 0.000000 (best of 199)
2) wall 0.012211 comb 0.020000 user 0.020000 sys 0.000000 (best of 197)
revset #1: :10000 and public()
0) wall 0.007141 comb 0.010000 user 0.010000 sys 0.000000 (best of 361)
1) wall 0.014139 comb 0.010000 user 0.010000 sys 0.000000 (best of 186)
2) wall 0.008334 comb 0.010000 user 0.010000 sys 0.000000 (best of 308)
revset #2: draft()
0) wall 0.009610 comb 0.010000 user 0.010000 sys 0.000000 (best of 279)
1) wall 0.010942 comb 0.010000 user 0.010000 sys 0.000000 (best of 243)
2) wall 0.011036 comb 0.010000 user 0.010000 sys 0.000000 (best of 239)
revset #3: :10000 and draft()
0) wall 0.006852 comb 0.010000 user 0.010000 sys 0.000000 (best of 383)
1) wall 0.014641 comb 0.010000 user 0.010000 sys 0.000000 (best of 183)
2) wall 0.008314 comb 0.010000 user 0.010000 sys 0.000000 (best of 299)
We can see this changeset gains back the regression for `and` operation on
spanset. We are still a bit slowerfor the `public()` and `draft()`. Predicates
not touched by this changeset.
Matt Mackall <mpm@selenic.com> [Wed, 30 Apr 2014 14:19:01 -0500] rev 21203
ancestor: silence multiple ancestor warning outside of merge (
issue4234)
The current situation is a bit of a layering violation as
merge-specific knowledge is pushed down to lower layers and leaks
merge assumptions into other code paths.
Here, we simply silence the warning with a hack. Both the warning and
the hack will probably go away in the near future when bid merge is
made the default.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 25 Apr 2014 13:44:51 -0700] rev 21202
revsetbenchmark: fix error raising
We want to display the commands, not all arguments of the function. (The old
code actually crash, failing to joining a list of lists.)
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 28 Apr 2014 16:28:52 -0700] rev 21201
revset: fix revision filtering in spanset.contains (regression)
The argument is `x` but the variable tested for filtering is `rev`. `rev`
happens to be a revset methods, ... never part of the filtered revs. This
method is now using `rev` for everything.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 28 Apr 2014 17:25:36 -0700] rev 21200
graft: do not use `.remove` on a smart set (regression)
Revset calls use to return a list. Graft use to mutate that list. We cannot do
this anymore leading to a crash when grafting multiple changeset with a revset.
File ".../mercurial/commands.py", line 3117, in graft
revs.remove(rev)
AttributeError: '_addset' object has no attribute 'remove'
We are late in code-freeze so we make the shortest possible fix by turning it
back to a list.
Greg Hurrell <glh@fb.com> [Mon, 28 Apr 2014 15:09:23 -0700] rev 21199
help: clarify distinction among `contains`/`file`/`filelog`
For a Mercurial new-comer, the distinction between `contains(x)`,
`file(x)`, and `filelog(x)` in the "revsets" help page may not be
obvious. This commit tries to make things more obvious (text based on
an explanation from Matt in an FB group thread).
Mads Kiilerich <madski@unity3d.com> [Thu, 24 Apr 2014 16:47:22 +0200] rev 21198
discovery: don't report all "unsynced" remote heads (
issue4230)
8a9e0b523d2d made discovery more helpful - too helpful for some extreme use
cases.
Instead, we arbitrarily limit the list it at 4 and add 'or more'.
Julien Cristau <julien.cristau@logilab.fr> [Wed, 23 Apr 2014 13:51:35 +0200] rev 21197
rebase: don't abort if we're asked to rebase an empty revset
The documentation says we exit 1 if we have nothing to do, so avoid
breaking that contract when we're passed an empty revset.
This was changed in http://www.selenic.com/hg/rev/
a259f7b488ab to
improve the error message; keep the improved message, just not the
abort.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 25 Apr 2014 22:34:09 -0400] rev 21196
largefiles: remove directories emptied after their files are moved (
issue3515)
Yuya Nishihara <yuya@tcha.org> [Sat, 26 Apr 2014 18:13:06 +0900] rev 21195
cmdserver: forcibly use L channel to read password input (
issue3161)
Command server is designed to use the channel protocol even if the server
process is accessible to tty, whereas vanilla hg should be able to read
password from tty in that case. So it isn't enough to swap sys.stdin:
# works only if the server process is detached from the console
sys.stdin = self.fin
getpass.getpass('')
sys.stdin = oldin
or test isatty:
# vanilla hg can't talk to tty if stdin is redirected
if self._isatty(self.fin):
return getpass.getpass('')
else:
...
Since ui.nontty flag is undocumented and command-server channels don't provide
isatty(), this change won't affect the other uses of ui._isatty().
issue3161 also suggests to provide some context of messages. I think it can
be implemented by using the generic templating function.
Yuya Nishihara <yuya@tcha.org> [Tue, 29 Apr 2014 12:37:36 +0900] rev 21194
killdaemons: correct typo of _check() function caught by pyflakes
Yuya Nishihara <yuya@tcha.org> [Tue, 29 Apr 2014 12:35:50 +0900] rev 21193
win32: add missing definition of _ERROR_NO_MORE_FILES caught by pyflakes
Yuya Nishihara <yuya@tcha.org> [Tue, 29 Apr 2014 12:35:02 +0900] rev 21192
exchange: fix invalid reference to bundle2.UnknownPartError caught by pyflakes
Yuya Nishihara <yuya@tcha.org> [Tue, 29 Apr 2014 11:02:40 +0900] rev 21191
match: fix NameError 'pat' on overflow of regex pattern length
'pat' was renamed to 'regex' in
9d28fd795215.
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Apr 2014 15:09:48 +0900] rev 21190
color: add missing handling of stderr capture introduced by
350dc24a553d
It wouldn't raise exception without this change, but _bufferstates was wrong
because of missing _bufferstates.pop() in colorui.popbuffer().
Javi Merino <cibervicho@gmail.com> [Wed, 23 Apr 2014 20:23:30 +0100] rev 21189
hgweb: replace excanvas.js with a newer version
The current version of excanvas is unknown. Substitute it with the
latest version from the excanvas website:
http://code.google.com/p/explorercanvas/
Instead of using the "compiled" version, just use the readable one.
Mads Kiilerich <madski@unity3d.com> [Wed, 23 Apr 2014 23:29:55 +0200] rev 21188
httppeer: reintroduce _abort that accidentally was removed in
167047ba3cfa
Including the missing test coverage that would have caught it.