Pulkit Goyal <7895pulkit@gmail.com> [Fri, 05 May 2017 01:26:13 +0530] rev 32153
py3: slice over bytes to prevent getting ascii values
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 08 Apr 2017 11:02:37 +0530] rev 32152
py3: use encoding.unitolocal instead of .encode(encoding.encoding)
Durham Goode <durham@fb.com> [Wed, 03 May 2017 10:43:59 -0700] rev 32151
rebase: use matcher to optimize manifestmerge
The old merge code would call manifestmerge and calculate the complete diff
between the source to the destination. In many cases, like rebase, the vast
majority of differences between the source and destination are irrelevant
because they are differences between the destination and the common ancestor
only, and therefore don't affect the merge. Since most actions are 'keep', all
the effort to compute them is wasted.
Instead, let's compute the difference between the source and the common ancestor
and only perform the diff of those files against the merge destination. When
using treemanifest, this lets us avoid loading almost the entire tree when
rebasing from a very old ancestor. This speeds up rebase of an old stack of 27
commits by 20x.
In mozilla-central, without treemanifest, when rebasing a commit from
default~100000 to default, this speeds up the manifestmerge step from 2.6s to
1.2s. However, the additional diff adds an overhead to all manifestmerge calls,
especially for flat manifests. When rebasing a commit from default~1 to default
it appears to add 100ms in mozilla-central. While we could put this optimization
behind a flag, I think the fact that it makes merge O(number of changes being
applied) instead of O(number of changes between X and Y) justifies it.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 02 May 2017 23:47:10 -0700] rev 32150
changegroup: delete unused 'bundlecaps' argument (API)
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.