Thu, 21 May 2015 15:44:38 -0700 changelog: move index_get_parents function up
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 15:44:38 -0700] rev 25280
changelog: move index_get_parents function up index_get_parents can be used in index_headrevs, to do so it needs to be moved up in the compilation unit.
Tue, 26 May 2015 06:45:18 -0500 mergecopies: avoid slowdown from linkrev adjustment (issue4680) stable
Matt Mackall <mpm@selenic.com> [Tue, 26 May 2015 06:45:18 -0500] rev 25279
mergecopies: avoid slowdown from linkrev adjustment (issue4680) checkcopies was using fctx.rev() which it was expecting would be equivalent to linkrev() but was triggering the new _adjustlinkrev path. This was making grafts and merges with large sets of potential copies very expensive.
Tue, 26 May 2015 22:58:30 +0800 hgweb: remove an extra call to nodebranchnodefault() in changesetentry()
Anton Shestakov <engored@ya.ru> [Tue, 26 May 2015 22:58:30 +0800] rev 25278
hgweb: remove an extra call to nodebranchnodefault() in changesetentry() showbranch variable already contains the result of nodebranchnodefault(ctx), so it can be reused.
Fri, 22 May 2015 12:14:23 -0500 profile: disable nested report in lsprof by default
Matt Mackall <mpm@selenic.com> [Fri, 22 May 2015 12:14:23 -0500] rev 25277
profile: disable nested report in lsprof by default The nesting makes profiles harder to read and often pushes important data off the end of the report.
Tue, 19 May 2015 11:16:20 -0700 manifest: use match.prefix() instead of 'not match.anypats()'
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:16:20 -0700] rev 25276
manifest: use match.prefix() instead of 'not match.anypats()' It seems clearer to check for what it is than what it isn't.
Tue, 19 May 2015 10:40:40 -0700 dirstate: use match.prefix() instead of 'not match.anypats()'
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 10:40:40 -0700] rev 25275
dirstate: use match.prefix() instead of 'not match.anypats()' It seems clearer to check for what it is than what it isn't.
Tue, 19 May 2015 11:36:05 -0700 commit: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:36:05 -0700] rev 25274
commit: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Tue, 19 May 2015 11:35:43 -0700 _makelogrevset: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:35:43 -0700] rev 25273
_makelogrevset: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Tue, 19 May 2015 11:34:50 -0700 walkchangerevs: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:34:50 -0700] rev 25272
walkchangerevs: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Thu, 21 May 2015 14:20:24 -0700 walkchangerevs: simplify with an 'elif'
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 May 2015 14:20:24 -0700] rev 25271
walkchangerevs: simplify with an 'elif' Since 'match.files()' is interchangeable with 'not match.files()', we can simplify with an 'elif' follwoing the 'if match.always()'.
Tue, 26 May 2015 07:44:37 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 26 May 2015 07:44:37 -0500] rev 25270
merge with stable
Mon, 25 May 2015 11:06:49 -0700 test-module-imports: drop check for Python >= 2.6
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 25 May 2015 11:06:49 -0700] rev 25269
test-module-imports: drop check for Python >= 2.6 Support for Python 2.4 and 2.5 has been dropped. This check is no longer necessary.
Mon, 25 May 2015 01:26:23 +0900 localrepo: pass hook argument txnid to pretxnopen hooks stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 25 May 2015 01:26:23 +0900] rev 25268
localrepo: pass hook argument txnid to pretxnopen hooks Before this patch, hook argument `txnid` isn't passed to `pretxnopen` hooks, even though `hooks` section of `hg help config` describes so. ``pretxnopen`` Run before any new repository transaction is open. The reason for the transaction will be in ``$HG_TXNNAME`` and a unique identifier for the transaction will be in ``HG_TXNID``. A non-zero status will prevent the transaction from being opened.
Mon, 25 May 2015 01:26:19 +0900 transaction: separate calculating TXNID from creating transaction object stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 25 May 2015 01:26:19 +0900] rev 25267
transaction: separate calculating TXNID from creating transaction object Before this patch, transaction ID (TXNID) is calculated from `transaction` object itself by `id()`, but this prevents TXNID from being passed to `pretxnopen` hooks, which should be executed before starting transaction processing (also any preparations for it, like writing journal files out). As a preparation for passing TXNID to `pretxnopen` hooks, this patch separates calculation of TXNID from creation of `transaction` object. This patch uses "random" library for reasonable unique ID. "uuid" library can't be used, because it was introduced since Python 2.5 and isn't suitable for Mercurial 3.4.x stable line. `%f` formatting for `random.random()` is used with explicit precision number 40, because default precision for `%f` is 6. 40 should be long enough, even if 10**9 transactions are executed in a short time (a second or less). On the other hand, `time.time()` is used to ensures uniqueness of TXNID in a long time, for safety. BTW, platform not providing `/dev/urandom` or so may cause failure of `import random` itself with some Python versions (see Python issue15340 for detail http://bugs.python.org/issue15340). But this patch uses "random" without any workaround, because: - "random" is already used directly in some code paths, - such platforms are very rare (e.g. Tru64 and HPUX), and http://bugs.python.org/issue15340#msg170000 - updating Python runtime can avoid this issue
Sat, 23 May 2015 11:14:00 +0900 revbranchcache: return uncached branchinfo for nullrev (issue4683) stable
Yuya Nishihara <yuya@tcha.org> [Sat, 23 May 2015 11:14:00 +0900] rev 25266
revbranchcache: return uncached branchinfo for nullrev (issue4683) This fixes the crash caused by "branch(null)" revset. No cache should be necessary for nullrev because changelog.branchinfo(nullrev) does not involve IO operation. Note that the problem of "branch(wdir())" isn't addressed by this patch. "wdir()" will raise TypeError in many places because of None. This is the reason why "wdir()" is still experimental.
Sun, 24 May 2015 10:29:33 +0900 revset: drop magic of fullreposet membership test (issue4682) stable
Yuya Nishihara <yuya@tcha.org> [Sun, 24 May 2015 10:29:33 +0900] rev 25265
revset: drop magic of fullreposet membership test (issue4682) This patch partially backs out d2de20e1451f and adds an alternative workaround to functions that evaluate "null" and "wdir()". Because the new workaround is incomplete, "first(null)" and "min(null)" don't work as expected. But they were not usable until 3.4 and "null" isn't commonly used, we can postpone a complete fix for 3.5. The issue4682 was caused because "branch(default)" is evaluated to "<filteredset <fullreposet>>", keeping fullreposet magic. The next patch will fix crash on "branch(null)", but without this patch, it would make "null in <branch(default)>" be True, which means "children(branch(default))" would return all revisions but merge (p2 != null). I believe the right fix is to stop propagating fullreposet magic on filter(), but it wouldn't fit to stable release. Also, we should discuss how to handle "null" and "wdir()" in revset before.
Sat, 23 May 2015 15:55:04 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Sat, 23 May 2015 15:55:04 -0500] rev 25264
merge with stable
Fri, 22 May 2015 12:13:18 -0500 transaction: use the proper variable in '_addbackupentry' (issue4684) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 22 May 2015 12:13:18 -0500] rev 25263
transaction: use the proper variable in '_addbackupentry' (issue4684) The 'file' variable was undefined but resolved to the 'file' built-in. This is why pylint complains about overwriting built-ins...
Fri, 22 May 2015 21:19:08 -0400 run-tests: python3.5 now supports mkdtemp using bytes for paths
Augie Fackler <raf@durin42.com> [Fri, 22 May 2015 21:19:08 -0400] rev 25262
run-tests: python3.5 now supports mkdtemp using bytes for paths Now that http://bugs.python.org/issue24230 is fixed (thanks to Gregory Smith for that quick response!) we can drop one more ugly hack around path handling. Tests still pass in 3.5 with this cleaner version, as well as in 2.6.
Fri, 22 May 2015 21:15:52 -0400 run-tests: use items() instead of iteritems()
Augie Fackler <raf@durin42.com> [Fri, 22 May 2015 21:15:52 -0400] rev 25261
run-tests: use items() instead of iteritems() This fixes the python3.5 build. We'll presumably want to build our own helper function or use 2to3 for this on the main source tree, but for run-tests we want a single-source version that works in 2.6 and 3.5.
Thu, 21 May 2015 14:57:30 -0700 selve: make 'shelve --interactive' not experimental
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:57:30 -0700] rev 25260
selve: make 'shelve --interactive' not experimental It is safe to do as 'shelve -i' uses the same code path as 'commit -i' that is not experimental.
Thu, 21 May 2015 14:34:24 -0700 revert: fix edition of newly added file during --interactive
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:34:24 -0700] rev 25259
revert: fix edition of newly added file during --interactive Before this patch: editing hunks of newly added file when performing a revert --interactive had no effect: the edits were discarded. After this patch, the edits are taken into account.
Thu, 21 May 2015 14:25:57 -0700 revert: make revert --interactive use git style diff
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:25:57 -0700] rev 25258
revert: make revert --interactive use git style diff This allows us to use existing code to detect files that are newly added and modified. In turn, this allows us to make revert --interactive support editing newly added and modified files.
Thu, 21 May 2015 14:32:14 -0700 record: extract code to compute newly added and modified files
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:32:14 -0700] rev 25257
record: extract code to compute newly added and modified files We want to reuse this logic in revert.
Thu, 21 May 2015 14:28:02 -0700 record: extract ishunk to a function
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:28:02 -0700] rev 25256
record: extract ishunk to a function We extract this code as we want to reuse it in revert -i.
Sun, 26 Apr 2015 22:26:44 +0900 fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 22:26:44 +0900] rev 25255
fileset: pretty print syntax tree in debug output
Wed, 06 May 2015 10:17:41 +0900 parser: extract closure of prettyformat() to a top-level function
Yuya Nishihara <yuya@tcha.org> [Wed, 06 May 2015 10:17:41 +0900] rev 25254
parser: extract closure of prettyformat() to a top-level function There was no capture until I added 'leafnodes' argument.
Sun, 26 Apr 2015 22:20:03 +0900 parser: move prettyformat() function from revset module
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 22:20:03 +0900] rev 25253
parser: move prettyformat() function from revset module I want to use it in doctests that I'll add by future patches. Also, it can be used in "hg debugfileset" command.
Sun, 26 Apr 2015 19:50:42 +0900 fileset: move validation of incomplete parsing to parse() function
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 19:50:42 +0900] rev 25252
fileset: move validation of incomplete parsing to parse() function fileset.parse() should be responsible for all parsing errors as well.
Sun, 26 Apr 2015 19:42:47 +0900 revset: move validation of incomplete parsing to parse() function
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 19:42:47 +0900] rev 25251
revset: move validation of incomplete parsing to parse() function revset.parse() should be responsible for all parsing errors. Perhaps it wasn't because 'revset.parse' was not a real function when the validation code was added at ffcb7e4d719f.
Fri, 22 May 2015 14:39:34 -0700 match: fix bug in match.visitdir()
Drew Gottlieb <drgott@google.com> [Fri, 22 May 2015 14:39:34 -0700] rev 25250
match: fix bug in match.visitdir() There was a bug in my recent change to visitdir (8545bd381504) due to the stored generator being iterated over twice. Making the generator into a list at the start fixes this.
Thu, 21 May 2015 16:20:34 -0400 error: derive RevlogError from HintException instead of Exception
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 21 May 2015 16:20:34 -0400] rev 25249
error: derive RevlogError from HintException instead of Exception This will allow us to now pass hints into this exception.
Thu, 21 May 2015 16:28:06 -0400 error: refactor common hint-pattern into a common base class
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 21 May 2015 16:28:06 -0400] rev 25248
error: refactor common hint-pattern into a common base class I'm about to make another exception class require hints, so third strike and you refactor.
Fri, 22 May 2015 11:50:57 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Fri, 22 May 2015 11:50:57 -0500] rev 25247
merge with stable
Fri, 22 May 2015 11:54:43 -0300 i18n-pt_BR: synchronized with 2664f536a97e stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 22 May 2015 11:54:43 -0300] rev 25246
i18n-pt_BR: synchronized with 2664f536a97e
Wed, 20 May 2015 11:29:45 -0500 util: allow to specify buffer size in popen4
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 20 May 2015 11:29:45 -0500] rev 25245
util: allow to specify buffer size in popen4 We will need unbuffered IO to restore real time output with ssh peer. Changeset ec171737aaf1 seems to indicate playing with this value could be dangerous, but does not indicate why.
Mon, 18 May 2015 23:19:11 -0500 sshpeer: extract the forward output logic
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 23:19:11 -0500] rev 25244
sshpeer: extract the forward output logic We are about to make a more aggressive use of this when reading and writing on the other pipes. We it needs to be reusable.
Wed, 20 May 2015 12:33:12 -0500 sshpeer: break "OutOfBandError" feature for ssh (BC)
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 20 May 2015 12:33:12 -0500] rev 25243
sshpeer: break "OutOfBandError" feature for ssh (BC) When we'll be using the ssh's 'stderr' for realtime output successfully, it will no longer be possible to use 'stderr' to carry the error message (because it is already consumed by the real time output logic. This feature is very rarely used (test says largefile only) and I think breaking its output pattern is worth the benefit of having real time output with ssh.
Wed, 20 May 2015 18:17:40 -0500 error: allow a 'hint' to OutOfBandError
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 20 May 2015 18:17:40 -0500] rev 25242
error: allow a 'hint' to OutOfBandError This will be useful when changing the behavior of OutOfBandError for ssh in the next changeset.
Thu, 21 May 2015 14:30:22 -0500 tests: fix test-clone on vfat
Matt Mackall <mpm@selenic.com> [Thu, 21 May 2015 14:30:22 -0500] rev 25241
tests: fix test-clone on vfat
Thu, 21 May 2015 11:34:40 -0700 wireproto: remove unused 'store' import
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 May 2015 11:34:40 -0700] rev 25240
wireproto: remove unused 'store' import
Sat, 16 May 2015 16:16:18 -0700 match: allow unioning arbitrary match functions
Durham Goode <durham@fb.com> [Sat, 16 May 2015 16:16:18 -0700] rev 25239
match: allow unioning arbitrary match functions A future patch will be allowing nested matchers. To support that, let's refactor _buildmatch to build a list of matchers then return True if any match. We were already doing that for filesets + regex patterns, but this way will be more generic.
Sat, 16 May 2015 16:12:00 -0700 match: add root to _buildmatch
Durham Goode <durham@fb.com> [Sat, 16 May 2015 16:12:00 -0700] rev 25238
match: add root to _buildmatch A future patch will make _buildmatch able to expand relative include patterns. Doing so will require knowing the root of the repo, so let's go ahead and pass it in.
Thu, 21 May 2015 10:41:06 -0700 localrepo: extract stream clone application into reusable function
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 21 May 2015 10:41:06 -0700] rev 25237
localrepo: extract stream clone application into reusable function The existing stream_in method assumes a streaming clone is applied via the wire protocol. Previous patches have enabled streaming clone data to be produced and consumed outside the context of the wire protocol. However, the consuming part was incomplete because it didn't deal with things like updating the branch caches or writing out a requirements file. This patch finishes the separation of stream clone handling from the wire protocol. After this patch, it is possible to consume stream clones from arbitrary sources, including files. Mozilla plans to leverage this to serve pre-generated stream clone files to consumers, drastically reducing the wall and CPU time required to clone large repositories. This will enable clones to be nearly as fast as `tar`.
Thu, 21 May 2015 10:27:45 -0700 exchange: move code for consuming streaming clone into exchange
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 21 May 2015 10:27:45 -0700] rev 25236
exchange: move code for consuming streaming clone into exchange For reasons outlined in the previous commit, we want to make the code for consuming "stream bundles" reusable. This patch extracts the code into a standalone function.
Thu, 21 May 2015 10:27:22 -0700 exchange: move code for generating a streaming clone into exchange
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 21 May 2015 10:27:22 -0700] rev 25235
exchange: move code for generating a streaming clone into exchange Streaming clones are fast because they are essentially tar files. On mozilla-central, a streaming clone only consumes ~55s CPU time on clients as opposed to ~340s CPU time for a regular clone or gzip bundle unbundle. Mozilla is deploying static file "lookaside" support to our Mercurial server. Static bundles are pre-generated and uploaded to S3. When a clone is performed, the static file is fetched, applied, and then an incremental pull is performed. Unfortunately, on an ideal network connection this still takes as much wall and CPU time as a regular clone (although it does save significant server resources). We like the client-side wall time wins of streaming clones. But we want to leverage S3-based pre-generated files for serving the bulk of clone data. This patch moves the code for producing a "stream bundle" into its own standalone function, away from the wire protocol. This will enable stream bundle files to be produced outside the context of the wire protocol. A bikeshed on whether exchange is the best module for this function might be warranted. I selected exchange instead of changegroup because "stream bundles" aren't changegroups (yet).
Tue, 19 May 2015 10:13:43 -0700 dirstate: avoid match.files() in walk()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 10:13:43 -0700] rev 25234
dirstate: avoid match.files() in walk()
Tue, 28 Oct 2014 22:47:22 -0700 match: introduce boolean prefix() method
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Oct 2014 22:47:22 -0700] rev 25233
match: introduce boolean prefix() method tl;dr: This is another step towards a (previously unstated) goal of eliminating match.files() in conditions. There are four types of matchers: * always: Matches everything, checked with always(), files() is empty * exact: Matches exact set of files, checked with isexact(), files() contains the files to match * patterns: Matches more complex patterns, checked with anypats(), files() contains roots of the matched patterns * prefix: Matches simple 'path:' patterns as prefixes ('foo' matches both 'foo' and 'foo/bar'), no single method to check, files() contains the prefixes to match For completeness, it would be nice to have a method for checking for the "prefix" type of matcher as well, so let's add that, making it return True simply when none of the others do. The larger goal here is to eliminate uses of match.files() in conditions (i.e. bool(match.files())). The reason for this is that there are scenarios when you would like to create a "prefix" matcher that happens to match no files. One example is for 'hg files -I foo bar'. The narrowmatcher also restricts the set of files given and it would not surprise me if have bugs caused by that already. Note that 'if m.files() and not m.anypats()' and similar is sometimes used to catch the "exact" and "prefix" cases above.
Thu, 21 May 2015 19:52:36 +0800 hgweb: descend empty directories in monoblue
Anton Shestakov <engored@ya.ru> [Thu, 21 May 2015 19:52:36 +0800] rev 25232
hgweb: descend empty directories in monoblue The ability to "skip" a chain of empty directories in hgweb was added in c21d236ca897, but monoblue style wasn't updated. This block is copied from gitweb/map file and just works.
Mon, 18 May 2015 14:29:20 -0700 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com> [Mon, 18 May 2015 14:29:20 -0700] rev 25231
match: have visitdir() consider includes and excludes match.visitdir() used to only look at the match's primary pattern roots to decide if a treemanifest traverser should descend into a particular directory. This change logically makes visitdir also consider the match's include and exclude pattern roots (if applicable) to make this decision. This is especially important for situations like using narrowhg with multiple treemanifest revlogs.
Thu, 21 May 2015 00:27:12 +0800 hgweb: remove artificial width constraint from header in monoblue
Anton Shestakov <engored@ya.ru> [Thu, 21 May 2015 00:27:12 +0800] rev 25230
hgweb: remove artificial width constraint from header in monoblue This width property comes from the beginning of the monoblue theme itself, and was used to stop the action header ("summary", "shortlog", "changelog", etc) from clashing with the search form. But it still was happening (on smaller screens, and with more actions added to hgweb over time). Effectively, the hardcoded width was preventing the header from fitting into the available screen space, since it always tried to be 900px wide, even if that meant horizontal scroll on smaller screens and having the actions on two lines where one should've been enough. For example, http://selenic.com/hg/log?style=monoblue has the last two actions ("gz" and "help") in the header on the second line, even when there seems to be enough space on the first. This patch makes the form float, which prevents it from overlaying/clashing with the action header, and allows the latter to resize itself in the best possible way.
Wed, 20 May 2015 15:29:32 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 20 May 2015 15:29:32 -0500] rev 25229
merge with stable
Sun, 17 May 2015 22:42:47 -0400 files: recurse into subrepos automatically with an explicit path
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 May 2015 22:42:47 -0400] rev 25228
files: recurse into subrepos automatically with an explicit path
Wed, 20 May 2015 01:06:09 +0900 dirstate: use open/read of vfs(opener) explicitly instead of read
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 20 May 2015 01:06:09 +0900] rev 25227
dirstate: use open/read of vfs(opener) explicitly instead of read This simplifies changes in subsequent patch, which tries to open `.pending` file when HG_PENDING environment variable is defined.
Wed, 20 May 2015 01:06:09 +0900 dirstate: use self._filename instead of immediate string `dirstate`
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 20 May 2015 01:06:09 +0900] rev 25226
dirstate: use self._filename instead of immediate string `dirstate` This prevents immediate string `dirstate` from multiplying. This is also a preparation for making dirstate aware of PENDING mechanism in subsequent patches.
Tue, 19 May 2015 23:29:20 +0900 revset: drop translation marker from error message of _notpublic()
Yuya Nishihara <yuya@tcha.org> [Tue, 19 May 2015 23:29:20 +0900] rev 25225
revset: drop translation marker from error message of _notpublic() It is a kind of an internal error. End user won't see it.
Tue, 19 May 2015 23:26:25 +0900 revset: drop docstring from internal _notpublic() function
Yuya Nishihara <yuya@tcha.org> [Tue, 19 May 2015 23:26:25 +0900] rev 25224
revset: drop docstring from internal _notpublic() function It shouldn't be listed in "hg help revset".
Wed, 13 May 2015 20:30:12 -0700 record: make hg record always use the non curses interface
Laurent Charignon <lcharignon@fb.com> [Wed, 13 May 2015 20:30:12 -0700] rev 25223
record: make hg record always use the non curses interface Before this patch, hg record was running hg commit -i, therefore with the experimental.crecord=True flag, hg record was actually launching the curses record interface. Some of our users could be confused by that. This patch makes the hg record command set this flag to False, ensuring that hg record never shows the curses interface. commit -i, shelve -i and revert -i remain unchanged and use the curses interface if the experimental.crecord flag is set.
Thu, 09 Apr 2015 17:14:35 -0700 treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Apr 2015 17:14:35 -0700] rev 25222
treemanifest: lazily load manifests Most operations on treemanifests already visit only relevant submanifests. Notable examples include __getitem__, __contains__, walk/matches with matcher, diff. By making submanifests lazily loaded, we speed up all these operations. The lazy loading is achieved by adding a _load() method that gets defined where we currently eagerly parse the manifest. We make sure to call it before any access to _dirs, _files or _flags. Some timings on the Mozilla repo (with flat manifest timings for reference): hg cat -r . README.txt: 1.644s -> 0.096s (0.255s) hg diff -r .^ -r . : 1.746s -> 0.137s (0.431s) hg files -r . python : 1.508s -> 0.146s (0.335s) hg files -r . : 2.125s -> 2.203s (0.712s)
Mon, 18 May 2015 21:31:40 -0700 treemanifest: speed up commit using dirty flag
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 May 2015 21:31:40 -0700] rev 25221
treemanifest: speed up commit using dirty flag We currently avoid saving a treemanifest revision if it's the same as one of it's parents. This is checked by comparing the generated text for all three versions. Let's avoid that when possible by comparing the nodeids for clean (not dirty) nodes. On the Mozilla repo, this speeds up commit from 2.836s to 2.343s.
Thu, 26 Feb 2015 08:16:13 -0800 treemanifest: speed up diff by keeping track of dirty nodes
Martin von Zweigbergk <martinvonz@google.com> [Thu, 26 Feb 2015 08:16:13 -0800] rev 25220
treemanifest: speed up diff by keeping track of dirty nodes Since tree manifests have a nodeid per directory, we can avoid diffing entire directories if they have the same nodeid. The comparison is only valid for unmodified treemanifest instances, of course, so we need to keep track of which have been modified. Therefore, let's add a dirty flag to treemanifest indicating whether its nodeid can be trusted. We set it when _files or _dirs is modified, and make diff(), and its cousin filesnotin(), not descend into subdirectories that are the same on both sides. On the Mozilla repo, this speeds up 'hg diff -r .^ -r .' from 1.990s to 1.762s. The improvement will be much larger when we start lazily loading subdirectory manifests.
Wed, 20 May 2015 04:34:27 +0900 localrepo: use correct argument name for pretxnclose hooks (BC) stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 20 May 2015 04:34:27 +0900] rev 25219
localrepo: use correct argument name for pretxnclose hooks (BC) Before this patch, "the reason for the transaction" is passed to `pretxnclose` hooks via wrong name argument `xnname` (`HG_XNNAME` for external hooks)
Wed, 20 May 2015 04:34:27 +0900 localrepo: rename hook argument from TXNID to txnid (BC) stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 20 May 2015 04:34:27 +0900] rev 25218
localrepo: rename hook argument from TXNID to txnid (BC) From the first (3.4 or d283517b260b), `TXNID` is passed to Python hooks without lowering its name, but it is wrong.
Wed, 05 Nov 2014 11:25:57 -0800 test-walk: add more tests for -I/-X
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Nov 2014 11:25:57 -0800] rev 25217
test-walk: add more tests for -I/-X We had very limited testing of -I and -X, especially when combined with plain file patterns and with each other. This adds some more protection against regressions as upcoming patches modify the matcher code. (Originally meant for my own upcoming patches, but now I know drgott will be sending some patches soon.) The only noteworthy cases seems to be that both of hg debugwalk -Xbeans/black beans/black hg debugwalk -Xbeans beans/black walk the file. I would personally have expected the -X to trump. I don't care enough to change it, but I also think it's fair if some future commit changes the behavior.
Sat, 16 May 2015 16:06:22 -0700 ignore: use 'include:' rules instead of custom syntax
Durham Goode <durham@fb.com> [Sat, 16 May 2015 16:06:22 -0700] rev 25216
ignore: use 'include:' rules instead of custom syntax Now that the matcher supports 'include:' rules, let's change the dirstate.ignore creation to just create a matcher with a bunch of includes. This allows us to completely delete ignore.py. I moved some of the syntax documentation over to readpatternfile in match.py so we don't lose it.
Sat, 16 May 2015 15:56:52 -0700 match: add 'include:' syntax
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:56:52 -0700] rev 25215
match: add 'include:' syntax This allows the matcher to understand 'include:path/to/file' style rules. The files support the standard hgignore syntax and any rules read from the file are included in the matcher without regard to the files location in the repository (i.e. if the included file is in somedir/otherdir, all of it's rules will still apply to the entire repository).
Mon, 18 May 2015 16:27:56 -0700 match: add optional warn argument
Durham Goode <durham@fb.com> [Mon, 18 May 2015 16:27:56 -0700] rev 25214
match: add optional warn argument Occasionally the matcher will want to print warning messages instead of throwing exceptions (like if it encounters a bad syntax parameter when parsing files). Let's add an optional warn argument that can provide this. The next patch will actually use this argument.
Sat, 16 May 2015 15:51:03 -0700 match: add source to kindpats list
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:51:03 -0700] rev 25213
match: add source to kindpats list Future patches will be adding the ability to recursively include pattern files in a match rule expression. Part of that behavior will require tracking which file each pattern came from so we can report errors correctly. Let's add a 'source' arg to the kindpats list to track this. Initially it will only be populated by listfile rules.
Tue, 19 May 2015 08:41:04 -0500 check-code: reintroduce str.format() ban for 3.x porting
Matt Mackall <mpm@selenic.com> [Tue, 19 May 2015 08:41:04 -0500] rev 25212
check-code: reintroduce str.format() ban for 3.x porting In their infinite wisdom, the Python maintainers stripped bytes of its % and format() methods for 3.x. They've now added % back to 3.5, but format() is still missing. Since we don't have any particular need for it, we should keep avoiding it.
Mon, 18 May 2015 23:43:36 -0500 util: drop the 'unpacker' helper
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 23:43:36 -0500] rev 25211
util: drop the 'unpacker' helper It is not helping anything anymore.
Mon, 18 May 2015 16:56:04 -0500 MBTextWrapper: drop dedicated __init__ method
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:56:04 -0500] rev 25210
MBTextWrapper: drop dedicated __init__ method It was only there as a compatibility layer with a version of Python which we do support anymore.
Mon, 18 May 2015 16:54:21 -0500 util: drop the compatibility with Python 2.4 unpacker
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:54:21 -0500] rev 25209
util: drop the compatibility with Python 2.4 unpacker Python 2.4 compatibility have packed and sailed.
Mon, 18 May 2015 16:52:28 -0500 tests: just use 'response.reason'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:52:28 -0500] rev 25208
tests: just use 'response.reason' There is no reason to not have simple code now that Python 2.4 is dead.
Mon, 18 May 2015 16:51:02 -0500 url: drop awful hack around bug in Python 2.4
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:51:02 -0500] rev 25207
url: drop awful hack around bug in Python 2.4 It's all just a memory now.
Mon, 18 May 2015 16:47:26 -0500 httpconnection: drop Python 2.4 specify hack
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:47:26 -0500] rev 25206
httpconnection: drop Python 2.4 specify hack Python 2.4.1 doesn't provide the full URI, good for it.
Mon, 18 May 2015 16:46:32 -0500 mail: drop explicit mail import required by Python 2.4
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:46:32 -0500] rev 25205
mail: drop explicit mail import required by Python 2.4 He's dead, Jim.
Mon, 18 May 2015 16:33:57 -0500 windows: drop Python2.4 specific hack for directory not found handling
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:33:57 -0500] rev 25204
windows: drop Python2.4 specific hack for directory not found handling A good Python 2.4 hack is a removed Python 2.4 hack.
Mon, 18 May 2015 16:24:16 -0500 notify: drop import required by Python 2.4
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:24:16 -0500] rev 25203
notify: drop import required by Python 2.4 Toto, I've a feeling we're not in anno 2004 anymore.
Mon, 18 May 2015 16:22:15 -0500 patchbomb: stop explicit import required by Python 2.4
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:22:15 -0500] rev 25202
patchbomb: stop explicit import required by Python 2.4 Ding Dong, the witch is dead!
Mon, 18 May 2015 16:20:12 -0500 pager: drop python 2.4 hack around subprocess
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:20:12 -0500] rev 25201
pager: drop python 2.4 hack around subprocess Farewell, we do not need you anymore.
Mon, 18 May 2015 16:18:18 -0500 check-code: drop ban of 'val if cond else otherval' construct
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:18:18 -0500] rev 25200
check-code: drop ban of 'val if cond else otherval' construct We now have access to this horrible but less bad than 'cond and val or otherval' syntax.
Mon, 18 May 2015 16:30:24 -0500 check-code: entirely drop the 'non-py24.py' file from the test
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:30:24 -0500] rev 25199
check-code: entirely drop the 'non-py24.py' file from the test There are no Python 2.4 related errors remaining.
Mon, 18 May 2015 16:11:44 -0500 check-code: drop the 'format' built-in
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:11:44 -0500] rev 25198
check-code: drop the 'format' built-in I'm not clear what it is doing, but one who knows what it is about can now make use of it.
Mon, 18 May 2015 16:09:05 -0500 check-code: drop ban of str.format
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 16:09:05 -0500] rev 25197
check-code: drop ban of str.format After discussion with Augie and Matt, we are fine with it being introduced in the code base.
Mon, 18 May 2015 22:40:16 -0400 statichttprepo: remove wrong getattr ladder
Augie Fackler <raf@durin42.com> [Mon, 18 May 2015 22:40:16 -0400] rev 25196
statichttprepo: remove wrong getattr ladder At least as far back as Python 2.6 the .code attribute is always defined, and to the best of my detective skills a .getcode() method has never been a thing.
Tue, 19 May 2015 07:17:57 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 19 May 2015 07:17:57 -0500] rev 25195
merge with stable
Sun, 17 May 2015 22:09:37 -0400 match: explicitly naming a subrepo implies always() for the submatcher stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 May 2015 22:09:37 -0400] rev 25194
match: explicitly naming a subrepo implies always() for the submatcher The files command supports naming directories to limit the output to children of that directory, and it also supports -S to force recursion into a subrepo. But previously, using -S and naming a subrepo caused nothing to be output. The reason was narrowmatcher() strips the current subrepo path off of each file, which would leave an empty list if only the subrepo was named. When matching on workingctx, dirstate.matches() would see the submatcher is not always(), so it returned the list of files in dmap for each file in the matcher- namely, an empty list. If a directory in a subrepo was named, the output was as expected, so this was inconsistent. The 'not anypats()' check is enforced by an existing test around line 140: $ hg remove -I 're:.*.txt' sub1 Without the check, this removed all of the files in the subrepo.
Sun, 17 May 2015 01:06:10 -0400 context: don't complain about a matcher's subrepo paths in changectx.walk() stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 May 2015 01:06:10 -0400] rev 25193
context: don't complain about a matcher's subrepo paths in changectx.walk() Previously, the first added test printed the following: $ hg files -S -r '.^' sub1/sub2/folder sub1/sub2/folder: no such file in rev 9bb10eebee29 sub1/sub2/folder: no such file in rev 9bb10eebee29 sub1/sub2/folder/test.txt One warning occured each time a subrepo was crossed into. The second test ensures that the matcher copy stays in place. Without the copy, the bad() function becomes an increasingly longer chain, and no message would be printed out for a file missing in the subrepo because the predicate would match in one of the replaced methods. Manifest doesn't know anything about subrepos, so it needs help ignoring subrepos when complaining about bad files.
Mon, 18 May 2015 22:35:27 -0500 ssh: capture output with bundle2 again (issue4642) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 22:35:27 -0500] rev 25192
ssh: capture output with bundle2 again (issue4642) I just discovered that we are not displaying ssh server output in real time anymore. So we can just fall back to the bundle2 output capture for now. This fix the race condition issue we where seeing in tests. Re-instating real time output for ssh would fix the issue too but lets get the test to pass first.
Fri, 24 Apr 2015 14:30:30 -0700 revset: optimize not public revset
Laurent Charignon <lcharignon@fb.com> [Fri, 24 Apr 2015 14:30:30 -0700] rev 25191
revset: optimize not public revset This patvh speeds up the computation of the not public() changeset and incidentally speed up the computation of divergents() changeset on our big repo by 100x from 50% to 0.5% of the time spent in smartlog with evolve. In this patch we optimize not public() to _notpublic() (new revset) and use the work on phaseset (from the previous commit) to be able to compute _notpublic() quickly. We use a non-lazy approach making the assumption the number of notpublic change will not be in the order of magnitude of the repo size. Adopting a lazy approach gives a speedup of 5x (vs 100x) only due to the overhead of the code for lazy generation.
Wed, 01 Apr 2015 11:17:17 -0700 phases: add set per phase in C phase computation
Laurent Charignon <lcharignon@fb.com> [Wed, 01 Apr 2015 11:17:17 -0700] rev 25190
phases: add set per phase in C phase computation To speed up the computation of draft(), secret(), divergent(), obsolete() and unstable() we need to have a fast way of getting the list of revisions that are in draft(), secret() or the union of both: not public(). This patch extends the work on phase computation in C and make the phase computation code also return a list of set for each non public phase. Using these sets we can quickly obtain all the revisions of a given phase. We do not return a set for the public phase as we expect it to be roughly the size of the repo. Also, it can be computed easily by substracting the entries in the non public phases from all the revs in the repo.
Fri, 08 May 2015 12:30:51 -0700 match: rename _fmap to _fileroots for clarity
Drew Gottlieb <drgott@google.com> [Fri, 08 May 2015 12:30:51 -0700] rev 25189
match: rename _fmap to _fileroots for clarity fmap isn't a very descriptive name for the set of the match's files.
Wed, 06 May 2015 15:59:35 -0700 match: remove unnecessary optimization where visitdir() returns 'all'
Drew Gottlieb <drgott@google.com> [Wed, 06 May 2015 15:59:35 -0700] rev 25188
match: remove unnecessary optimization where visitdir() returns 'all' Match's visitdir() was prematurely optimized to return 'all' in some cases, so that the caller would not have to call it for directories within the current directory. This change makes the visitdir system less flexible for future changes, such as making visitdir consider the match's include and exclude patterns. As a demonstration of this optimization not actually improving performance, I ran 'hg files -r . media' on the Mozilla repository, stored as treemanifest revlogs. With best of ten tries, the command took 1.07s both with and without the optimization, even though the optimization reduced the calls from visitdir() from 987 to 51.
Thu, 16 Apr 2015 17:12:33 -0400 dispatch: add support for python-flamegraph[0] profiling
Augie Fackler <augie@google.com> [Thu, 16 Apr 2015 17:12:33 -0400] rev 25187
dispatch: add support for python-flamegraph[0] profiling This gives us nicer svg flame graphs for output, which can make understanding some types of performance problems significantly easier. 0: https://github.com/evanhempel/python-flamegraph/
Tue, 28 Apr 2015 16:44:37 -0400 extensions: document that `testedwith = 'internal'` is special
Augie Fackler <augie@google.com> [Tue, 28 Apr 2015 16:44:37 -0400] rev 25186
extensions: document that `testedwith = 'internal'` is special Extension authors (notably at companies using hg) have been cargo-culting the `testedwith = 'internal'` bit from hg's own extensions, which then defeats our "file bugs over here" logic in dispatch. Let's be more aggressive about trying to give extension authors a hint about what testedwith should say.
Fri, 10 Apr 2015 23:12:33 -0700 treemanifest: cache directory logs and manifests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Apr 2015 23:12:33 -0700] rev 25185
treemanifest: cache directory logs and manifests Since manifests instances are cached on the manifest log instance, we can cache directory manifests by caching the directory manifest logs. The directory manifest log cache is a plain dict, so it never expires; we assume that we can keep all the directories in memory. The cache is kept on the root manifestlog, so access to directory manifest logs now has to go through the root manifest log. The caching will soon not be only an optimization. When we start lazily loading directory manifests, we need to make sure we don't create multiple instances of the log objects. The caching takes care of that problem.
Mon, 18 May 2015 15:40:23 -0500 hook: drop dedicated catch for 'KeyboardInterrupt'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 15:40:23 -0500] rev 25184
hook: drop dedicated catch for 'KeyboardInterrupt' This is no longer under 'Exception' in Python 2.6.
Mon, 18 May 2015 15:38:24 -0500 recover: catch any exception, not just Exception
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 15:38:24 -0500] rev 25183
recover: catch any exception, not just Exception We want recover to be rock solid.
Mon, 18 May 2015 15:33:21 -0500 exchange: catch down to BaseException when handling bundle2
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 15:33:21 -0500] rev 25182
exchange: catch down to BaseException when handling bundle2 We can now catch more things.
Mon, 18 May 2015 13:23:14 -0500 bundle2: use BaseException in bundle2
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 13:23:14 -0500] rev 25181
bundle2: use BaseException in bundle2 We can ensure we fail over properly in more cases.
Mon, 18 May 2015 13:20:19 -0500 check-code: drop ban of BaseException
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 13:20:19 -0500] rev 25180
check-code: drop ban of BaseException Lets go back to the basic. It is available in Python 2.6.
Mon, 18 May 2015 13:25:07 -0500 wireproto: turn an 'except' into a 'finally' as suggest by the comment
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 13:25:07 -0500] rev 25179
wireproto: turn an 'except' into a 'finally' as suggest by the comment Look! More hidden footprints!
Mon, 18 May 2015 12:56:59 -0500 check-code: drop the yield inside try/finally ban
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 12:56:59 -0500] rev 25178
check-code: drop the yield inside try/finally ban This is now possible with Python 2.6.
Mon, 18 May 2015 15:34:42 -0400 run-tests: resurrect the wifexited polyfill (backout 6ab5a1c9ea3c)
Matt Harbison <matt_harbison@yahoo.com> [Mon, 18 May 2015 15:34:42 -0400] rev 25177
run-tests: resurrect the wifexited polyfill (backout 6ab5a1c9ea3c) Python 2.7.3 on Windows doesn't have os.WIFEXITED, and the test output looked like this before I interrupted it. $ ./run-tests.py --local -j2 -t700 EEEEEEEEEEEEEEEEEEEEEE
Mon, 18 May 2015 02:53:08 +0900 tests: check import cycles in hgext/**.py, too
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 May 2015 02:53:08 +0900] rev 25176
tests: check import cycles in hgext/**.py, too It is important to realize existing cycles in hgext/**.py.
Mon, 18 May 2015 02:52:58 +0900 import-checker: don't treat modules as relative one if not found
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 May 2015 02:52:58 +0900] rev 25175
import-checker: don't treat modules as relative one if not found The previous patch ensures all module names are recorded in `imports` as absolute names, so we no longer need to treat modules as ones imported relatively from the target source if they appear to not be from the stdlib.
Mon, 18 May 2015 02:52:55 +0900 import-checker: make imported_modules yield absolute dotted_name_of_path
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 May 2015 02:52:55 +0900] rev 25174
import-checker: make imported_modules yield absolute dotted_name_of_path This patch makes `imported_modules()` always yield absolute `dotted_name_of_path()`-ed name by strict detection with `fromlocal()`. This change improves circular detection in some points: - locally defined modules, of which name collides against one of standard library, can be examined correctly For example, circular import related to `commands` is overlooked before this patch. - names not useful for circular detection are ignored Names below are also yielded before this patch: - module names of standard library (= not locally defined one) - non-module names (e.g. `node.nullid` of `from node import nullid`) These redundant names decrease performance of circular detection. For example, with files at 1ef96a3b8b89, average loops per file in `checkmod()` is reduced from 165 to 109. - `__init__` can be handled correctly in `checkmod()` For example, current implementation has problems below: - `from xxx import yyy` doesn't recognize `xxx.__init__` as imported - `xxx.__init__` imported via `import xxx` is treated as `xxx`, and circular detection is aborted, because `key` of such module name is not `xxx` but `xxx.__init__` - it is easy to enhance for `from . import xxx` style or so (in the future) Module name detection in `imported_modules()` can use information in `ast.ImportFrom` fully. It is assumed that all locally defined modules are correctly specified to `import-checker.py` at once. Strictly speaking, when `from foo.bar.baz import module1` imports `foo.bar.baz.module1` module, current `imported_modules()` yields only `foo.bar.baz.__init__`, even though also `foo.__init__` and `foo.bar.__init__` should be yielded to detect circular import exactly. But this limitation is reasonable one for improvement in this patch, because current `__init__` files in Mercurial seems to be implemented carefully.
Mon, 18 May 2015 02:50:22 +0900 import-checker: add utility to examine what module is imported easily
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 18 May 2015 02:50:22 +0900] rev 25173
import-checker: add utility to examine what module is imported easily `fromlocalfunc()` uses: - `modulename` (of the target source) to compose absolute module name imported relatively from it It is assumed that `modulename` is an `dotted_name_of_path()`-ed source file, which may have `.__init__` at the end of it. This assumption makes composing `prefix` of relative name easy. - `localmods` to examine whether there is a locally defined (= Mercurial specific) module matching against the specified name It is assumed that module names not existing in `localmods` are ones of Python standard library.
Mon, 18 May 2015 12:31:41 -0500 subrepo: further replacement of try/except with 'next'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 12:31:41 -0500] rev 25172
subrepo: further replacement of try/except with 'next' Burn StopIteration, Burn!
Mon, 18 May 2015 12:27:15 -0500 parsers: use 'next' instead of try/except
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 12:27:15 -0500] rev 25171
parsers: use 'next' instead of try/except This get rid of another StopIteration abomination. The change in self.current value is supposed to not matter as nobody should be calling '_advance' after that (as per Matt wisdom).
Mon, 18 May 2015 12:22:44 -0500 dagparser: use 'next' instead of try/except for default value
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 12:22:44 -0500] rev 25170
dagparser: use 'next' instead of try/except for default value "Ich liebe es wenn ein Plan funktioniert."
Mon, 18 May 2015 12:18:00 -0500 getlogrevs: rewrite a loop to get read of try/except
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 12:18:00 -0500] rev 25169
getlogrevs: rewrite a loop to get read of try/except Get rid of the 'except StopIteration' abomination.
Mon, 18 May 2015 12:17:08 -0500 _makelogrevset: replace try/except with 'next' usage
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 18 May 2015 12:17:08 -0500] rev 25168
_makelogrevset: replace try/except with 'next' usage More readable without the 'except StopIteration' abomination.
Sat, 16 May 2015 15:46:54 -0700 ignore: move readpatternfile to match.py
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:46:54 -0700] rev 25167
ignore: move readpatternfile to match.py In preparation for adding 'include:' rule support to match.py, let's move the pattern file reader function to match.py
Sat, 16 May 2015 15:45:46 -0700 ignore: rename readignorefile to readpatternfile
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:45:46 -0700] rev 25166
ignore: rename readignorefile to readpatternfile A future commit will move the readignorefile logic into match.py so it can be used from general match rules. Let's rename the function to represent this new behavior.
Sat, 16 May 2015 15:45:06 -0700 ignore: combine readignorefile and _ignorefile
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:45:06 -0700] rev 25165
ignore: combine readignorefile and _ignorefile _ignorefile did nothing except open the file. Let's combine it with readignorefile for simplicity. This will make it easier to rename and move to match.py in upcoming patches.
Sat, 16 May 2015 15:37:59 -0700 ignore: move bad file handling out of readignorefile
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:37:59 -0700] rev 25164
ignore: move bad file handling out of readignorefile In preparation for moving readignorefile to match.py to make it more generally usable, let's move the bad ignore file handling up to the ignore specific logic.
Sat, 16 May 2015 15:24:43 -0700 ignore: remove .hgignore from ignore list if nonexistent
Durham Goode <durham@fb.com> [Sat, 16 May 2015 15:24:43 -0700] rev 25163
ignore: remove .hgignore from ignore list if nonexistent Previously we would always pass the root .hgignore path to the ignore parser. The parser then had to be aware that the first path was special, and not warn if it didn't exist. In preparation for making the ignore file parser more generically usable, let's make the parse logic not aware of this special case, and instead just not pass the root .hgignore in if it doesn't exist.
Sun, 17 May 2015 21:47:18 -0400 run-tests: replace open-coded .decode()s on paths with a helper (issue4667)
Augie Fackler <augie@google.com> [Sun, 17 May 2015 21:47:18 -0400] rev 25162
run-tests: replace open-coded .decode()s on paths with a helper (issue4667) This also cleans up the mkdtemp code mentioned in the previous patch. At this point, the remaining callsites of .{en,de)code() are in the following categories: Handling escaped lines in .t files ----------------------------------- It seems eminently reasonable to me for us to declare that .t files are valid utf-8, and that any escape sequences we see in .t files should be valid unicode_escape sequences. Making error text safe for cdata blocks for xml error reports ------------------------------------------------------------- This is a point where we're already basically screwed, and we're simply trying to do something "good enough" that the xml output will be vaguely useful to the user. Punting here seems fine, and we should probably stick to the same encoding here that we used in the previous section.
Sun, 17 May 2015 21:40:12 -0400 run-tests: move unicode-to-bytes operations on paths to a helper (issue4667)
Augie Fackler <augie@google.com> [Sun, 17 May 2015 21:40:12 -0400] rev 25161
run-tests: move unicode-to-bytes operations on paths to a helper (issue4667) This doesn't fix the probably-wrong utf-8 encoding choice, it just starts the process of encapsulating all the path handling in run-tests in a single place. One known-path use of .encode() remains: it's related to use of mkdtemp, and it will be fixed in a followup patch once we have a companion _strpath() helper function to go from bytes to a str, as we need to file a bug about mkdtemp upstream.
(0) -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip