Tue, 07 Mar 2017 17:49:50 -0800 context: remove assumptions about manifest creation during _buildstatus
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 17:49:50 -0800] rev 31260
context: remove assumptions about manifest creation during _buildstatus Previously we called self.manifest() in some cases to preload the first manifest. This relied on the assumption that the later _manifestmatches() call did not duplicate any work the original self.manifest() call did. Let's remove that assumption, since it bit me during my refactors of this area and is easy to remove.
Tue, 07 Mar 2017 17:56:30 -0800 context: move _manifest from committablectx to workingctx
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 17:56:30 -0800] rev 31259
context: move _manifest from committablectx to workingctx committablectx had a _manifest implementation that was only used by the derived workingctx class. The other derived versions, like memctx and metadataonlyctx, define their own _manifest functions. Let's move the function down to workingctx, and let's break it into two parts, the _manifest part that reads from self._status, and the part that actually builds the new manifest. This separation will let us reuse the builder code in a future patch to answer _buildstatus with varying status inputs, since workingctx has special behavior for _buildstatus that the other ctx's don't have.
Tue, 07 Mar 2017 09:56:11 -0800 status: handle more node indicators in buildstatus
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 09:56:11 -0800] rev 31258
status: handle more node indicators in buildstatus There are several different node markers that indicate different working copy states. The context._buildstatus function was only handling one of them, and this patch makes it handle all of them (falling back to file content comparisons when in one of these states). This affects a future patch where we get rid of context._manifestmatches as part of getting rid of manifest.matches(). context._manifestmatches is currently hacky in that it uses the newnodeid for all added and modified files, which is why the current newnodeid check is sufficient. When we get rid of this function and use the normal manifest.diff function, we start to see the other indicators in the nodes, so they need to be handled or else the tests fail.
Tue, 07 Mar 2017 18:38:20 -0800 merge: remove uses of manifest.matches
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 18:38:20 -0800] rev 31257
merge: remove uses of manifest.matches This gets rid of the manifest.matches calls in merge.py in favor of the new api. This is part of getting rid of manifest.matches since it is O(manifest).
Tue, 07 Mar 2017 09:56:11 -0800 copies: remove use of manifest.matches
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 09:56:11 -0800] rev 31256
copies: remove use of manifest.matches Convert the existing use of manifest.matches to use the new api. This is part of getting rid of manifest.matches, since it is O(manifest).
Tue, 07 Mar 2017 09:56:11 -0800 manifest: add match argument to diff and filesnotin
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 09:56:11 -0800] rev 31255
manifest: add match argument to diff and filesnotin As part of removing manifest.matches (since it is O(manifest)), let's start by adding match arguments to diff and filesnotin. As we'll see in later patches, these are the only flows that actually use matchers, so by moving the matching into the actual functions, other manifest implementations can make more efficient algorithsm. For instance, this will allow treemanifest diff's to only iterate over the files that are different AND meet the match criteria. No consumers are changed in this patches, but the code is fairly easy to verify visually. Future patches will convert consumers to use it. One test was affected because it did not use the kwargs version of the clean parameter.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip