Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 May 2017 10:33:26 -0700] rev 32149
localrepo: reuse exchange.bundle2requested()
It seems like localrepo.getbundle() is trying to do the same thing, so
let's just call the method. That way we get the same condition as
there (matching any "HG2" prefix, not only "HG20").
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 28 Apr 2017 01:13:07 +0530] rev 32148
py3: use raw strings while accessing class.__dict__
The keys of class.__dict__ are unicodes on Python 3.
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 25 Apr 2017 01:52:30 +0530] rev 32147
py3: handle opts correctly for `hg add`
opts in add command were passed again to cmdutil.add() as kwargs so we need
to convert them again to str. Intstead we convert them to bytes when passing
scmutil.match(). Opts handling is also corrected for all the functions which
are called from cmdutil.add().
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 24 Apr 2017 04:32:04 +0530] rev 32146
py3: handle opts correctly for rollback
dryrun and force are just check for None, the value is not used. So its better
to leave opts as unicodes as that wont harm us.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 21 Apr 2017 15:04:32 +0530] rev 32145
py3: handle opts correctly for unbundle
There is just a check whether the value is None or not. So even having
optupdate as unicodes won't harm us.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 21 Apr 2017 02:20:46 +0530] rev 32144
py3: convert opts to bytes in cmdutil.dorecord()
commands.commit() calls cmdutil.dorecord() where opts are passed as unicodes
being keyword arguments. This patch converts them back to bytes as they are
required.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 28 Apr 2017 00:49:30 +0530] rev 32143
py3: make sure opts are passed and used correctly in help command
opts are converted back to bytes in help.help_() where they are used.
Before that it's ensured that we have a bytes value for keep variable.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 03 May 2017 15:25:06 +0530] rev 32142
py3: handle opts uniformly in commands.py
Since keyword arguments can't be bytes on Python 3, we converted then to
unicodes before passing into different command functions. We need to adopt a
certain pattern to convert opts back to bytes. Following are some of the
functions which are called from inside these command functions and should
always be feeded bytes to follow the right behaviour.
ui.fomattter()
scmutil.match()
patch.diffallopts()
hg.peer()
cmdutil.{show_changeset|copy|graphrevs|checkunsupportedflag}
server.{createservice|runservice}
There are few commands which are left out where opts is again passed to a
function as keyword arguments or converting opts back to bytes is kind of
not necessary. Those are cat, revert, help, unbundle and rollback. Following
patches will deal with them. This patch apart from these five commands,
convert opts back to bytes for rest of the commands.
This fixes a lot of things which are hidden like --git works now. Similarly
more flags of commands which run on Python 3 currently get fixed.
Augie Fackler <augie@google.com> [Thu, 04 May 2017 00:26:55 -0400] rev 32141
merge with stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 03 May 2017 22:56:53 -0400] rev 32140
help: call out specific replacement configuration settings
As an aside, I'm having trouble parsing the help text meaning for HG when it is
unset or empty. How can it be the frozen name or searched if it is empty?
Matt Harbison <matt_harbison@yahoo.com> [Wed, 03 May 2017 22:07:47 -0400] rev 32139
help: spelling fixes
Matt Harbison <matt_harbison@yahoo.com> [Wed, 03 May 2017 22:05:23 -0400] rev 32138
help: attempt to clarify that pager usage is not output length based
This may be too subtle of a change to get the point across, but when I first
read the original text, I thought maybe the pager would only be invoked if
writing more than a screenful. The distinction between this and a pager that
simply exits after printing less than a screenful is important on Windows, given
the inability of `more` to color output.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 03 May 2017 21:58:11 -0400] rev 32137
help: document color/pager pitfalls on Windows
Even though I figured this out a few weeks ago, I was initially puzzled where
the color went when I upgraded to 4.2 on a different Windows machine. Let's
point users reading the help into the right direction.
I wonder if we should be even more explicit about cmd.exe/MSYS/pager/color
interplay, but at least all of the breadcrumbs are here (I think).
Jun Wu <quark@fb.com> [Wed, 03 May 2017 18:04:43 -0700] rev 32136
webcommands: use fctx.isbinary
Jun Wu <quark@fb.com> [Wed, 03 May 2017 18:03:38 -0700] rev 32135
annotate: use fctx.isbinary
Jun Wu <quark@fb.com> [Wed, 03 May 2017 18:02:00 -0700] rev 32134
fileset: use fctx.isbinary instead of util.binary(fctx.data())
filectx provides "isbinary" to test if the data is binary. Let's use it.
This enables other filectx implementations (like LFS) to override the
isbinary test.
Siddharth Agarwal <sid0@fb.com> [Wed, 03 May 2017 14:07:14 -0700] rev 32133
internals: document that "branches" is a legacy wire command
Modern clients use a different discovery mechanism.
Durham Goode <durham@fb.com> [Wed, 03 May 2017 10:30:57 -0700] rev 32132
match: make subinclude construction lazy
The matcher subinclude functionality allows us to have .hgignore files that
include subdirectory hgignore files. Today it parses the entire repo at once,
even if we only need to test a file in one subdirectory. This patch makes the
subinclude tree creation lazy, which speeds up matcher creation significantly in
large repos with very large trees of ignore patterns.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 May 2017 09:09:44 -0700] rev 32131
bisect: allow resetting with unfinished graft/rebase/etc
"hg bisect --reset" just deletes the state file (it doesn't move back
to the starting point like rebase does); it can not conflict with an
ongoing rebase etc.
checkunfinished() has this documentation:
It's probably good to check this right before bailifchanged().
So that's where I moved it.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 21 Apr 2017 01:13:18 +0530] rev 32130
py3: use %d instead of %s for integers
dispatch._runcatch() always returns an integer value.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 21 Apr 2017 00:53:38 +0530] rev 32129
py3: make posix.getuser return a bytes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 20 Apr 2017 19:57:16 +0530] rev 32128
py3: replace str with bytes in isinstance()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 27 Apr 2017 09:49:57 +0530] rev 32127
py3: use pycompat.bytestr() instead of str()
This is because str() on python 3 return unicodes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 20 Apr 2017 19:51:37 +0530] rev 32126
py3: alias long to int on Python 3
Alex Gaynor <agaynor@mozilla.com> [Wed, 03 May 2017 09:41:55 -0400] rev 32125
setup: sys.version_info always exists
It is documented as existing since Python 2.0, and empirically from
other OSS projects I maintain, there is no problem relying on its
existance.
Jun Wu <quark@fb.com> [Tue, 02 May 2017 22:39:14 -0700] rev 32124
filelog: fix parsemeta docstring
75bb7c702317 changed the return type of filelog.parsemeta but forgot to
update its docstring.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 02 May 2017 10:20:44 -0700] rev 32123
util: remove doc of long gone 'targetsize' argument
Gone since
fa836e050c50 (chunkbuffer: removed unused method and arg,
2007-10-11).
Matt Harbison <matt_harbison@yahoo.com> [Tue, 02 May 2017 22:26:09 -0400] rev 32122
test-diff-color: disable pager for expected output on Windows (
issue5555)
Windows uses `more.com`, which unhelpfully adds an extra trailing line
consisting only of '\r'. It also converts tab characters to spaces, which
throws off the last two tests.
Setting the 'ui.formatted' option is what allowed the pager to be used by these
tests in the first place.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 02:05:39 +0200] rev 32121
cleanup: drop the deprecated 'localrepo._link' method
This was deprecated in favor of 'localrepo.wvfs.islink'. We can now drop it for the
future 4.3.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 02:04:55 +0200] rev 32120
cleanup: drop the deprecated 'localrepo.wfile' method
This was deprecated in favor of 'localrepo.wvfs.join'. We can now drop it for the
future 4.3.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 02:03:56 +0200] rev 32119
cleanup: drop the deprecated 'localrepo.join' method
This was deprecated in favor of 'localrepo.vfs.join'. We can now drop it for the
future 4.3.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 02:03:04 +0200] rev 32118
cleanup: drop the deprecated 'localrepo.tag' method
This was deprecated in favor of 'mercurial.tags.tag'. We can now drop it for the
future 4.3.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 02:01:47 +0200] rev 32117
cleanup: drop the deprecated 'localrepo.opener' method
This was deprecated in favor of 'localrepo.vfs'. We can now drop it for the
future 4.3.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 02:01:15 +0200] rev 32116
cleanup: drop the deprecated 'localrepo.wopener' method
This was deprecated in favor of 'localrepo.wvfs'. We can now drop it for the
future 4.3.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 01:59:33 +0200] rev 32115
cleanup: drop vfs compatibility layer in scmutil
All these constructors are deprecated in 4.2. We can now drop them on the
default branch (future 4.3).
Jun Wu <quark@fb.com> [Sat, 22 Apr 2017 17:13:05 -0700] rev 32114
test-worker: exercise more about "killworkers" situation
This patch adds some sleep and increases numcpus to exercise the
"killworkers" situation. So race conditions could be discovered more easily,
if someone changes worker.py incorrectly. Currently worker.py should be free
of such issues.
Jun Wu <quark@fb.com> [Sat, 22 Apr 2017 17:00:50 -0700] rev 32113
test-worker: capture tracebacks more reliably
The traceback test may have traceback caused by SIGTERM. Instead of grepping
"Traceback", explicitly grep the exception we care about.
This makes the test less flaky.
Jun Wu <quark@fb.com> [Sat, 22 Apr 2017 16:50:08 -0700] rev 32112
worker: rewrite error handling so os._exit covers all cases
Previously the worker error handling is like:
pid = os.fork() --+
if pid == 0: |
.... | problematic
.... --+
try: --+
.... | worker error handling
--+
If a signal arrives when Python is executing the "problematic" lines, an
external error handling (dispatch.py) will take over the control flow and
it's no longer guaranteed "os._exit" is called (see
86cd09bc13ba for why it
is necessary).
This patch rewrites the error handling so it covers all possible code paths
for a worker even during fork.
Note: "os.getpid() == parentpid" is used to test if the process is parent or
not intentionally, instead of checking "pid", because "pid = os.fork()" may
be not atomic - it's possible that that a signal hits the worker before the
assignment completes [1]. The newly added test replaces "os.fork" to
exercise that extreme case.
[1]: CPython compiles "pid = os.fork()" to 2 byte codes: "CALL_FUNCTION" and
"STORE_FAST", so it's probably not atomic:
def f():
pid = os.fork()
dis.dis(f)
2 0 LOAD_GLOBAL 0 (os)
3 LOAD_ATTR 1 (fork)
6 CALL_FUNCTION 0
9 STORE_FAST 0 (pid)
12 LOAD_CONST 0 (None)
15 RETURN_VALUE
Jun Wu <quark@fb.com> [Sat, 22 Apr 2017 15:00:17 -0700] rev 32111
dispatch: take over SignalInterrupt handling from scmutil
dispatch handles KeyboardInterrupt already. This makes the code more
consistent, and makes worker not print "killed!" if it receives SIGTERM in
most cases (in rare cases there is still "killed!" printed, which will be
fixed by the next patch).
Kevin Bullock <kbullock+mercurial@ringworld.org> [Tue, 02 May 2017 17:29:01 -0500] rev 32110
merge stable into default
Kevin Bullock <kbullock@ringworld.org> [Tue, 02 May 2017 17:09:00 -0500] rev 32109
Added signature for changeset
bb96d4a49743
Kevin Bullock <kbullock@ringworld.org> [Tue, 02 May 2017 17:08:54 -0500] rev 32108
Added tag 4.2 for changeset
bb96d4a49743
Kevin Bullock <kbullock+mercurial@ringworld.org> [Tue, 02 May 2017 16:35:12 -0500] rev 32107
merge with i18n
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 01 May 2017 07:23:29 +0900] rev 32106
i18n-ja: synchronized with
6e0368b6e0bb
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 17:18:13 +0200] rev 32105
pager: drop the support for 'pager.enable=<bool>'
This option was never released except for a release candidate. Dropping
compatibility with this option will free the 'pager.enable' config option for
other usage in the future.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 01 May 2017 16:36:50 +0200] rev 32104
pager: rename 'pager.enable' to 'ui.paginate'
This aligns with what we do for color (see
7fec37746417). Pager is a central
enough notion that having the master config in the [ui] section makes senses. It
will helps with consistency, discoverability. It will also help having a simple
and clear example hgrc mentioning pager.
The previous form of the option had never been released in a non-rc version but
we keep it around for convenience. If both are set, 'ui.pager' take priority.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 20:19:09 +0200] rev 32103
color: special case 'always' in 'ui.color'
This lift the confusing case, where 'ui.color=always' would actually not always
use color.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 02 May 2017 20:01:54 +0200] rev 32102
color: turn 'ui.color' into a boolean (auto or off)
Previously, 'ui.color=yes' meant "always show color", While
"ui.color=auto" meant "use color automatically when it appears
sensible".
This feels problematic to some people because if an administrator has
disabled color with "ui.color=off", and a user turn it back on using
"color=on", it will get surprised (because it breaks their output when
redirected to a file.) This patch changes ui.color=true to only move the
default value of --color from "never" to "auto".
I'm not really in favor of this changes as I suspect the above case will
be pretty rare and I would rather keep the logic simpler. However, I'm
providing this patch to help the 4.2 release in the case were others
decide to make this changes.
Users that want to force colors without specifying --color on the
command line can use the 'ui.formatted' config knob, which had to be
enabled in a handful of tests for this patch.
Nice summary table (credit: Augie Fackler)
That is, before this patch:
+--------------------+--------------------+--------------------+
| | not a tty | a tty |
| | --color not set | --color not set |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color (not set) | no color | no color |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color = auto | no color | color |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color = yes | *color* | color |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color = no | no color | no color |
| | | |
+--------------------+--------------------+--------------------+
(if --color is specified, it always clobbers the setting in [ui])
and after this patch:
+--------------------+--------------------+--------------------+
| | not a tty | a tty |
| | --color not set | --color not set |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color (not set) | no color | no color |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color = auto | no color | color |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color = yes | *no color* | color |
| | | |
+--------------------+--------------------+--------------------+
| [ui] | | |
| color = no | no color | no color |
| | | |
+--------------------+--------------------+--------------------+
(if --color is specified, it always clobbers the setting in [ui])