Thu, 19 Mar 2015 23:36:06 +0900 bookmarks: rewrite comparing bookmarks in commands.summary() by compare()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 19 Mar 2015 23:36:06 +0900] rev 24400
bookmarks: rewrite comparing bookmarks in commands.summary() by compare() This patch adds utility function "summary()", to replace comparing bookmarks in "commands.summary()". This replacement finishes centralizing the logic to compare bookmarks into "bookmarks.compare()". This patch also adds test to check summary output with incoming/outgoing bookmarks, because "hg summary --remote" is not tested yet on the repository with incoming/outgoing bookmarks. This test uses "(glob)" to ignore summary about incoming/outgoing changesets.
Thu, 19 Mar 2015 23:36:05 +0900 bookmarks: remove useless diff()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 19 Mar 2015 23:36:05 +0900] rev 24399
bookmarks: remove useless diff() Previous patches removed code paths referring it.
Thu, 19 Mar 2015 23:36:05 +0900 bookmarks: add outgoing() to replace diff() for outgoing bookmarks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 19 Mar 2015 23:36:05 +0900] rev 24398
bookmarks: add outgoing() to replace diff() for outgoing bookmarks This replacement makes enhancement of "show outgoing bookmarks" easy, because "compare()" can detect more detailed difference of bookmarks between two repositories.
Thu, 19 Mar 2015 23:36:05 +0900 bookmarks: add incoming() to replace diff() for incoming bookmarks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 19 Mar 2015 23:36:05 +0900] rev 24397
bookmarks: add incoming() to replace diff() for incoming bookmarks This replacement makes enhancement of "show incoming bookmarks" easy, because "compare()" can detect more detailed difference of bookmarks between two repositories.
Wed, 18 Mar 2015 15:59:45 -0700 manifest: avoid intersectfiles for matches > 100 files
Durham Goode <durham@fb.com> [Wed, 18 Mar 2015 15:59:45 -0700] rev 24396
manifest: avoid intersectfiles for matches > 100 files Previously we tried to avoid manifest.intersectfiles for exact matches with less than 100 files. However, when the left side of the "or" is false, the right side gets evaluated, of course, and the evaluation of "util.all(fn in self for fn in files)" is both costly in itself, and likely to be true, causing intersectfiles() to be called after all. Fix this by moving the check for less than 100 files outside of the "or" expression, thereby also making it apply for a non-exact matcher, should one be passed in.
Thu, 19 Mar 2015 17:40:19 +0100 convert: optimize convert of files that are unmodified from p2 in merges
Mads Kiilerich <madski@unity3d.com> [Thu, 19 Mar 2015 17:40:19 +0100] rev 24395
convert: optimize convert of files that are unmodified from p2 in merges Conversion of a merge starts with p1 and re-adds the files that were changed in the merge or came unmodified from p2. Files that are unmodified from p1 will thus not be touched and take no time. Files that are unmodified from p2 would be retrieved and rehashed. They would end up getting the same hash as in p2 and end up reusing the filelog entry and look like the p1 case ... but it was slow. Instead, make getchanges also return 'files that are unmodified from p2' so the sink can reuse the existing p2 entry instead of calling getfile. Reuse of filelog entries can make a big difference when files are big and with long revlong chains so they take time to retrieve and hash, or when using an expensive custom getfile function (think http://mercurial.selenic.com/wiki/ConvertExtension#Customization with a code reformatter). This in combination with changes to reuse filectx entries in localrepo._filecommit make 'unchanged from p2' almost as fast as 'unchanged from p1'. This is so far only implemented for the combination of hg source and hg sink. This is a refactoring/optimization. It is covered by existing tests and show no changes - which is a good thing.
Thu, 19 Mar 2015 17:36:17 +0100 localrepo: reuse commit of parent filectx entries without rehashing
Mads Kiilerich <madski@unity3d.com> [Thu, 19 Mar 2015 17:36:17 +0100] rev 24394
localrepo: reuse commit of parent filectx entries without rehashing It is currently only amend and debugbuilddag that will pass a filectx to localrepo._filecommit. Amend will usually not hit the case where a the filectx is a parent that just can be reused. Future convert changes will use it more.
Thu, 19 Mar 2015 13:00:44 -0700 obsolete: avoid infinite loop from obs-cycle in divergence (issue4126)
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 19 Mar 2015 13:00:44 -0700] rev 24393
obsolete: avoid infinite loop from obs-cycle in divergence (issue4126) As for other currently in place cycle detection, arbitrarily cut the first obsolescence link that create a cycle avoiding the infinite loop. This will have to be made more deterministic in the future but we do not really care right now.
Thu, 19 Mar 2015 15:21:08 -0500 tests: avoid deprecation warning
Matt Mackall <mpm@selenic.com> [Thu, 19 Mar 2015 15:21:08 -0500] rev 24392
tests: avoid deprecation warning
Thu, 19 Mar 2015 09:12:21 -0700 walkchangerevs: make followfilter a top-level class
Martin von Zweigbergk <martinvonz@google.com> [Thu, 19 Mar 2015 09:12:21 -0700] rev 24391
walkchangerevs: make followfilter a top-level class The class only depends on the 'repo' variable in the closure, so let's move the class out of the function and make it explicit that that (the repo) is all it needs.
Thu, 19 Mar 2015 10:18:05 -0700 patch._applydiff: resolve prefix with respect to the cwd
Siddharth Agarwal <sid0@fb.com> [Thu, 19 Mar 2015 10:18:05 -0700] rev 24390
patch._applydiff: resolve prefix with respect to the cwd This has several advantages compared to resolving it relative to the root: - '--prefix .' works as expected. - consistent with upcoming 'hg diff' option to produce relative patches (I made sure to put in the (glob) annotations this time!)
Fri, 20 Mar 2015 00:22:37 +0900 test-revert-interactive: eliminate bashism in wildcard pattern
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Mar 2015 00:22:37 +0900] rev 24389
test-revert-interactive: eliminate bashism in wildcard pattern The test failed with Debian dash.
Tue, 10 Mar 2015 21:03:45 -0700 devel: also warn about transaction started without a lock
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 10 Mar 2015 21:03:45 -0700] rev 24388
devel: also warn about transaction started without a lock Nobody should start a transaction on an unlocked repository. If developer warnings are enabled this will be reported. This use the same config as bad locking order since this is closely related.
Tue, 10 Mar 2015 21:25:11 -0700 contrib: remove the now useless lock-checker.py extension
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 10 Mar 2015 21:25:11 -0700] rev 24387
contrib: remove the now useless lock-checker.py extension This feature is in core now, and we do not keep backward compability for contrib.
Fri, 16 Jan 2015 02:51:10 -0800 devel: move the lock-checking code into core
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 16 Jan 2015 02:51:10 -0800] rev 24386
devel: move the lock-checking code into core If the developer warnings are enabled, bad locking order will be reported without the need for the contrib extension.
Wed, 18 Mar 2015 20:59:06 -0700 patch.pathtransform: prepend prefix even if strip is 0
Siddharth Agarwal <sid0@fb.com> [Wed, 18 Mar 2015 20:59:06 -0700] rev 24385
patch.pathtransform: prepend prefix even if strip is 0 Silly oversight by me.
Tue, 28 Oct 2014 22:32:18 -0700 walkchangerevs: simplify by using match.always() method
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Oct 2014 22:32:18 -0700] rev 24384
walkchangerevs: simplify by using match.always() method Since "slowpath = match.anypats() or (match.files() and opts.get('removed'))", we can simplify the condition "not slowpath and not match.files()" to "not match.anypats() and not match.files()", which is equivalent to "match.always()".
Tue, 28 Oct 2014 22:43:59 -0700 localrepo: simplify by using match.always() method
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Oct 2014 22:43:59 -0700] rev 24383
localrepo: simplify by using match.always() method
Tue, 30 Sep 2014 16:40:15 -0700 localrepo: remove check for matcher object that's never None
Martin von Zweigbergk <martinvonz@gmail.com> [Tue, 30 Sep 2014 16:40:15 -0700] rev 24382
localrepo: remove check for matcher object that's never None
Wed, 18 Mar 2015 11:42:09 -0700 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Mar 2015 11:42:09 -0700] rev 24381
context.walk: walk all files when file and '.' given When both '.' (the working copy root) and an explicit file (or files) are in match.files(), we only walk the explicitly listed files. This is because we remove the '.' from the set too early. Move later and add a test for it. Before this change, the last test would print only "3".
Wed, 18 Mar 2015 09:26:26 -0700 context.walk: call with util.all() a generator, not a list
Martin von Zweigbergk <martinvonz@google.com> [Wed, 18 Mar 2015 09:26:26 -0700] rev 24380
context.walk: call with util.all() a generator, not a list The file set can be large, so avoid going through the entire file set when a file happens not to be in the context.
Tue, 17 Mar 2015 14:52:58 -0700 obsolete: remove last instance of _enabled
Durham Goode <durham@fb.com> [Tue, 17 Mar 2015 14:52:58 -0700] rev 24379
obsolete: remove last instance of _enabled The _enabled bool has been replaced by obsolete.isenabled(...). This removes the last instance of it so I can remove the _enabled flag entirely shortly.
Tue, 24 Feb 2015 18:43:31 -0800 revbranchcache: write cache even during read operations
Durham Goode <durham@fb.com> [Tue, 24 Feb 2015 18:43:31 -0800] rev 24378
revbranchcache: write cache even during read operations Previously we would only actually write the revbranchcache to disk if we were in the middle of a write operation (like commit). Now we will also write it during any read operation. The cache knows how to invalidate itself, so it shouldn't become corrupt if multiple writers try at once (and the write-on-read behavior/risk is the same as all our other caches).
Tue, 10 Feb 2015 20:06:12 -0800 revbranchcache: move cache writing to the transaction finalizer
Durham Goode <durham@fb.com> [Tue, 10 Feb 2015 20:06:12 -0800] rev 24377
revbranchcache: move cache writing to the transaction finalizer Instead of writing the revbranchcache during updatecache (which often happens too early, before the cache is even populated), let's run it as part of the transaction finalizer. It still won't be written for read-only operations, but that's no worse than it is today. A future commit will remove the actual write that happens in updatecache(). This is also good prep for when all caches get moved into the transaction.
Tue, 10 Feb 2015 20:04:47 -0800 revbranchcache: populate cache incrementally
Durham Goode <durham@fb.com> [Tue, 10 Feb 2015 20:04:47 -0800] rev 24376
revbranchcache: populate cache incrementally Previously the cache would populate completely the first time it was accessed. This could take over a minute on larger repos. This patch changes it to update incrementally. Only values that are read will be written, and it will only rewrite as much of the file as strictly necessary. This adds a magic value of '\0\0\0\0' to represent an empty cache entry. The probability of this matching an actual commit hash prefix is tiny, so it's ok if that's always considered a cache miss. This is also BC safe since any existing entries with '\0\0\0\0' will just be considered misses. Perf numbers: Mozilla-central: hg --time log -r 'branch(mobile)' -T. Cold Cache: 14.7s -> 15.1s (3% worse) Warm Cache: 1.6s -> 2.1s (30% worse) Mozilla-cental: hg perfbranchmap 2s -> 2.4s (20% worse) hg: hg log -r 'branch(stable) & branch(default)' Cold Cache: 3.1s -> 1.9s (40% better - because the old code missed the cache on both branch() revset iterations, so it did twice the work) Warm Cache: 0.2 -> 0.26 (30% worse) internal huge repo: hg --time log -r 'tip & branch(default)' Cold Cache: 65.4s -> 0.2s (327x better) While this change introduces minor regressions when iterating over every commit in a branch, it massively improves the cold cache time for operations which touch a single commit. I feel the better O() is worth it in this case.
Tue, 10 Feb 2015 20:01:08 -0800 revbranchcache: move entry writing to a separate function
Durham Goode <durham@fb.com> [Tue, 10 Feb 2015 20:01:08 -0800] rev 24375
revbranchcache: move entry writing to a separate function This moves the actual writing of entries to the cache to a separate function. This will allow us to use it in multiple places. Ex: in one place we will write dummy entries, and in another place we will write real data.
Tue, 10 Feb 2015 19:57:51 -0800 revbranchcache: store repo on the object
Durham Goode <durham@fb.com> [Tue, 10 Feb 2015 19:57:51 -0800] rev 24374
revbranchcache: store repo on the object Previously we would instantiate the revbranchcache with a repo object, use it briefly, then require it be passed in every time we wanted to fetch any information. This seems unnecessary since it's obviously specific to that repo (since it was constructed with it). This patch stores the repo on the revbranchcache object, and removes the repo parameter from the various functions on that class. This has the other nice benefit of removing the double-revbranchcache-read that existed before (it was read once for the branch revset, and once for the repo.revbranchcache).
Tue, 10 Feb 2015 19:53:48 -0800 revbranchcache: move out of branchmap onto localrepo
Durham Goode <durham@fb.com> [Tue, 10 Feb 2015 19:53:48 -0800] rev 24373
revbranchcache: move out of branchmap onto localrepo Previously the revbranchcache was a field inside the branchmap. This is bad for a couple reasons: 1) There can be multiple branchmaps per repo (one for each filter level). There can only be one revbranchcache per repo. In fact, a revbranchcache could only exist on a branchmap that was for the unfiltered view, so you could have branchmaps exist for which you couldn't have a revbranchcache. It was funky. 2) The write lifecycle for the revbranchcache is going to be different from the branchmap (branchmap is greedily written early on, revbranchcache should be lazily computed and written). This patch moves the revbranchcache to live as a field on the localrepo (alongside self._branchmap). This will allow us to handle it's lifecycle differently, which will let us move it to be lazily computed in future patches.
Tue, 17 Mar 2015 14:29:56 -0700 revbranchcache: add test for when the cache is not writable
Durham Goode <durham@fb.com> [Tue, 17 Mar 2015 14:29:56 -0700] rev 24372
revbranchcache: add test for when the cache is not writable The revbranchecache code already handled the case when the cache file wasn't writable, but let's add a test as well so future changes don't regress this.
Tue, 17 Mar 2015 13:06:15 -0700 patch.trydiff: add a docstring
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 13:06:15 -0700] rev 24371
patch.trydiff: add a docstring It took me a bit to figure out what this function actually does.
Tue, 17 Mar 2015 15:33:34 -0700 keyword: monkeypatch patch.diff more generically
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:33:34 -0700] rev 24370
keyword: monkeypatch patch.diff more generically This function doesn't need access to any of the args or kwargs, so make the monkeypatching more robust. (In upcoming patches we'll introduce another argument to patch.diff, and this function would break if it weren't for this patch.)
Tue, 17 Mar 2015 15:52:28 -0700 keyword: rename kw_diff to kwdiff in keeping with Mercurial style rules
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:52:28 -0700] rev 24369
keyword: rename kw_diff to kwdiff in keeping with Mercurial style rules In an upcoming patch we'll change this function's signature. If the name is kept the same, test-check-commit-hg.t complains.
Tue, 17 Mar 2015 20:36:33 +0900 fetch: use an abort hint where appropriate
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Mar 2015 20:36:33 +0900] rev 24368
fetch: use an abort hint where appropriate
Tue, 17 Mar 2015 20:41:52 +0900 eol: replace "working copy" with "working directory" in extension help
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Mar 2015 20:41:52 +0900] rev 24367
eol: replace "working copy" with "working directory" in extension help
Tue, 17 Mar 2015 20:50:19 +0900 revset: replace "working copy" with "working directory" in function help
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Mar 2015 20:50:19 +0900] rev 24366
revset: replace "working copy" with "working directory" in function help
Tue, 17 Mar 2015 21:53:17 +0900 commands: say "working directory" in full spelling
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Mar 2015 21:53:17 +0900] rev 24365
commands: say "working directory" in full spelling
Tue, 17 Mar 2015 22:47:08 +0900 commands: replace "working copy" with "working directory" in help/messages
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Mar 2015 22:47:08 +0900] rev 24364
commands: replace "working copy" with "working directory" in help/messages "working directory" is the standard term, we should use it consistently. But I didn't touch the hint, "run 'hg update' to get a working copy", because "get a working directory" sounds a bit odd.
Tue, 17 Mar 2015 22:21:09 -0400 test-commit-interactive-curses: #require 'tic'
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Mar 2015 22:21:09 -0400] rev 24363
test-commit-interactive-curses: #require 'tic' When run on Windows, this test aborts: @@ -20,7 +20,8 @@ > X > EOF $ hg commit -i -m "a" -d "0 0" - no changes to record + abort: No module named fcntl! + [255] $ hg tip changeset: -1:000000000000 tag: tip Maybe there's another way to get the screen size on Windows (it dies in crecord.gethw()), but for now, quiet the test noise by skipping it if terminal info compiler is unavailable.
Tue, 17 Mar 2015 21:48:34 -0400 check-code: enforce the usage of 'seq.py' instead of 'seq'
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Mar 2015 21:48:34 -0400] rev 24362
check-code: enforce the usage of 'seq.py' instead of 'seq'
Tue, 17 Mar 2015 21:47:47 -0400 tests: replace uses of 'seq' with portable 'seq.py'
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Mar 2015 21:47:47 -0400] rev 24361
tests: replace uses of 'seq' with portable 'seq.py'
Tue, 17 Mar 2015 20:59:23 -0400 tests: introduce 'seq.py' as a portable replacement for 'seq'
Matt Harbison <matt_harbison@yahoo.com> [Tue, 17 Mar 2015 20:59:23 -0400] rev 24360
tests: introduce 'seq.py' as a portable replacement for 'seq' OS X 10.6.8 doesn't have it, while 10.10 does. I'm not sure when it was added. It may be missing from other platforms as well. This currently doesn't handle the string manipulation options (-f, -s and -w in MinGW anyway), since there is currently no need for it. Since xrange defaults to starting at 0 instead of 1, and treats the end as exclusive instead of inclusive, the args need to be extracted instead of doing: xrange(*[int(a) for a in sys.argv[1:]]) Therefore, the step might as well be added, even though there is no current use.
Mon, 16 Mar 2015 16:33:59 -0700 revert: add flag to make revert interactive
Laurent Charignon <lcharignon@fb.com> [Mon, 16 Mar 2015 16:33:59 -0700] rev 24359
revert: add flag to make revert interactive
Mon, 16 Mar 2015 15:37:00 -0700 record: move ui.write wrapping where it should be
Laurent Charignon <lcharignon@fb.com> [Mon, 16 Mar 2015 15:37:00 -0700] rev 24358
record: move ui.write wrapping where it should be We have to do that for the coloring to work in interactive revert
Mon, 16 Mar 2015 15:35:50 -0700 record: refactor the filtering code
Laurent Charignon <lcharignon@fb.com> [Mon, 16 Mar 2015 15:35:50 -0700] rev 24357
record: refactor the filtering code
Mon, 16 Mar 2015 15:30:33 -0700 record: consolidate ui.write wrapping in a function
Laurent Charignon <lcharignon@fb.com> [Mon, 16 Mar 2015 15:30:33 -0700] rev 24356
record: consolidate ui.write wrapping in a function
Tue, 17 Mar 2015 18:20:24 +0900 bookmarks: reuse @number bookmark, if it refers changeset referred remotely
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 17 Mar 2015 18:20:24 +0900] rev 24355
bookmarks: reuse @number bookmark, if it refers changeset referred remotely Before this patch, "@number" suffixed bookmark may be newly created at each "hg pull" from the remote repository, if the bookmark in remote repository diverges from one in local one. This causes unexpected increase of "@number" suffixed bookmarks. This patch reuses "@number" suffixed bookmark, if it refers the changeset which is referred by the same bookmark in the remote repository.
Tue, 17 Mar 2015 18:20:24 +0900 bookmarks: check @pathalias suffix before available @number for efficiency
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 17 Mar 2015 18:20:24 +0900] rev 24354
bookmarks: check @pathalias suffix before available @number for efficiency Before this patch, available "@number" suffix is searched before "@pathalias" suffix, even though the latter has higher priority than the former if the latter exits. This patch checks "@pathalias" suffix before available "@number" for efficiency. When an URL has multiple path definitions, the first one is used for "pathalias" after this patch, even though the last one is used before this patch, because: - this choice can terminate loop immediately for efficiency - such case seems to be rare
Tue, 17 Mar 2015 18:20:24 +0900 bookmarks: prevent divergent bookmark from being updated unexpectedly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 17 Mar 2015 18:20:24 +0900] rev 24353
bookmarks: prevent divergent bookmark from being updated unexpectedly Before this patch, "@99" suffixed bookmark may be updated unexpectedly by the bookmark value on the remote side at "hg pull", if all of "@1" to "@99" suffixed bookmarks exist in the local repository, because variable "n" still refers "@99" suffixed bookmark after the loop to examine "@num" suffixes, even though it already exists in the local repository. This patch prevents divergent bookmark from being updated unexpectedly, and shows warning message in such situation. This patch uses original python script "seq.py" instead of "seq" command to create sequence numbers in the test, because "seq" command may not be available: it isn't defined in recent POSIX specification (POSIX.1-2001 2013 Edition or XPG7)
Wed, 18 Mar 2015 11:41:36 -0700 manifest: include Python.h before standard headers
Drew Gottlieb <drgott@google.com> [Wed, 18 Mar 2015 11:41:36 -0700] rev 24352
manifest: include Python.h before standard headers Python.h should be included before any standard headers according to the python docs: https://docs.python.org/2/c-api/intro.html#include-files
Wed, 18 Mar 2015 13:38:06 -0500 crecord: use colwidth instead of ucolwidth
Matt Mackall <mpm@selenic.com> [Wed, 18 Mar 2015 13:38:06 -0500] rev 24351
crecord: use colwidth instead of ucolwidth
Wed, 18 Mar 2015 13:37:18 -0500 manifest: speed up matches for large sets of files
Matt Mackall <mpm@selenic.com> [Wed, 18 Mar 2015 13:37:18 -0500] rev 24350
manifest: speed up matches for large sets of files If the number of files being matched is large, the bisection overhead can dominate, which caused a performance regression for revert --all and histedit. This introduces a (fairly arbitrary) cross-over from using bisections to bulk search.
Wed, 18 Mar 2015 12:03:44 -0500 perf: add methods for timing changeset file list reading
Matt Mackall <mpm@selenic.com> [Wed, 18 Mar 2015 12:03:44 -0500] rev 24349
perf: add methods for timing changeset file list reading
Sun, 15 Mar 2015 21:52:35 -0400 censor: add exchange tests, via local push/pull and bundle/unbundle
Mike Edgar <adgar@google.com> [Sun, 15 Mar 2015 21:52:35 -0400] rev 24348
censor: add exchange tests, via local push/pull and bundle/unbundle These tests exercise the edge cases of exchanging censored commits between censor-aware Mercurial clients. These tests do not extend to cover backwards-compatible exchange; such tests require a script which builds older versions of Mercurial. For more background on the censorship feature design, see: http://mercurial.selenic.com/wiki/CensorPlan
Sun, 15 Mar 2015 21:52:17 -0400 censor: add censor command to hgext with basic client-side tests
Mike Edgar <adgar@google.com> [Sun, 15 Mar 2015 21:52:17 -0400] rev 24347
censor: add censor command to hgext with basic client-side tests The censor command is a core extension which can replace the contents of a historical file revision with a censor "tombstone" which can be exchanged with older clients in place of the real revision data. The command rewrites the filelog by copying revision-by-revision. Care must be taken to expand the fulltext of the children of the censored revision before copying them to the new filelog; they might be stored as deltas against the uncensored revision, and those deltas will be invalidated. For more background on the censorship feature design, see: http://mercurial.selenic.com/wiki/CensorPlan
Fri, 13 Mar 2015 14:08:30 -0700 record: add comparison methods for recordhunk class
Laurent Charignon <lcharignon@fb.com> [Fri, 13 Mar 2015 14:08:30 -0700] rev 24346
record: add comparison methods for recordhunk class
Thu, 12 Mar 2015 17:50:23 -0700 record: minor refactoring of dorecord
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 17:50:23 -0700] rev 24345
record: minor refactoring of dorecord It prepares the way for introducing the flag to reverse hunk selection
Thu, 12 Mar 2015 14:42:55 -0700 record: add tests for the curses recording interface
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:42:55 -0700] rev 24344
record: add tests for the curses recording interface
Thu, 12 Mar 2015 14:24:48 -0700 record: enable curses recording logic with experimental flag
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:24:48 -0700] rev 24343
record: enable curses recording logic with experimental flag
Fri, 13 Mar 2015 10:51:25 -0700 record: change arguments of curses recording function
Laurent Charignon <lcharignon@fb.com> [Fri, 13 Mar 2015 10:51:25 -0700] rev 24342
record: change arguments of curses recording function This way the arguments are the same for both curses and non-curses versions.
Thu, 12 Mar 2015 17:51:37 -0700 record: change interface of the filtering function
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 17:51:37 -0700] rev 24341
record: change interface of the filtering function This way filtering functions accept chunks and return chunks
Thu, 12 Mar 2015 23:15:06 -0400 hgweb: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:15:06 -0400] rev 24340
hgweb: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 23:18:20 -0400 pvec: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:18:20 -0400] rev 24339
pvec: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 23:16:26 -0400 scmutil: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:16:26 -0400] rev 24338
scmutil: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 23:11:15 -0400 templater: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:11:15 -0400] rev 24337
templater: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 23:08:16 -0400 largefiles: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:08:16 -0400] rev 24336
largefiles: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 23:05:25 -0400 obsolete: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:05:25 -0400] rev 24335
obsolete: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 23:02:19 -0400 fileset: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 23:02:19 -0400] rev 24334
fileset: replace 'ctx._repo' with 'ctx.repo()'
Fri, 13 Mar 2015 20:34:52 -0400 filectx: add a repo accessor
Matt Harbison <matt_harbison@yahoo.com> [Fri, 13 Mar 2015 20:34:52 -0400] rev 24333
filectx: add a repo accessor This is similar to a07314472a80 in motivation. All contexts now have this method, so the rest of the 'ctx._repo' uses can be converted without worrying about what type of context it is.
Fri, 13 Mar 2015 13:03:55 -0400 run-tests: ignore ENOENT failures when removing old .err results
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 13:03:55 -0400] rev 24332
run-tests: ignore ENOENT failures when removing old .err results When the same test runs in multiple threads and the previous run was a failure, the threads can race to delete the error output. This fixes that.
Fri, 13 Mar 2015 12:50:53 -0400 run-tests: stop storing start/stop times in a dict by test name
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 12:50:53 -0400] rev 24331
run-tests: stop storing start/stop times in a dict by test name This resolves the last breakage in run-tests that prevented me from running a single test many times in several threads in parallel. This will be useful for testing potential fixes to flaky tests.
Fri, 13 Mar 2015 12:47:16 -0400 run-tests: avoid running the same test instance concurrently
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 12:47:16 -0400] rev 24330
run-tests: avoid running the same test instance concurrently There's a fair amount of mutable state stored on test case instances. That causes many weird failures if you try to do something like `run-tests.py -j16 --loop test-help.t`. The quick fix is this slightly weird test-reloading dance, which ensures that every time a test is executed it runs on a fresh instance of the TestCase subclass.
Fri, 13 Mar 2015 11:21:53 -0400 run-tests: add --runs-per-test flag
Augie Fackler <augie@google.com> [Fri, 13 Mar 2015 11:21:53 -0400] rev 24329
run-tests: add --runs-per-test flag This is useful when you're working with a flaky test and want to run it (for example) 500 times to see if it'll false-fail. This currently breaks if you use it with more than one thread, but I'm looking into that now.
Thu, 12 Mar 2015 21:41:50 -0400 convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com> [Thu, 12 Mar 2015 21:41:50 -0400] rev 24328
convert: adjust progress bar for octopus merges (issue4169) For merges, we walk the files N-1 times, where N is the number of parents. This means that for an octopus merge with 3 parents and 2 changed files, we actually fetch 6 files. This corrects the progress output of the convert command when such commits are encountered.
Thu, 12 Mar 2015 21:31:52 -0400 test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com> [Thu, 12 Mar 2015 21:31:52 -0400] rev 24327
test-convert-git: show insane progress bar with octopus merge (issue4169) This is done as a separate change from the fix so that it's obvious what is corrected by the bugfix.
Fri, 13 Mar 2015 15:36:11 -0700 manifest: have context use self.hasdir()
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:36:11 -0700] rev 24326
manifest: have context use self.hasdir() A couple places in context currently use "x in self._dirs" to check for the existence of the directory, but this requires that all directories be loaded into a dict. Calling hasdir() instead puts the work on the the manifest to check for the existence of a directory in the most efficient manner.
Fri, 13 Mar 2015 15:32:45 -0700 manifest: add hasdir() to context
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:32:45 -0700] rev 24325
manifest: add hasdir() to context This is a convenience method that calls to its manifest's hasdir(). There are parts of context that check to see if a directory exists, and this method will let implementations of manifest provide an optimal way to find a particular directory.
Fri, 13 Mar 2015 15:25:01 -0700 manifest: add manifestdict.hasdir() method
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:25:01 -0700] rev 24324
manifest: add manifestdict.hasdir() method Allows for alternative implementations of manifestdict to decide if a directory exists in whatever way is most optimal.
Fri, 13 Mar 2015 15:23:02 -0700 manifest: have context's dirs() call its manifest's dirs()
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:23:02 -0700] rev 24323
manifest: have context's dirs() call its manifest's dirs() This lets the context's dirs() method be agnostic towards any alternate manifest implementations.
Fri, 13 Mar 2015 15:19:54 -0700 manifest: add dirs() to manifestdict
Drew Gottlieb <drgott@google.com> [Fri, 13 Mar 2015 15:19:54 -0700] rev 24322
manifest: add dirs() to manifestdict Manifests should have a method of accessing its own dirs, not just the context that references the manifest. This makes it easier for other optimized versions of manifests to compute their own dirs in the most efficient way.
Wed, 17 Sep 2014 22:34:34 +0900 formatter: convert None to json null
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Sep 2014 22:34:34 +0900] rev 24321
formatter: convert None to json null It will be used by "annotate" command to represent the workingctx revision.
Sun, 17 Aug 2014 11:35:31 +0900 localrepo: extend "changeid in repo" to return True for workingctx revision
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Aug 2014 11:35:31 +0900] rev 24320
localrepo: extend "changeid in repo" to return True for workingctx revision This is necessary to implement "wc" symbol for workingctx, that will be used as follows: $ hg annotate -r wc FILE In principle, "rev in repo" should be True if "repo[rev]" can return a context object. But when it was implemented by ea3acaae25bb, lookup() had a long logic to map all sorts of changeids to nodes, and "None in repo" did crash because lookup() could not accept None. So I assume that the case of changeid=None was not considered. Now "None in repo" doesn't crash, it should be True for workingctx revision. Behavior of "changeid in repo": revision "null" existing rev None (workingctx) ---------- ------ ------------ ----------------- original* True True TypeError current True True False this patch True True True (*original: ea3acaae25bb)
Mon, 16 Mar 2015 13:41:45 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:41:45 -0500] rev 24319
merge with stable
Mon, 16 Mar 2015 13:32:28 -0500 crecord: fix another underbar
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:32:28 -0500] rev 24318
crecord: fix another underbar
Mon, 16 Mar 2015 13:25:19 -0500 crecord: fiddle with vertical whitespace
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:25:19 -0500] rev 24317
crecord: fiddle with vertical whitespace
Mon, 16 Mar 2015 13:23:42 -0500 crecord: fix underbar style for orig_stdout
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:23:42 -0500] rev 24316
crecord: fix underbar style for orig_stdout
Mon, 16 Mar 2015 13:22:37 -0500 crecord: use encoding.ucolwidth
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 13:22:37 -0500] rev 24315
crecord: use encoding.ucolwidth
Mon, 16 Mar 2015 12:58:06 -0500 crecord: more import style
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 12:58:06 -0500] rev 24314
crecord: more import style
Mon, 16 Mar 2015 12:55:21 -0500 crecord: fix some import style
Matt Mackall <mpm@selenic.com> [Mon, 16 Mar 2015 12:55:21 -0500] rev 24313
crecord: fix some import style
Fri, 13 Mar 2015 22:50:40 -0400 manifest.c: ensure realloc_if_full() returns 1 or 0
Matt Harbison <matt_harbison@yahoo.com> [Fri, 13 Mar 2015 22:50:40 -0400] rev 24312
manifest.c: ensure realloc_if_full() returns 1 or 0 This fixes an MSVC 2008 warning that I don't see with gcc 4.6.3-2: warning C4047: 'return' : 'bool' differs in levels of indirection from 'line *' More importantly, the truncation from pointer to 'unsigned char' would have returned 0 if self->lines pointed to an address divisible by 0xFF, which causes find_lines() to return MANIFEST_OOM. I was able to cause this to happen in a trivial program with the gcc compiler.
Thu, 12 Mar 2015 14:20:32 -0700 record: change recording function to work with crecord
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:20:32 -0700] rev 24311
record: change recording function to work with crecord
Thu, 12 Mar 2015 14:19:11 -0700 record: add crecord's ui logic to core
Laurent Charignon <lcharignon@fb.com> [Thu, 12 Mar 2015 14:19:11 -0700] rev 24310
record: add crecord's ui logic to core Code adapted from https://bitbucket.org/edgimar/crecord/src to respect coding convention an record's interface
Wed, 11 Mar 2015 16:39:38 -0700 record: change interface of dorecord to accept new filters
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 16:39:38 -0700] rev 24309
record: change interface of dorecord to accept new filters This makes it easier to add different filtering logic (record /crecord ...)
Wed, 11 Mar 2015 16:18:47 -0700 record: remove duplicated tests
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 16:18:47 -0700] rev 24308
record: remove duplicated tests Since the record and commit -i commands are identical we simplify record's test to just cover the help message and minimal smoke testing.
Wed, 11 Mar 2015 15:54:11 -0700 record: make record use commit -i
Laurent Charignon <lcharignon@fb.com> [Wed, 11 Mar 2015 15:54:11 -0700] rev 24307
record: make record use commit -i
Fri, 13 Mar 2015 17:00:06 -0400 style: kill ersatz if-else ternary operators
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 13 Mar 2015 17:00:06 -0400] rev 24306
style: kill ersatz if-else ternary operators Although Python supports `X = Y if COND else Z`, this was only introduced in Python 2.5. Since we have to support Python 2.4, it was a very common thing to write instead `X = COND and Y or Z`, which is a bit obscure at a glance. It requires some intricate knowledge of Python to understand how to parse these one-liners. We change instead all of these one-liners to 4-liners. This was executed with the following perlism: find -name "*.py" -exec perl -pi -e 's,(\s*)([\.\w]+) = \(?(\S+)\s+and\s+(\S*)\)?\s+or\s+(\S*)$,$1if $3:\n$1 $2 = $4\n$1else:\n$1 $2 = $5,' {} \; I tweaked the following cases from the automatic Perl output: prev = (parents and parents[0]) or nullid port = (use_ssl and 443 or 80) cwd = (pats and repo.getcwd()) or '' rename = fctx and webutil.renamelink(fctx) or [] ctx = fctx and fctx or ctx self.base = (mapfile and os.path.dirname(mapfile)) or '' I also added some newlines wherever they seemd appropriate for readability There are probably a few ersatz ternary operators still in the code somewhere, lurking away from the power of a simple regex.
Fri, 13 Mar 2015 14:20:13 -0400 cvsps: use a different tiebreaker to avoid flaky test
Augie Fackler <raf@durin42.com> [Fri, 13 Mar 2015 14:20:13 -0400] rev 24305
cvsps: use a different tiebreaker to avoid flaky test After adding some sneaky debug printing[0], I determined that this test flaked when a CVS commit containing two files starts too close to the end of a second, thus putting file "a" in one second and "b/c" in the following second. The secondary sort key meant that these changes sorted in a different order when the timestamps were different than they did when they matched. As far as I can tell, CVS walks through the files in a stable order, so by sorting on the filenames in cvsps we'll get stable output. It's fine for us to switch from sorting on the branchpoint as a secondary key because this was already the point when we didn't care, and we're just trying to break ties in a stable way. It's unclear to be if having the branchpoint present matters anymore, but it doesn't really hurt to leave it. With this change in place, I was able to run test-convert-cvs over 650 times in a row without a failure. test-convert-cvcs-synthetic.t appears to still be flaky, but I don't think it's *worse* than it was before - just not better (I observed one flaky failure in 200 runs on that test). 0: The helpful debug hack ended up being this, in case it's useful to future flaky test assassins: --- a/hgext/convert/cvsps.py +++ b/hgext/convert/cvsps.py @@ -854,6 +854,8 @@ def debugcvsps(ui, *args, **opts): ui.write(('Branch: %s\n' % (cs.branch or 'HEAD'))) ui.write(('Tag%s: %s \n' % (['', 's'][len(cs.tags) > 1], ','.join(cs.tags) or '(none)'))) + if cs.comment == 'ci1' and (cs.id == 6) == bool(cs.branchpoints): + ui.write('raw timestamp %r\n' % (cs.date,)) if cs.branchpoints: ui.write(('Branchpoints: %s \n') % ', '.join(sorted(cs.branchpoints)))
Sat, 14 Mar 2015 22:34:27 +0900 templates: fix "log -q" output of default style stable
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Mar 2015 22:34:27 +0900] rev 24304
templates: fix "log -q" output of default style It was changed at 0ded0f0b1c04 unintentionally due to name conflicts.
Fri, 13 Mar 2015 17:55:04 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Fri, 13 Mar 2015 17:55:04 -0500] rev 24303
merge with stable
Thu, 12 Mar 2015 22:59:52 -0400 subrepo: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 22:59:52 -0400] rev 24302
subrepo: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 22:55:35 -0400 files: replace 'ctx._repo' with 'ctx.repo()'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 22:55:35 -0400] rev 24301
files: replace 'ctx._repo' with 'ctx.repo()'
Thu, 12 Mar 2015 22:54:53 -0400 context: add a repo accessor
Matt Harbison <matt_harbison@yahoo.com> [Thu, 12 Mar 2015 22:54:53 -0400] rev 24300
context: add a repo accessor There are 29 instances of 'ctx._repo' in the code, so make the ability to access more official.
Thu, 12 Mar 2015 21:49:20 -0400 test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366)
Augie Fackler <augie@google.com> [Thu, 12 Mar 2015 21:49:20 -0400] rev 24299
test-histedit-edit.t: demonstrate qnew fails during a histedit (issue4366) This was accidentally fixed by other work, but given that it's been broken in the past, I'd like to have a test defending us against regressions in this area, especially as we add more functionality to histedit.
Thu, 12 Mar 2015 18:18:29 -0700 lazymanifest: make __iter__ generate filenames, not 3-tuples
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Mar 2015 18:18:29 -0700] rev 24298
lazymanifest: make __iter__ generate filenames, not 3-tuples The _lazymanifest type(s) behave very much like a sorted dict with filenames as keys and (nodeid, flags) as values. It therefore seems surprising that its __iter__ generates 3-tuples of (path, nodeid, flags). Let's make it match dict's behavior of generating the keys instead, and add a new iterentries method for the 3-tuples. With this change, the "x" in "if x in lm" and "for x in lm" now have the same type (a filename string).
Thu, 12 Mar 2015 18:53:44 -0700 lazymanifest: fix pure hg iterkeys()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Mar 2015 18:53:44 -0700] rev 24297
lazymanifest: fix pure hg iterkeys() I broke pure hg when I just added iterkeys() to the native version in 2b7ab29627fd. I forgot to make the pure version sorted. Fix it.
Fri, 13 Mar 2015 21:18:59 +0900 hgweb: prevent loading style map from directories other than specified paths stable
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Mar 2015 21:18:59 +0900] rev 24296
hgweb: prevent loading style map from directories other than specified paths A style name should not contain "/", "\", "." and "..". Otherwise, templates could be loaded from outside of the specified templates directory by invalid ?style= parameter. hgweb should not allow such requests. This change means subdir/name is also rejected.
Wed, 11 Mar 2015 13:46:15 -0700 lazymanifest: add iterkeys() method
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 13:46:15 -0700] rev 24295
lazymanifest: add iterkeys() method So we don't have to iteratate over (path, node, flags) tuples only to throw away the node and flags.
Wed, 11 Mar 2015 13:15:26 -0700 lazymanifest: extract function for iterating to next line
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 13:15:26 -0700] rev 24294
lazymanifest: extract function for iterating to next line This will soon be reused by keys iterator.
Wed, 11 Mar 2015 13:35:34 -0700 lazymanifest: fail if path or hash strings cannot be created
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 13:35:34 -0700] rev 24293
lazymanifest: fail if path or hash strings cannot be created While generating (path, hash, flags), we fail if flags cannot be created. We should also fail if path or hash cannot be created.
Wed, 11 Mar 2015 08:28:56 -0700 manifest: rewrite find(node, f) in terms of read(node)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 08:28:56 -0700] rev 24292
manifest: rewrite find(node, f) in terms of read(node) Since find() now always works with a full manifest, we can simplify by calling read() to give us that manifest. That way, we also populate the manifest cache. However, now that we no longer parse the manifest text into a Python type (thanks, lazymanifest/Augie), the cost of parsing (scanning for newlines, really) is small enough that it seems generally drowned by revlog reading.
Thu, 26 Feb 2015 22:54:13 +0900 ssl: load CA certificates from system's store by default on Python 2.7.9
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Feb 2015 22:54:13 +0900] rev 24291
ssl: load CA certificates from system's store by default on Python 2.7.9 This will make it easy to manage in-house CA certificates, which are often used in corporate environment and installed into the Windows' certs store. Unlike Apple python, the dummycert trick isn't necessary on Python 2.7.9. The default web.cacerts will be set as follows: environment web.cacerts behavior ------------- ----------- ----------------------------------------- Apple Python dummycert fall back to system's store Python 2.7.8 '!' never use CA certs (show warning instead) Python 2.7.9+ None load CA certs from system's store
Wed, 04 Mar 2015 23:27:04 +0900 ssl: set explicit symbol "!" to web.cacerts to disable SSL verification (BC)
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 23:27:04 +0900] rev 24290
ssl: set explicit symbol "!" to web.cacerts to disable SSL verification (BC) The next patch will enable verification by using the system's CA store if possible, which means we would have to distinguish None (=use default) from '' (=--insecure). This smells bug-prone and provides no way to override web.cacerts to forcibly use the system's store by --config argument. This patch changes the meaning of web.cacerts as follows: value behavior ------- --------------------------------------- None/'' use default '!' never use CA certs (set by --insecure) <path> verify by the specified CA certificates Values other than <path> are for internal use and therefore undocumented.
Wed, 04 Mar 2015 22:41:48 +0900 test-https: enable dummycert test only if Apple python is used (issue4500)
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 22:41:48 +0900] rev 24289
test-https: enable dummycert test only if Apple python is used (issue4500) The dummycert trick works only if Python is linked to Apple's patched OpenSSL.
Wed, 04 Mar 2015 22:27:01 +0900 ssl: extract function that returns dummycert path on Apple python
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Mar 2015 22:27:01 +0900] rev 24288
ssl: extract function that returns dummycert path on Apple python This function will be the condition to switch DISABLEOSXDUMMYCERT in test-https.t.
Wed, 11 Mar 2015 21:36:48 -0700 largefiles: don't create chain of __contains__ calls
Martin von Zweigbergk <martinvonz@google.com> [Wed, 11 Mar 2015 21:36:48 -0700] rev 24287
largefiles: don't create chain of __contains__ calls Matt Harbison pointed out that my recent 2720f967a7b1 might cause __contains__ to continously get replaced by another version that calls itself, since the manifest instance returned by the super method is always the same instance due to @propertycache. He also suggested replacing the class instead, as is done with the context class in the surrounding code. Do so.
Thu, 12 Mar 2015 09:06:45 -0700 lazymanifest: don't depend on printf's 'hh' format to work
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Mar 2015 09:06:45 -0700] rev 24286
lazymanifest: don't depend on printf's 'hh' format to work Where we convert a 20-byte binary to a 40-byte hex string in lazymanifest_setitem(), we use sprintf("%02hhx", hash[i]). As Matt Harbison found out, 'hh' seems to be ignored on some platforms (Visual Studio?). If char is signed on such platforms, the value gets sign-extended as it gets promoted into an int when passed into the variadic sprintf(). The resulting integer value will then be printed with leading f's (14 of them on 64-bit systems), since the '2' in the format string indicates only minimum number of characters. This is both incorrect and runs the risk of writing outside of allocated memory (as Matt reported). To fix, let's cast the value to unsigned char before passing it to sprintf(). Also drop the poorly supported 'hh' formatting that now becomes unnecessary.
Wed, 11 Mar 2015 17:53:50 -0700 bundle2: test hooking using the new transaction-level hook
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 11 Mar 2015 17:53:50 -0700] rev 24285
bundle2: test hooking using the new transaction-level hook There is no strong reason to keep a bundle2-level hook as we can use the transaction-level hook.
Mon, 09 Mar 2015 22:50:49 -0700 hook: add a generic hook right before we commit a transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 09 Mar 2015 22:50:49 -0700] rev 24284
hook: add a generic hook right before we commit a transaction We are adding a 'txnclose' hook that will be run right before a transaction is closed. Hooks running at that time will have access to the full transaction content through both 'hookargs' content and on-disk reading. They will be able to abort the transaction.
Mon, 09 Mar 2015 22:43:36 -0700 transaction: add a validation stage
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 09 Mar 2015 22:43:36 -0700] rev 24283
transaction: add a validation stage The 'transaction' object can now be fed a 'validator' function. This function will be run right before the transaction is closed to validate its content. The target usage is hooks. The validation function is expected to raise an exception when it wants to abort the transaction. This only introduce the idea with a default no-op validator. Actual usage is in the next changeset.
Mon, 09 Mar 2015 22:36:56 -0700 hook: add a generic hook after transaction has been closed
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 09 Mar 2015 22:36:56 -0700] rev 24282
hook: add a generic hook after transaction has been closed We are adding generic hooking for all transactions. We may have useful information about what happened during the transaction, user of the transaction should have filled the 'hookargs' dictionnary of the transaction. This hook is simple because it has no power to rollback the transaction.
Wed, 10 Dec 2014 18:19:49 -0800 hook: have a generic hook for transaction opening
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 10 Dec 2014 18:19:49 -0800] rev 24281
hook: have a generic hook for transaction opening We are adding generic hooking for all transactions. We do not really have any useful information to include when opening the transaction but this is a useful time to allow a hook anyway. We better let people abort transaction before they happen than after multiple seconds/minutes of processing.
(0) -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip