Sat, 21 Mar 2015 11:56:43 -0400 test-interactive: use stable EOL in various file generating routines
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 11:56:43 -0400] rev 24434
test-interactive: use stable EOL in various file generating routines The seq.py and shell echo redirected to a file ends up with platform specific EOL, which throws off the hash when the file is committed to the test repo on Windows. The other option is to glob the hashes, but the ability to see if they have changed might point out problems that would otherwise be missed.
Tue, 17 Mar 2015 15:46:36 -0700 patch.diff: restrict matcher to relative root in certain cases
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:46:36 -0700] rev 24433
patch.diff: restrict matcher to relative root in certain cases Previously we'd request all results, then filter by relative root. This is clearly inefficient, so we now restrict the matcher to the relative root for certain easy cases. The particular case here is when the matcher matches all files. In that case we can simply create a matcher by the relative root. This is purely an optimization and has no impact on correctness.
Tue, 17 Mar 2015 15:46:30 -0700 commands.diff: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:46:30 -0700] rev 24432
commands.diff: add support for diffs relative to a subdirectory Previous patches added all the backend support for this. This exposes this option in the UI.
Tue, 17 Mar 2015 15:06:40 -0700 cmdutil.diffordiffstat: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 15:06:40 -0700] rev 24431
cmdutil.diffordiffstat: add support for diffs relative to a subdirectory It's possible that some of the match patterns are outside the relative root. We warn in that case. In upcoming patches we'll add tests for this.
Sun, 22 Mar 2015 19:19:16 -0700 test-fileset.t: remove 'bar ' and 'baz\' from tested filenames
Siddharth Agarwal <sid0@fb.com> [Sun, 22 Mar 2015 19:19:16 -0700] rev 24430
test-fileset.t: remove 'bar ' and 'baz\' from tested filenames This test is guarded by a '#if no-windows', but they can't be written out on vfat on Linux either. con.xml can, and for testing that's good enough. Also clean up a stray 'ls' that I mistakenly left in while writing the test.
Mon, 23 Mar 2015 18:21:01 -0700 commands.push: abort when revisions evaluate to empty set (BC)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 23 Mar 2015 18:21:01 -0700] rev 24429
commands.push: abort when revisions evaluate to empty set (BC) If the "-r" argument is specified to "hg push," the user has expressed an intent for a specific changeset to be present on the remote. If that expression cannot be mapped to a known changeset, the user's intent is ambiguous and cannot be acted upon without making assumptions. Previously, if arguments to `push -r <rev>` evaluated to an empty set (perhaps the user specified a revset that didn't evaluate to anything), the empty "revs" list would be passed down to "exchange.push" where it appears the empty list was being interpreted as "push everything." This patch adds validation to the "-r" argument to the push command. If the argument is specified but doesn't resolve to a changeset, the command will abort instead of doing something potentially unexpected. This patch is technically breaking backwards compatibility. I believe this is justified because the new behavior closes a crack that could result in undefined or under-defined behavior. Also, this patch doesn't drop client capabilities because if users really wanted to push all changesets, they can simply omit the "-r" argument from push completely.
Mon, 23 Mar 2015 17:07:25 -0700 largefiles: fix typo with s/__class/__class__/
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Mar 2015 17:07:25 -0700] rev 24428
largefiles: fix typo with s/__class/__class__/ Commit f78252429e0a (largefiles: don't create chain of __contains__ calls, 2015-03-11) introduced a typo with __class instead of __class__. Let's fix it. There are (obviously) no tests covering this code path, and I could not figure out a way to trigger it, so it remains untested. Spotted by Drew Gottlieb.
Mon, 23 Mar 2015 14:47:35 -0400 hgweb: pull line numbers out of main flow of source content
Paul Fisher <pfish@google.com> [Mon, 23 Mar 2015 14:47:35 -0400] rev 24427
hgweb: pull line numbers out of main flow of source content Pulls the autogenerated line number boxes outside of the padding box of the main content of .sourcelines, allowing the first tab to be properly sized and the line numbers to be outside the main source's margin when text is wrapped.
Mon, 23 Mar 2015 15:41:43 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 23 Mar 2015 15:41:43 -0500] rev 24426
merge with stable
Fri, 20 Mar 2015 23:35:13 -0400 crecord: don't abort on Windows when curses isn't available
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 23:35:13 -0400] rev 24425
crecord: don't abort on Windows when curses isn't available This is the hack portion of the previous patch, which can be backed out once we figure out how to deal with curses. Without this, the tests affected by the import problem mentioned in the previous patch fail in exactly the same way, but with the nicer 'module not available' error.
Sat, 21 Mar 2015 01:24:17 -0400 test-fileset: forget non-portable files to avoid failures on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 21 Mar 2015 01:24:17 -0400] rev 24424
test-fileset: forget non-portable files to avoid failures on Windows The 3 deleted lines appeared on Windows, because the files were never created in the first place.
Fri, 20 Mar 2015 23:32:00 -0400 crecord: conditionalize the imports that are not available on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 23:32:00 -0400] rev 24423
crecord: conditionalize the imports that are not available on Windows 'fcntl', 'termios' and 'wcurses' are not available on the default Windows python installation, and importing them caused widespread carnage in the test suite. There were 29 different changed test files (on top of unrelated errors), mostly in the form of an ImportError. The failures weren't related to actual crecord use, and followed the import chain: 'localrepo' -> 'subrepo' -> 'cmdutil' -> 'crecord' -> 'fcntl'
Fri, 20 Mar 2015 21:55:11 -0400 cmdutil: drop a duplicate import of crecord
Matt Harbison <matt_harbison@yahoo.com> [Fri, 20 Mar 2015 21:55:11 -0400] rev 24422
cmdutil: drop a duplicate import of crecord It looks like this crept in with 69538481ea9f.
Sat, 16 Aug 2014 17:50:55 +0900 annotate: add option to annotate working-directory files
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Aug 2014 17:50:55 +0900] rev 24421
annotate: add option to annotate working-directory files Working revision or node is displayed with "+" suffix in plain output, but null/None in machine-readable format.
Thu, 19 Mar 2015 23:31:53 +0900 committablefilectx: override linkrev() to point to the associated changectx
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Mar 2015 23:31:53 +0900] rev 24420
committablefilectx: override linkrev() to point to the associated changectx This is necessary to annotate workingctx revision. basefilectx.linkrev() can't be used because committablefilectx has no filelog. committablefilectx looks for parents() from self._changectx. That means fctx is linked to self._changectx, so linkrev() can simply be aliased to rev().
Sat, 16 Aug 2014 13:44:16 +0900 revset: add wdir() function to specify workingctx revision by command
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Aug 2014 13:44:16 +0900] rev 24419
revset: add wdir() function to specify workingctx revision by command The main purpose of wdir() is to annotate working-directory files. Currently many commands and revsets cannot handle workingctx and may raise exception. For example, -r ":wdir()" results in TypeError. This problem will be addressed by future patches. We could add "wdir" symbol instead, but it would conflict with the existing tag, bookmark or branch. So I decided not to. List of commands that will potentially support workingctx revision: command default remarks -------- ------- ----------------------------------------------------- annotate p1 useful archive p1 might be useful cat p1 might be useful on Windows (no cat) diff p1:wdir (default) export p1 might be useful if wctx can have draft commit message files wdir (default) grep tip:0 might be useful identify wdir (default) locate wdir (default) log tip:0 might be useful with -p or -G option parents wdir (default) status wdir (default) This patch includes minimal test of "hg status" that should be able to handle the workingctx revision.
Sun, 22 Mar 2015 19:08:13 -0400 win32: 'raise ctypes.WinError' -> 'raise ctypes.WinError()' stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 22 Mar 2015 19:08:13 -0400] rev 24418
win32: 'raise ctypes.WinError' -> 'raise ctypes.WinError()' WinError is a function that creates an Error, not an Error itself. This is a partial backout of e34106fa0dc3.
Tue, 17 Mar 2015 13:41:24 -0700 patch.diff: add support for diffs relative to a subdirectory
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 13:41:24 -0700] rev 24417
patch.diff: add support for diffs relative to a subdirectory For now this implementation is pretty naive -- it filters out files right before passing them into trydiff. In upcoming patches we'll add some more smarts.
Tue, 17 Mar 2015 12:59:41 -0700 patch.trydiff: add support for stripping a relative root
Siddharth Agarwal <sid0@fb.com> [Tue, 17 Mar 2015 12:59:41 -0700] rev 24416
patch.trydiff: add support for stripping a relative root This assumes that if relroot is not None, all the files in modified, added and removed start with it. In upcoming patches we'll follow that.
Fri, 20 Mar 2015 17:30:38 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Fri, 20 Mar 2015 17:30:38 -0500] rev 24415
merge with stable
Fri, 20 Mar 2015 16:39:07 -0500 obsolete: mark warning for translation
Matt Mackall <mpm@selenic.com> [Fri, 20 Mar 2015 16:39:07 -0500] rev 24414
obsolete: mark warning for translation No good reason not to.
Wed, 18 Mar 2015 23:03:41 -0400 subrepo: add basic support to hgsubrepo for the files command
Matt Harbison <matt_harbison@yahoo.com> [Wed, 18 Mar 2015 23:03:41 -0400] rev 24413
subrepo: add basic support to hgsubrepo for the files command Paths into the subrepo are not yet supported. The need to use the workingctx in the subrepo will likely be used more in the future, with the proposed working directory revset symbol. It is also needed with archive, if that code is to be reused to support 'extdiff -S'. Unfortunately, it doesn't seem possible to put the smarts in subrepo.subrepo(), as it breaks various status and diff tests. I opted not to pass the desired revision into the subrepo method explicitly, because the only ones that do pass an explicit revision are methods like status and diff, which actually operate on two contexts- the subrepo state and the explicitly passed revision.
Fri, 20 Mar 2015 00:30:35 -0700 mergecopies: reuse ancestry context when traversing file history (issue4537) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 20 Mar 2015 00:30:35 -0700] rev 24412
mergecopies: reuse ancestry context when traversing file history (issue4537) Merge copies is traversing file history in search for copies and renames. Since 3.3 we are doing "linkrev adjustment" to ensure duplicated filelog entry does not confuse the traversal. This "linkrev adjustment" involved ancestry testing and walking in the changeset graph. If we do such walk in the changesets graph for each file, we end up with a 'O(<changesets>x<files>)' complexity that create massive issue. For examples, grafting a changeset in Mozilla's repo moved from 6 seconds to more than 3 minutes. There is a mechanism to reuse such ancestors computation between all files. But it has to be manually set up in situation were it make sense to take such shortcut. This changesets set this mechanism up and bring back the graph time from 3 minutes to 8 seconds. To do so, we need a bigger control on the way 'filectx' are instantiated during each 'checkcopies' calls that 'mergecopies' is doing. We add a new 'setupctx' that configure and return a 'filectx' factory. The function make sure the ancestry context is properly created and the factory make sure it is properly installed on returned 'filectx'.
Thu, 19 Mar 2015 23:57:34 -0700 adjustlinkrev: handle 'None' value as source stable
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 19 Mar 2015 23:57:34 -0700] rev 24411
adjustlinkrev: handle 'None' value as source When the source rev value is 'None', the ctx is a working context. We cannot compute the ancestors from there so we directly skip to its parents. This will be necessary to allow 'None' value for '_descendantrev' itself necessary to make all contexts used in 'mergecopies' reuse the same '_ancestrycontext'.
Thu, 19 Mar 2015 23:52:26 -0700 adjustlinkrev: prepare source revs for ancestry only once stable
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 19 Mar 2015 23:52:26 -0700] rev 24410
adjustlinkrev: prepare source revs for ancestry only once We'll need some more complex initialisation to handle workingfilectx case. We do this small change in a different patch for clarity.
Wed, 18 Mar 2015 22:56:41 -0400 subrepo: add the parent context to hgsubrepo
Matt Harbison <matt_harbison@yahoo.com> [Wed, 18 Mar 2015 22:56:41 -0400] rev 24409
subrepo: add the parent context to hgsubrepo This brings parity with gitsubrepo and svnsubrepo (which already reference their parent), and will be used in an upcoming patch. I'm a bit concerned that the parent context could get stale (consider what happens when the parent repo is reverted for example). I tried adding the parent context to the substate tuple so that the parent is available everywhere a state change is possible, but that made submerge() unhappy. Even with removing the parent context inside submerge(), I wasn't able to get all of the test diffs fixed. But since the other subrepos reference their parent too, if there is a problem, it is a preexisting one (that nobody seems to be running into). It can be fixed if/when it pops up.
Thu, 19 Mar 2015 21:26:18 -0700 fileset: add a fileset for portable filenames
Siddharth Agarwal <sid0@fb.com> [Thu, 19 Mar 2015 21:26:18 -0700] rev 24408
fileset: add a fileset for portable filenames This has mostly the same semantics as the files that the 'ui.portablefilenames' config option would warn or abort about. The only difference is filenames that case-fold to the same string -- given a set of filenames we've already checked we can check whether a new one collides with them, but we don't have a way to tell which filename it collided with.
Thu, 19 Mar 2015 19:52:23 -0700 annotate: reuse ancestry context when adjusting linkrev (issue4532) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 19 Mar 2015 19:52:23 -0700] rev 24407
annotate: reuse ancestry context when adjusting linkrev (issue4532) The linkrev adjustment will likely do the same ancestry walking multiple time so we already have an optional mechanism to take advantage of this. Since 2896f53509a7, linkrev adjustment was done lazily to prevent too bad performance impact on rename computation. However, this laziness created a quadratic situation in 'annotate'. Mercurial repo: hg annotate mercurial/commands.py before: 8.090 after: 36.300 Mozilla repo: hg annotate layout/generic/nsTextFrame.cpp before: 1.190 after: 290.230 So we setup sharing of the ancestry context in the annotate case too. Linkrev adjustment still have an impact but it a much more sensible one. Mercurial repo: hg annotate mercurial/commands.py before: 36.300 after: 10.230 Mozilla repo: hg annotate layout/generic/nsTextFrame.cpp before: 290.230 after: 5.560
Mon, 16 Mar 2015 16:01:16 -0700 treemanifest: make hasdir() faster
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Mar 2015 16:01:16 -0700] rev 24406
treemanifest: make hasdir() faster Same rationale as the previous change.
Tue, 03 Mar 2015 13:50:06 -0800 treemanifest: make filesnotin() faster
Martin von Zweigbergk <martinvonz@google.com> [Tue, 03 Mar 2015 13:50:06 -0800] rev 24405
treemanifest: make filesnotin() faster Same rationale as the previous change.
Thu, 19 Feb 2015 17:13:35 -0800 treemanifest: make diff() faster
Martin von Zweigbergk <martinvonz@google.com> [Thu, 19 Feb 2015 17:13:35 -0800] rev 24404
treemanifest: make diff() faster Containment checking is slower in treemanifest than it is in manifestdict, making the current diff algorithm O(n log n). By traversing both treemanifests in parallel, we can make it O(n). More importantly, once we start lazily loading submanifests, we will be able to easily skip entire submanifest if they have the same nodeid.
Mon, 23 Feb 2015 10:57:57 -0800 treemanifest: store directory path in treemanifest nodes
Martin von Zweigbergk <martinvonz@google.com> [Mon, 23 Feb 2015 10:57:57 -0800] rev 24403
treemanifest: store directory path in treemanifest nodes This leads to less concatenation while iterating, and it's useful for debugging.
Thu, 19 Mar 2015 11:07:57 -0700 treemanifest: add configuration for using treemanifest type
Martin von Zweigbergk <martinvonz@google.com> [Thu, 19 Mar 2015 11:07:57 -0700] rev 24402
treemanifest: add configuration for using treemanifest type This change adds boolean configuration option experimental.treemanifest. When the option is enabled, manifests are parsed into the new treemanifest type. Tests can be now run using treemanifest by switching the config option default in localrepo._applyrequirements(). Tests pass even when made to randomly choose between manifestdict and treemanifest, suggesting that the two types produce identical manifests (so e.g. a manifest revlog entry written from a treemanifest can be parsed by the manifestdict code).
Thu, 19 Mar 2015 11:08:42 -0700 treemanifest: create treemanifest class
Martin von Zweigbergk <martinvonz@google.com> [Thu, 19 Mar 2015 11:08:42 -0700] rev 24401
treemanifest: create treemanifest class There are a number of problems with large and flat manifests. Copying from http://mercurial.selenic.com/wiki/ManifestShardingPlan: * manifest too large for RAM * manifest resolution too much CPU (long delta chains) * committing is slow because entire manifest has to be hashed * impossible for narrow clone to leave out part of manifest as all is needed to calculate new hash * diffing two revisions involves traversing entire subdirectories even if identical This is a first step in a series introducing a manifest revlog per directory. This change adds a new manifest class: treemanifest, which is a tree where each node has a dict of files (nodeids), a dict of flags, and a dict of subdirectories (treemanifests). So far, it behaves just like manifestdict, but it will later help us write one manifest revlog per directory. The new class is still unused; it will be used after the next change. The code is not yet optimized. Running with it (see below) makes most or all operations slower. Once we start storing manifest revlogs for every directory, it should be possible to make many of these operations much faster. The fastdelta() optimization has been intentionally not implemented for the treemanifests. We can implement it later if necessary. All tests pass when run with the following patch (and without, of couse): --- a/mercurial/manifest.py Thu Mar 19 11:08:42 2015 -0700 +++ b/mercurial/manifest.py Thu Mar 19 11:15:50 2015 -0700 @@ -596,7 +596,7 @@ class manifest(revlog.revlog): return None, None def add(self, m, transaction, link, p1, p2, added, removed): - if p1 in self._mancache: + if False and p1 in self._mancache: # If our first parent is in the manifest cache, we can # compute a delta here using properties we know about the # manifest up-front, which may save time later for the @@ -626,3 +626,5 @@ class manifest(revlog.revlog): self._mancache[n] = (m, arraytext) return n + +manifestdict = treemanifest
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.
(0) -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip