Augie Fackler <augie@google.com> [Tue, 11 Aug 2015 14:50:39 -0400] rev 26008
reachableroots: consistently use short-form of PyErr_NoMemory()
Augie Fackler <augie@google.com> [Tue, 11 Aug 2015 14:49:40 -0400] rev 26007
reachableroots: if allocating a new set fails, use PyErr_NoMemory()
My inspection of the implementation of PySet_New() indicates that it
does *not* reliably set an exception in the cases where it returns
NULL (as far as I can tell it'll never do that!), so let's set that up
ourselves.
Laurent Charignon <lcharignon@fb.com> [Thu, 06 Aug 2015 22:11:20 -0700] rev 26006
reachableroots: default to the C implementation
This patch is part of a series of patches to speed up the computation of
revset.reachableroots by introducing a C implementation. The main motivation is to
speed up smartlog on big repositories. At the end of the series, on our big
repositories the computation of reachableroots is 10-50x faster and smartlog on is
2x-5x faster.
Before this patch, reachableroots was computed in pure Python by default. This
patch makes the C implementation the default and provides a speedup for
reachableroots.
Laurent Charignon <lcharignon@fb.com> [Thu, 06 Aug 2015 22:10:31 -0700] rev 26005
changelog: add way to call the reachableroots C implementation
This patch is part of a series of patches to speed up the computation of
revset.reachableroots by introducing a C implementation. The main motivation is
to speed up smartlog on big repositories. At the end of the series, on our big
repositories the computation of reachableroots is 10-50x faster and smartlog on
is 2x-5x faster.
This patch allows us to call the new C implementation of reachableroots from
python by creating an entry point in the changelog class.
Laurent Charignon <lcharignon@fb.com> [Thu, 06 Aug 2015 21:28:45 -0700] rev 26004
reachableroots: add a C implementation
This patch is part of a series of patches to speed up the computation of
revset.reachableroots by introducing a C implementation. The main motivation is to
speed up smartlog on big repositories. At the end of the series, on our big
repositories the computation of reachableroots is 10-50x faster and smartlog on is
2x-5x faster.
This patch introduces a C implementation for reachableroots following closely the
Python implementation but optimized by using C data structures.
Laurent Charignon <lcharignon@fb.com> [Fri, 19 Jun 2015 20:28:52 -0700] rev 26003
revset: remove grandparent by using reachableroots
This patch is part of a series of patches to speed up the computation of
revset.reachableroots by introducing a C implementation. The main motivation
is to speed up smartlog on big repositories. At the end of the series, on our
big repositories the computation of reachableroots is 10-50x faster and
smartlog on is 2x-5x faster.
Before this patch, we had a custom computation for grandparent that was very
close to the idea of reacheablerooots. This patch expresses grandparent with
reachableroots to reduce the amount of code.
Laurent Charignon <lcharignon@fb.com> [Fri, 19 Jun 2015 20:18:54 -0700] rev 26002
revset: rename revsbetween to reachableroots and add an argument
This patch is part of a series of patches to speed up the computation of
revset.revsbetween by introducing a C implementation. The main motivation is to
speed up smartlog on big repositories. At the end of the series, on our big
repositories the computation of revsbetween is 10-50x faster and smartlog on is
2x-5x faster.
This patch rename 'revsbetween' to 'reachableroots' and makes the computation of
the full path optional. This will allow graphlog to compute grandparents using
'reachableroots' and remove the need for a dedicated grandparent function.
Laurent Charignon <lcharignon@fb.com> [Fri, 07 Aug 2015 02:13:42 -0700] rev 26001
revset: make revsbetween public
This patch is part of a series of patches to speed up the computation of
revset.revsbetween by introducing a C implementation. The main motivation is to
speed up smartlog on big repositories. At the end of the series, on our big
repositories the computation of revsbetween is 10-50x faster and smartlog on is
2x-5x faster.
Later in this serie, we want to reuse the implementation of revsbetween in the
changelog module, therefore, we make it public.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 06 Aug 2015 21:00:16 -0400] rev 26000
match: fix a caseonly rename + explicit path commit on icasefs (
issue4768)
The problem was that the former name and the new name are both normalized to the
case in dirstate, so matcher._files would be ['ABC.txt', 'ABC.txt'].
localrepo.commit() calls localrepo.status(), passing along the matcher. Inside
dirstate.status(), _walkexplicit() simply grabs matcher.files() and processes
those items. Since the old name isn't present, it is silently dropped. There's
a fundamental tension here, because the status command should also accept files
that don't match the filesystem, so we can't drop the normalization in status.
The problem originated in
baa11dde8c0e.
Unfortunately with this change, the case of the old file must still be specified
exactly, or the old file is again silently excluded. I went back to
baa11dde8c0e^, and that had the same behavior, so we are no worse off. I'm open
to ideas from a matcher or dirstate expert on how to fix that half.
Anton Shestakov <av6@dwimlabs.net> [Tue, 11 Aug 2015 13:19:42 +0800] rev 25999
style: adjust whitespaces in webutil.py
Turns out, all this came from the single
d605a82cf189.
Matt Mackall <mpm@selenic.com> [Mon, 10 Aug 2015 15:30:28 -0500] rev 25998
merge with stable
Durham Goode <durham@fb.com> [Thu, 06 Aug 2015 17:21:46 -0700] rev 25997
convert: fix git copy file content conversions
There was a bug in the git convert code where if you copied a file and modified
the copy source in the same commit, and if the copy dest was alphabetically
earlier than the copy source, the converted version would use the copy dest
contents for both the source and the target.
The root of the bug is that the git diff-tree output is formatted like so:
:<mode> <mode> <oldhash> <newhash> <state> <src> <dest>
:100644 100644
c1ab79a15...
3dfc779ab... C069 oldname newname
:100644 100644
c1ab79a15...
03e2188a6... M oldname
The old code would always take the 'oldname' field as the name of the file being
processed, then it would try to do an extra convert for the newname. This works
for renames because it does a delete for the oldname and a create for the
newname.
For copies though, it ends up associating the copied content (
3dfc779ab above)
with the oldname. It only happened when the dest was alphabetically before
because that meant the copy got processed before the modification.
The fix is the treat copy lines as affecting only the newname, and not marking
the oldname as processed.
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Aug 2015 16:09:41 +0900] rev 25996
revset: prevent crash caused by empty group expression while optimizing "or"
An empty group expression "()" generates None in AST, so it should be tested
before destructuring a tuple.
"A | ()" is still evaluated to an error because I'm not sure whether "()"
represents an empty set or an empty expression (= a unit value). They are
identical in "or" operation, but they should be evaluated differently in
"and" operation.
expression empty set unit value
---------- --------- ----------
() {} A
A & () {} A
A | () A A
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Aug 2015 16:06:36 +0900] rev 25995
revset: prevent crash caused by empty group expression while optimizing "and"
An empty group expression "()" generates None in AST, so the optimizer have
to test it before destructuring a tuple. The error message, "missing argument",
is somewhat obscure, but it should be better than crash.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:52:59 -0700] rev 25994
win32: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:53:17 -0700] rev 25993
wireproto: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:44:41 -0700] rev 25992
worker: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:48:10 -0700] rev 25991
verify: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:14:50 -0700] rev 25990
url: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:25:41 -0700] rev 25989
ui: use absolute_import
And we have no more ambiguous mixed imports \o/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:13:11 -0700] rev 25988
unionrepo: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:11:56 -0700] rev 25987
treediscovery: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:10:23 -0700] rev 25986
transaction: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:23:53 -0700] rev 25985
templater: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:09:43 -0700] rev 25984
templatekw: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:08:52 -0700] rev 25983
templatefilters: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:16:56 -0700] rev 25982
tags: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:10:46 -0700] rev 25981
tagmerge: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:03:58 -0700] rev 25980
subrepo: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:01:40 -0700] rev 25979
strutil: use absolute_import
This file doesn't import anything. But chances are we'll eventually
implement a static analysis check that ensures absolute_import is used.
So we might as well add this.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 20:11:08 -0700] rev 25978
statichttprepo: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:56:22 -0700] rev 25977
sslutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:55:39 -0700] rev 25976
sshserver: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:55:01 -0700] rev 25975
sshpeer: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:54:11 -0700] rev 25974
simplemerge: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:53:25 -0700] rev 25973
setdiscovery: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:58:05 -0700] rev 25972
repoview: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:36:58 -0700] rev 25971
revset: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:50:48 -0700] rev 25970
repair: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:57:27 -0700] rev 25969
pushkey: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:57:10 -0700] rev 25968
progress: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:56:58 -0700] rev 25967
posix: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:46:33 -0700] rev 25966
phases: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:45:45 -0700] rev 25965
peer: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:45:15 -0700] rev 25964
pathutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:44:05 -0700] rev 25963
parser: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:43:24 -0700] rev 25962
node: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:42:58 -0700] rev 25961
namespaces: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:42:16 -0700] rev 25960
minirst: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:41:25 -0700] rev 25959
merge: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:39:45 -0700] rev 25958
match: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:32:19 -0700] rev 25957
mail: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:30:17 -0700] rev 25956
lock: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:28:49 -0700] rev 25955
i18n: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:35:28 -0700] rev 25954
httppeer: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:24:40 -0700] rev 25953
hook: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:22:11 -0700] rev 25952
hbisect: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:18:23 -0700] rev 25951
graphmod: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:17:40 -0700] rev 25950
formatter: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:15:09 -0700] rev 25949
filemerge: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:11:42 -0700] rev 25948
filelog: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:16:16 -0700] rev 25947
fancyopts: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:13:14 -0700] rev 25946
extensions: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:09:09 -0700] rev 25945
error: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:07:11 -0700] rev 25944
discovery: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:05:28 -0700] rev 25943
demandimport: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:04:09 -0700] rev 25942
dagutil: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:03:34 -0700] rev 25941
dagparser: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 19:05:55 -0700] rev 25940
crecord: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:52:36 -0700] rev 25939
hg: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 18:34:37 -0700] rev 25938
fileset: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 16:13:27 -0700] rev 25937
demandimport: support lazy loading for absolute_import
Before, we didn't support lazy loading if absolute_import was in
effect and a fromlist was used. This meant that "from . import X"
wasn't lazy and performance could suffer as a result.
With this patch, we now support lazy loading for this scenario.
As part of developing this, I discovered issues when module names
are defined. Since the enforced import style only allows
"from X import Y" or "from .X import Y" in very few scenarios
when absolute_import is enabled - scenarios where Y is not a
module and thus there is nothing to lazy load - I decided to drop
support for this case instead of chasing down the errors. I don't
think much harm will come from this. But I'd like to take another
look once all modules are using absolute_import and I can see the
full extent of what is using names in absolute_import mode.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 17:07:34 -0700] rev 25936
demandimport: support keyword arguments on _hgextimport
__import__ supports keyword arguments since Python 2.5. This
proxy should too.
An upcoming patch will use this feature.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 16:24:57 -0700] rev 25935
demandimport: refactor logic and add documentation
demandimport doesn't currently support absolute imports (level >= 0).
In preparation for this, we add some documentation and a code branch
to handle the absolute_import case.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 17:12:37 -0700] rev 25934
demandimport: add __future__ to ignore list
__future__ is special. We should definitely not be trying to lazy
load it.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 15:01:27 -0700] rev 25933
demandimport: remove support for Python < 2.5
The removed code was to support an __import__ function that doesn't
support the "level" argument. This argument was added in Python 2.5,
which we no longer support.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 14:42:48 -0700] rev 25932
dispatch: use absolute_import
A mixed, ambiguous import has been removed!
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 14:30:39 -0700] rev 25931
commands: break import cycle
This was the easiest link in the chain to break as there was only
one use of commandserver in commands.py. Other files had multiple
users.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:47:19 -0700] rev 25930
cmdutil: break import cycle
This was the easiest place to break the chain, as there were only
2 uses of the imported module in the file.
Yuya Nishihara <yuya@tcha.org> [Sun, 05 Jul 2015 12:50:09 +0900] rev 25929
revset: make balanced addsets by orset() without using _combinesets()
As scmutil.revrange() was rewritten to not use _combinesets(), we no longer
need _combinesets().
Yuya Nishihara <yuya@tcha.org> [Sun, 05 Jul 2015 12:35:42 +0900] rev 25928
revrange: evaluate all revset specs at once
This provides an opportunity for revset to optimize given expressions. For
example, "-r0 -r1 -r2" can be optimized to "_list(0 1 2)".
Yuya Nishihara <yuya@tcha.org> [Fri, 07 Aug 2015 21:39:38 +0900] rev 25927
revset: add matchany() to construct OR expression from a list of specs
This will allow us to optimize "-rREV1 -rREV2 ..." command-line options.
Yuya Nishihara <yuya@tcha.org> [Fri, 07 Aug 2015 21:31:16 +0900] rev 25926
revset: split post-parsing stage from match()
_makematcher() will be reused by new matchany(ui, specs, repo=None) function
I'll add by the next patch.
Anton Shestakov <av6@dwimlabs.net> [Sat, 08 Aug 2015 14:42:27 +0800] rev 25925
filesets: ignore unit case in size() predicate for single value
When specifying one plain value in size(), e.g. size(1k), fileset tries to
guess the upper bound automatically (see the comment in _sizetomax()). It
didn't ignore the specified unit's case, and so size("1 GB"), for example,
produced this error:
hg: parse error: couldn't parse size: 1 GB
Let's do the same thing that util.sizetoint() does: .lower().
The two test lines without output just check that there are no parse errors.
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:41:13 -0700] rev 25924
copies: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:28:53 -0700] rev 25923
config: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:26:49 -0700] rev 25922
changelog: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:35:37 -0700] rev 25921
changegroup: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Aug 2015 00:36:35 -0700] rev 25920
bundlerepo: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Aug 2015 19:54:08 -0700] rev 25919
bundle2: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Aug 2015 19:51:55 -0700] rev 25918
branchmap: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Aug 2015 19:49:21 -0700] rev 25917
bookmarks: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Aug 2015 19:47:49 -0700] rev 25916
archival: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 07 Aug 2015 19:45:48 -0700] rev 25915
ancestor: use absolute_import
A few months ago, import-checker.py was taught to enforce a more
well-defined import style for files with absolute_import. However,
we stopped short of actually converting source files to use
absolute_import because of problems with certain files.
Investigation revealed the following problems with switching to
absolute_import universally:
1) import cycles result in import failure on Python 2.6
2) undetermined way to import C/pure modules
While these problems need to be solved, they can be put off.
This patch starts a series of converting files to absolute_import
that won't exhibit any of the aforementioned problems.
Augie Fackler <augie@google.com> [Wed, 05 Aug 2015 14:21:46 -0400] rev 25914
discovery: always use batching now that all peers support batching
Some peers will transparently downgrade batched requests to
non-batched ones, but that simplifies code for everyone using
batching.
Augie Fackler <augie@google.com> [Wed, 05 Aug 2015 14:15:17 -0400] rev 25913
wireproto: make wirepeer look-before-you-leap on batching
This means that users of request batching don't need to worry
themselves with capability checking. Instead, they can just use
batching, and if the remote server doesn't support batching for some
reason the wirepeer code will transparently un-batch the requests.
This will allow for some slight simplification in a handful of
places. Prior to this change, largefiles would have been silently
broken against a server which did not support batching.