Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 13:32:10 -0500] rev 31274
extensions: use [0:1] slice on config path instead of [0]
This behaves the same in Python 2 and Python 3, even though the path
is a bytes.
Augie Fackler <raf@durin42.com> [Fri, 03 Mar 2017 13:27:21 -0500] rev 31273
extensions: use inspect module instead of func_code.co_argcount
Fixes the extsetup argspec check on Python 3.
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 18:29:58 -0800] rev 31272
treemanifest: add tests covering hg diff of partial trees
Previously the hg files tests also covered the logic (i.e.
treemanifest.matches) that governed how hg diff limited its diff. In a future
patch we will be switching treemanifest.diff() to have a custom implementation,
so let's go ahead and add equivalent test coverage for hg diff.
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 17:52:45 -0800] rev 31271
context: remove uses of manifest.matches
This removes the uses of manifest.matches in context.py in favor of the new
manifest.diff(match) api. This is part of removing manifest.matches since it is
O(manifest).
To drop the dependency on ctx._manifestmatches(s) we transfer responsibilty for
creating status oriented manifests over to ctx._buildstatusmanifest(s). This
already existed for workingctx, we just need to implement a simple version for
basectx. The old _manifestmatches functionality is basically identical to the
_buildstatusmanifest functionality (minus the matching part), so no behavior
should be lost.
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 17:49:50 -0800] rev 31270
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.
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 17:56:30 -0800] rev 31269
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.
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 09:56:11 -0800] rev 31268
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.
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 18:38:20 -0800] rev 31267
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).
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 09:56:11 -0800] rev 31266
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).
Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 09:56:11 -0800] rev 31265
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.