Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:53:03 -0700] rev 31401
match: don't use mutable default argument value
There shouldn't be a big perf hit creating a new object because
this function is complicated and does things that dwarf the cost
of creating a new PyObject.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:52:17 -0700] rev 31400
hgweb: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 26 Dec 2016 16:55:47 -0700] rev 31399
hgweb: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 26 Dec 2016 16:54:33 -0700] rev 31398
filemerge: don't use mutable default argument value
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 12 Mar 2017 21:50:42 -0700] rev 31397
context: don't use mutable default argument value
Mutable default argument values are a Python gotcha and can
represent subtle, hard-to-find bugs. Lets rid our code base
of them.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 11:19:24 -0700] rev 31396
heads: enable pager
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Mar 2017 11:03:59 -0700] rev 31395
branches: enable pager
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:16:43 -0700] rev 31394
py3: fix slicing of bytes in revset.formatspec()
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:13:54 -0700] rev 31393
py3: make set of revset operators and quotes in bytes
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:10:14 -0700] rev 31392
py3: convert set of revset initial symbols back to bytes
Otherwise tokenize() would fail due to comparison between unicode and bytes.
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 17:04:45 -0700] rev 31391
pycompat: add helper to iterate each char in bytes
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 19:47:51 -0400] rev 31390
branchmap: fix python 2.6 by using util.buffer() instead of passing bytearray
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 16:44:01 -0700] rev 31389
rebase: allow rebasing children of wd to wd if a new branch has been set (BC)
The named branch of the leaf changeset can be changed by updating to it,
setting the branch, and amending.
But previously, there was no good way to *just* change the branch of several
linear changes. If rebasing changes with another parent to '.', it would pick
up a pending branch change up. But when rebasing changes that have the same
parent, it would fail with 'nothing to rebase', even when the branch name was
set differently.
To fix this, allow rebasing to same parent when a branch has been set.
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 16:41:46 -0700] rev 31388
merge: check current wc branch for 'nothing to merge', not its p1
The working directory will usually be clean or very clean, and wc will usually
have the same branch as its parent. This change will thus usually not make any
difference and is done as a separate change to show that. It will be used in a
later change.
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 16:26:34 -0700] rev 31387
lock: do not encode result of gethostname on Python 2
If a hostname contained non-ascii character, str.encode() would first try
to decode it to a unicode and raise UnicodeDecodeError.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:33:38 -0400] rev 31386
py3: prove `hg files --rev` works
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:37:45 -0400] rev 31385
tests: make a variable for hg binary location in test-check-py3-commands
The number of which calls in here is starting to get silly.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:28:50 -0400] rev 31384
lock: encode result of gethostname into a bytestring
Martijn Pieters <mjpieters@fb.com> [Sun, 12 Mar 2017 12:56:12 -0700] rev 31383
config: avoid using a mutable default
Nothing *currently* mutates this list, but the moment something does it'll be
shared between all config instances. Avoid this eventuality.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:09:04 +0200] rev 31382
localrepo: deprecate 'repo.join' in favor of 'repo.vfs.join'
localrepo have an insane amount of method. Accessing the feature through the
vfs is not really harder and allow us to schedule that method for removal.
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 12:54:11 -0700] rev 31381
pycompat: move imports of cStringIO/io to where they are used
There's no point to import cStringIO as io since we have to select StringIO
or BytesIO conditionally.
Mads Kiilerich <mads@kiilerich.com> [Sun, 12 Mar 2017 12:17:30 -0700] rev 31380
rbc: empty (and invalid) rbc-names file should give an empty name list
An empty file (if it somehow should exist) used to give a list with an empty
name. That didn't do any harm, but it was "wrong". Fix that.
Mads Kiilerich <madski@unity3d.com> [Wed, 19 Oct 2016 02:46:35 +0200] rev 31379
rbc: use struct unpack_from and pack_into instead of unpack and pack
These functions were introduced in Python 2.5 and are faster and simpler than
the old ones ... mainly because we can avoid intermediate buffers:
$ python -m timeit -s "_rbcrecfmt='>4sI'" -s 's = "x"*10000' -s 'from struct import unpack' 'unpack(_rbcrecfmt, buffer(s, 16, 8))'
1000000 loops, best of 3: 0.543 usec per loop
$ python -m timeit -s "_rbcrecfmt='>4sI'" -s 's = "x"*10000' -s 'from struct import unpack_from' 'unpack_from(_rbcrecfmt, s, 16)'
1000000 loops, best of 3: 0.323 usec per loop
$ python -m timeit -s "from array import array" -s "_rbcrecfmt='>4sI'" -s "s = array('c')" -s 's.fromstring("x"*10000)' -s 'from struct import pack' -s "rec = array('c')" 'rec.fromstring(pack(_rbcrecfmt, "asdf", 7))'
1000000 loops, best of 3: 0.364 usec per loop
$ python -m timeit -s "from array import array" -s "_rbcrecfmt='>4sI'" -s "s = array('c')" -s 's.fromstring("x"*10000)' -s 'from struct import pack_into' -s "rec = array('c')" -s 'rec.fromstring("x"*100)' 'pack_into(_rbcrecfmt, rec, 0, "asdf", 7)'
1000000 loops, best of 3: 0.229 usec per loop
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 15:27:02 -0400] rev 31378
revlog: use bytes() instead of str() to get data from memoryview
Fixes `files -v` on Python 3.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:33:22 -0400] rev 31377
util: teach url object about __bytes__
__str__ tries to do something reasonable, but someone else more
familiar with encoding bugs should check my work.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:31:54 -0400] rev 31376
manifest: ensure paths are bytes (not str) in pure parser
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:30:15 -0400] rev 31375
manifest: now that node.bin is available, use it directly
Previously we were getting it through revlog, which is a little unusual.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:29:48 -0400] rev 31374
manifest: use node.bin instead of .decode('hex')
The latter doesn't work in Python 3.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:43:20 -0500] rev 31373
manifest: add __next__ methods for Python 3
Python 3 renamed .next() in the iterator protocol to __next__().
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:51:00 -0500] rev 31372
files: use native string type to load rev opt from dict
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:50:44 -0500] rev 31371
store: fix many single-byte ops to use slicing in _auxencode
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 13 Mar 2017 04:06:36 +0900] rev 31370
py3: add "b" prefix to string literals related to module policy
String literals without explicit prefix in __init__.py and policy.py
are treated as unicode object on Python3, because these modules are
loaded before setup of our specific code transformation (the later
module is imported at the beginning of __init__.py).
BTW, "modulepolicy" in __init__.py is initialized by "policy.policy".
This causes issues below;
- checking "policy" value in other modules causes unintentional result
For example, "b'py' not in (u'c', u'py')" returns True
unintentionally on Python3.
- writing "policy" out fails at conversion from unicode to bytes
62939e0148f1 fixed this issue for default code path, but "policy"
can be overridden by HGMODULEPOLICY environment variable (it should
be rare case for developer using Python3, though).
This patch does:
- add "b" prefix to all string literals, which are related to module
policy, in modules above.
- check existence of HGMODULEPOLICY, and overwrite "policy" only if
it exists
For simplicity, this patch omits checking "supports_bytes_environ",
switching os.environ/os.environb, and so on (Yuya agreed this in
personal talking)
Yuya Nishihara <yuya@tcha.org> [Sun, 12 Mar 2017 11:47:02 -0700] rev 31369
py3: drop unused aliases to array.array which are replaced with bytearray
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 13 Mar 2017 00:55:14 +0530] rev 31368
pycompat: default to BytesIO instead of StringIO
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:48:06 -0500] rev 31367
repoview: specify setattr values as native strings
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:32:38 -0400] rev 31366
revlog: use bytes() to ensure text from _chunks is a reasonable type
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:49:49 -0500] rev 31365
revlog: extract first byte of revlog with a slice so it's portable
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:46:59 -0500] rev 31364
revsetlang: slice out single bytes instead of indexing
For portability with Python 3.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:29:04 -0400] rev 31363
lock: use %d to format integer into a bytestring
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:44:59 -0500] rev 31362
parser: use %d instead of %s for interpolating error position
Error position is an int, so we should use %d instead of %s. Fixes
failures on Python 3.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:44:21 -0500] rev 31361
manifest: unbreak pure-python manifest parsing on Python 3
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:43:47 -0500] rev 31360
context: use portable construction to verify int parsing
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 01:59:23 -0500] rev 31359
ui: portably bytestring-ify url object
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:47:39 -0500] rev 31358
scmutil: fix key generation to portably bytestringify integer
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:42:46 -0500] rev 31357
branchmap: stringify int in a portable way
We actually need a bytes in Python 3, and thanks to our nasty source
loader this will portably do the right thing.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 00:49:19 -0500] rev 31356
branchmap: don't use buffer() on Python 3
This is certainly slower than the Python 2 code, but it works, and we
can revisit it later if it's a problem.
Augie Fackler <augie@google.com> [Sun, 12 Mar 2017 03:32:21 -0400] rev 31355
py3: use bytearray() instead of array('c', ...) constructions
Portable from 2.6-3.6.
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:58:26 -0500] rev 31354
summary: don't explicitly str() something we're about to %s
str() is wrong on Python 3 here, and %s implicitly calls str() anyway,
so this was just extra dancing for no reason.
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:57:40 -0500] rev 31353
context: implement both __bytes__ and __str__ for Python 3
They're very similar, for obvious reasons.
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:57:04 -0500] rev 31352
context: work around `long` not existing on Python 3
I can't figure out what this branch is even trying to accomplish, and
it was introduced in ac89a23ca814 which doesn't really shed any
insight into why longs are treated differently from ints.
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:53:20 -0500] rev 31351
phases: explicitly evaluate list returned by map
On Python 3 map() returns a generator, which bool()s to true even if
it had an empty input set. Work around this by using list() on the
map() result.
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 20:51:09 -0500] rev 31350
ui: check for --debugger in sys.argv using r-string to avoid bytes on py3
Our source loader was errantly turning this --debugger into a bytes,
which was then causing me to still get a pager when I was using the
debugger on py3. That made life hard.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 22:46:57 +0530] rev 31349
minirst: use bytes.strip instead of str.strip
bytes.strip exists in Python 2.6 and Python 2.7 also.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 22:27:53 +0530] rev 31348
smcposix: pass unicode as first argument to array.array
This is an instance where we can safely convert the first argument, rest are
the cases except one where we are using 'c' which is not there in Python 3. So
that needs to be handled differently. This will help in making `hg help` run on
Python 3.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 07:35:13 +0530] rev 31347
util: pass encoding.[encoding|encodingmode] as unicodes
We need to pass str to encode() and decode().
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:57 -0800] rev 31346
win32text: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:49 -0800] rev 31345
transplant: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:42 -0800] rev 31344
shelve: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:30 -0800] rev 31343
share: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:16 -0800] rev 31342
mq: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:52:06 -0800] rev 31341
largefiles: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:57 -0800] rev 31340
keyword: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:49 -0800] rev 31339
journal: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:43 -0800] rev 31338
histedit: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:36 -0800] rev 31337
eol: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:51:25 -0800] rev 31336
convert: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:55 -0800] rev 31335
test-bundle2-remote-changegroup: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:47 -0800] rev 31334
subrepo: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:39 -0800] rev 31333
repair: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:32 -0800] rev 31332
merge: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:24 -0800] rev 31331
hg-mod: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:17 -0800] rev 31330
commands: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:53:09 -0800] rev 31329
cmdutil: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:29:22 +0200] rev 31328
localrepo: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 07:09:18 +0530] rev 31327
minirst: make encoding.encoding unicodes to pass into encode() and decode()
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 12 Mar 2017 06:59:37 +0530] rev 31326
minirst: make regular expressions bytes
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 11 Mar 2017 17:14:02 -0800] rev 31325
setup: convert setupversion to unicode
Something deep in the bowels of distutils expects "version" passed to
setup() to be a str/unicode. So, convert the type.
This still works on Python 2 because the string is ascii and an
implicit coercion back to str/bytes should work without issue. If
it does cause problems, we can always make the unicode conversion
dependent on running Python 3.
This change makes `python3.5 setup.py install` work.
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 31324
util: add debugstacktrace depth limit
Useful when you don't care about the start of the stack, but only want to see
the last entries.
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 04:26:40 +0100] rev 31323
util: strip trailing newline from debugstacktrace message
This makes the function more convenient to use as drop-in replacement for
ui.write & co.
Mads Kiilerich <madski@unity3d.com> [Fri, 16 Jan 2015 04:26:40 +0100] rev 31322
tests: rework util.debugstacktrace tests
Prepare for adding another test.
Mads Kiilerich <mads@kiilerich.com> [Sat, 11 Mar 2017 11:04:14 -0800] rev 31321
vfs: use repo.vfs.rename
Mads Kiilerich <mads@kiilerich.com> [Sat, 11 Mar 2017 11:02:25 -0800] rev 31320
vfs: use repo.vfs.unlinkpath
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 31319
merge: use repo.wvfs.unlinkpath
Mads Kiilerich <madski@unity3d.com> [Wed, 14 Jan 2015 01:15:26 +0100] rev 31318
vfs: use repo.wvfs.unlinkpath
Augie Fackler <raf@durin42.com> [Wed, 08 Mar 2017 18:11:41 -0500] rev 31317
policy: try and always have a bytes for module policy
debuginstall now runs cleanly in Python 3.
Augie Fackler <raf@durin42.com> [Wed, 08 Mar 2017 18:11:19 -0500] rev 31316
init: zstd is already python3-ready, so don't run it through our importer
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 14:42:56 -0500] rev 31315
config: guard against setconfig specifying unicode values on py3
This was leading to some difficult to trace problems because the
values were set in one place, but then blew up much later in the
program. Exploding violently with an assertion seems reasonable here.
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 14:43:27 -0500] rev 31314
dispatch: enforce bytes when converting boolean flags to config items
This fixes --verbose on Python 3.
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 13:52:08 -0500] rev 31313
py3: add a test that proves %include and missing-extension code works
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 14:08:02 -0500] rev 31312
extensions: tapdance to get reasonable import error formatting
I'm not thrilled with this, but it seems to work.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 11 Mar 2017 10:35:44 -0800] rev 31311
rebase: abort if *any* commit in rebase set is public
Augie Fackler <augie@google.com> [Sat, 11 Mar 2017 13:53:14 -0500] rev 31310
merge with stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 20:53:14 -0800] rev 31309
httpconnection: rename config to groups
Because that is what it is.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 20:51:57 -0800] rev 31308
httpconnection: don't use dict()
Not sure the history here. But we don't do this elsewhere.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Mar 2017 15:38:00 -0800] rev 31307
formatter: set _first on formatter, not ui
The _first field is used for tracking when to emit a separator between
items. It seems like it's clearly formatter state, not ui state, so
let's move it there.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Mar 2017 23:07:20 -0800] rev 31306
rebase: unhide original working directory node as well (issue5219)
By including the working directory revision at the start of rebase in
the repo._rebaseset, we make sure it's not hidden when we update back
to it at the end of the rebase.
This feels like abusing the set a bit given its name (_rebaseset), but
I couldn't think of another name that's clearly better.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Mar 2017 23:06:31 -0800] rev 31305
rebase: pass in a regular set to _setrebasesetvisibility()
Trivial refactoring to simplify the next patch.
Martin von Zweigbergk <martinvonz@google.com> [Wed, 01 Feb 2017 09:18:44 -0800] rev 31304
tests: demonstrate broken rebase from obsolete commit
This shows the bug I reported in issue 5219.
Durham Goode <durham@fb.com> [Wed, 01 Mar 2017 16:19:41 -0800] rev 31303
treemanifest: make node reuse match flat manifest behavior
In a flat manifest, a node with the same content but different parents is still
considered a new node. In the current tree manifests however, if the content is
the same, we ignore the parents entirely and just reuse the existing node.
In our external treemanifest extension, we want to allow having one treemanifest
for every flat manifests, as a way of easeing the migration to treemanifests. To
make this possible, let's change the root node treemanifest behavior to match
the behavior for flat manifests, so we can have a 1:1 relationship.
While this sounds like a BC breakage, it's not actually a state users can
normally get in because: A) you can't make empty commits, and B) even if you try
to make an empty commit (by making a commit then amending it's changes away),
the higher level commit logic in localrepo.commitctx() forces the commit to use
the original p1 manifest node if no files were changed. So this would only
affect extensions and automation that reached passed the normal
localrepo.commit() logic straight into the manifest logic.
Augie Fackler <augie@google.com> [Fri, 10 Mar 2017 17:37:39 -0500] rev 31302
help: update help.internalstable for new censor docs
Augie Fackler <augie@google.com> [Fri, 10 Mar 2017 16:54:41 -0500] rev 31301
parsers: drop old nonnormalentries method
This is okay to do because the Python will fall back transparently if
the method is missing.
Augie Fackler <augie@google.com> [Fri, 10 Mar 2017 16:53:00 -0500] rev 31300
parsers: avoid leak of nonnset and otherpset
Py_BuildValue increments the refcount, rather than stealing the
reference, which I missed in code review.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 20:33:29 -0800] rev 31299
sslutil: issue warning when [hostfingerprint] is used
Mercurial 3.9 added the [hostsecurity] section, which is better
than [hostfingerprints] in every way.
One of the ways that [hostsecurity] is better is that it supports
SHA-256 and SHA-512 fingerprints, not just SHA-1 fingerprints.
The world is moving away from SHA-1 because it is borderline
secure. Mercurial should be part of that movement.
This patch adds a warning when a valid SHA-1 fingerprint from
the [hostfingerprints] section is being used. The warning informs
users to switch to [hostsecurity]. It even prints the config
option they should set. It uses the SHA-256 fingerprint because
recommending a SHA-1 fingerprint in 2017 would be ill-advised.
The warning will print itself on every connection to a server until
it is fixed. There is no way to suppress the warning. I admit this
is annoying. But given the security implications of sticking with
SHA-1, I think this is justified. If this patch is accepted,
I'll likely send a follow-up to start warning on SHA-1
certificates in [hostsecurity] as well. Then sometime down
the road, we can drop support for SHA-1 fingerprints.
Credit for this idea comes from timeless in issue 5466.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 19:59:52 -0800] rev 31298
setup: use setuptools on Windows (issue5400)
We've had a long, complicated history with setuptools. We want to
make it the universal default. But when we do, it breaks things.
`python setup.py build` is broken on Windows today. Forcing
the use of setuptools via FORCE_SETUPTOOLS=1 unbreaks things.
Since the previous bustage with making setuptools the default
was on !Windows, it seems safe to move ahead with the setuptools
transition on Windows. So this patch does that.
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 19:41:40 -0800] rev 31297
schemes: use br'' literal to define bytes regexp
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 12:55:48 +0900] rev 31296
help: fix layout of pre-formatted text
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 11:01:03 +0900] rev 31295
help: fix example of revs() fileset
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:24:53 +0200] rev 31294
filecache: make 'join' abstract
All subclasses redefine this method, so we can make it abstract.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:43:16 -0800] rev 31293
filecache: explicitly test 'repofilecache'
The tests is actually about testing a repofilecache (it uses a fake repo). We
make this clear to prevent blockers while cleaning theses API.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:25:21 +0200] rev 31292
repofilecache: directly use 'repo.vfs.join'
The 'vfs' attribute already have all methods we need, the value of going
through the repository for this is low. so we removes it.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:23:58 +0200] rev 31291
repofilecache: define a 'join' method
We are about to turn the 'join' method of the base class Abstract, so we need
on to be defined in the localrepo. The ultimate goal here is to be able to stop
relying for the 'localrepo' class to have a 'join' methods (there is above one
hundred methods on 'localrepo'. This change make te 'repo' file cache have its
own code so that we can prepare this change to the repostory class.
explicite join
Augie Fackler <augie@google.com> [Mon, 06 Mar 2017 18:42:36 -0500] rev 31290
wix: add censor docs to installer script
Spotted by Matt Harbison.
Augie Fackler <augie@google.com> [Mon, 23 Jan 2017 20:17:24 -0500] rev 31289
internals: add some brief documentation about censor
Jun Wu <quark@fb.com> [Thu, 09 Mar 2017 15:10:27 -0800] rev 31288
localrepo: rename proxycls to filteredrepo
When debugging in a Python shell, the type of "repo" is "proxycls", which
could confuse new people.
In [1]: repo
Out[1]: <mercurial.localrepo.proxycls at 0x7f65d4b976d0>
Let's rename it to "filteredrepo" to make it clearer.
Durham Goode <durham@fb.com> [Wed, 08 Mar 2017 17:35:20 -0800] rev 31287
dirstate: track otherparent files same as nonnormal
Calling dirstate.setparents() is expensive in a large repo because it iterates
over every file in the dirstate. It does so to undo any merge state or
otherparent state files. Merge state files are already covered by
dirstate._nonnormalset, so we just need to track otherparent files in a similar
manner to avoid the full iteration here.
Fixing this shaves 20-25% off histedit in large repos.
I tested this by adding temporary debug logic to verify that the old files
processed in the loop matched the new files processed in the loop and running
the test suite.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 09:28:33 +0100] rev 31286
hgweb: use patch.diffhunks in webutil.diffs to simplify the algorithm
Function patch.diffhunks yields items for a "block" (i.e. a file) as a whole
so take advantage of this to simplify the algorithm and avoid parsing diff
lines to determine whether we're starting a new "block" or not. Thus we drop
to external block counter and rely on diffhunks iterations instead.
We also take advantage of the fact that patch.diffhunks() yields *lines* of
hunks (instead of a string) to avoid building a list that is ''.join-ed into a
string that is then split.
As lines in 'header' returned by patch.diffhunks() have no trailing new line,
we need to insert it ourselves to match template expectations.
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 09:44:39 +0100] rev 31285
hgweb: start enumerate at 1 in webutil.diffs's inner function prettyprintlines
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 17:20:11 +0100] rev 31284
patch: add a diffhunks function yielding (diffheaders, hunks)
trydiff function now yield (header, hunks) tuple that are processed by
diffhunks(). Then diff() is a wrapper around diffhunks().
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 17:46:40 +0100] rev 31283
mdiff: let unidiff return (diffheader, hunks)
This will be used to make it possible to filter diff hunks based on this range
information.
Now unidiff returns a 'hunks' generator that yield tuple (hunkrange,
hunklines) coming from _unidiff() with 'newline at end of file' processing.
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 17:46:28 +0100] rev 31282
mdiff: extract a checknonewline inner function in unidiff()