Durham Goode <durham@fb.com> [Tue, 07 Mar 2017 17:52:45 -0800] rev 31261
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 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.
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.
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.
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).
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).
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.
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 00:07:13 +0900] rev 31254
fileset: drop false function signatures from revs() and status() docs
They should be inserted by @predicate helper.
Yuya Nishihara <yuya@tcha.org> [Wed, 08 Mar 2017 22:30:12 +0900] rev 31253
py3: factor out bytechr() function
I also changed xrange(127) to range(127) as the number is relatively small.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Mar 2017 13:34:01 +0100] rev 31252
vfs: use 'vfs' module directly in 'test-clone-uncompressed'
Now that the 'vfs' classes moved in their own module, lets use the new module
directly. We update code iteratively to help with possible bisect needs in the
future.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Mar 2017 13:33:28 +0100] rev 31251
vfs: use 'vfs' module directly in 'test-filecache'
Now that the 'vfs' classes moved in their own module, lets use the new module
directly. We update code iteratively to help with possible bisect needs in the
future.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Mar 2017 13:33:16 +0100] rev 31250
vfs: use 'vfs' module directly in 'test-parseindex'
Now that the 'vfs' classes moved in their own module, lets use the new module
directly. We update code iteratively to help with possible bisect needs in the
future.