- Apr 10, 2015
-
-
Martin von Zweigbergk authored
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)
-
- May 19, 2015
-
-
Martin von Zweigbergk authored
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.
-
- Feb 26, 2015
-
-
Martin von Zweigbergk authored
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.
-
- Nov 05, 2014
-
-
Martin von Zweigbergk authored
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.
-
- May 16, 2015
-
-
Durham Goode authored
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.
-
Durham Goode authored
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).
-
- May 18, 2015
-
-
Durham Goode authored
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.
-
- May 16, 2015
-
-
Durham Goode authored
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.
-
- May 19, 2015
-
-
Matt Mackall authored
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.
-
Pierre-Yves David authored
It is not helping anything anymore.
-
- May 18, 2015
-
-
Pierre-Yves David authored
It was only there as a compatibility layer with a version of Python which we do support anymore.
-
Pierre-Yves David authored
Python 2.4 compatibility have packed and sailed.
-
Pierre-Yves David authored
There is no reason to not have simple code now that Python 2.4 is dead.
-
Pierre-Yves David authored
It's all just a memory now.
-
Pierre-Yves David authored
Python 2.4.1 doesn't provide the full URI, good for it.
-
Pierre-Yves David authored
He's dead, Jim.
-
Pierre-Yves David authored
A good Python 2.4 hack is a removed Python 2.4 hack.
-
Pierre-Yves David authored
Toto, I've a feeling we're not in anno 2004 anymore.
-
Pierre-Yves David authored
Ding Dong, the witch is dead!
-
Pierre-Yves David authored
Farewell, we do not need you anymore.
-
Pierre-Yves David authored
We now have access to this horrible but less bad than 'cond and val or otherval' syntax.
-
Pierre-Yves David authored
There are no Python 2.4 related errors remaining.
-
Pierre-Yves David authored
I'm not clear what it is doing, but one who knows what it is about can now make use of it.
-
Pierre-Yves David authored
After discussion with Augie and Matt, we are fine with it being introduced in the code base.
-
- May 19, 2015
-
-
durin42 authored
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.
-
Matt Mackall authored
-
- May 18, 2015
-
-
Matt Harbison authored
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.
-
- May 17, 2015
-
-
Matt Harbison authored
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.
-
- May 19, 2015
-
-
Pierre-Yves David authored
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.
-
- Apr 24, 2015
-
-
Laurent Charignon authored
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.
-
- Apr 01, 2015
-
-
Laurent Charignon authored
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.
-
- May 08, 2015
-
-
Drew Gottlieb authored
fmap isn't a very descriptive name for the set of the match's files.
-
- May 06, 2015
-
-
Drew Gottlieb authored
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.
-
- Apr 16, 2015
-
-
Augie Fackler authored
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/
-
- Apr 28, 2015
-
-
Augie Fackler authored
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.
-
- Apr 11, 2015
-
-
Martin von Zweigbergk authored
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.
-
- May 18, 2015
-
-
Pierre-Yves David authored
This is no longer under 'Exception' in Python 2.6.
-
Pierre-Yves David authored
We want recover to be rock solid.
-
Pierre-Yves David authored
We can now catch more things.
-
Pierre-Yves David authored
We can ensure we fail over properly in more cases.
-