##// END OF EJS Templates
wireprotov2: define and implement "manifestdata" command...
wireprotov2: define and implement "manifestdata" command The added command can be used for obtaining manifest data. Given a manifest path and set of manifest nodes, data about manifests can be retrieved. Unlike changeset data, we wish to emit deltas to describe manifest revisions. So the command uses the relatively new API for building delta requests and emitting them. The code calls into deltaparent(), which I'm not very keen of. There's still work to be done in delta generation land so implementation details of storage (e.g. exactly one delta is stored/available) don't creep into higher levels. But we can worry about this later (there is already a TODO on imanifestorage tracking this). On the subject of parent deltas, the server assumes parent revisions exist on the receiving end. This is obviously wrong for shallow clone. I've added TODOs to add a mechanism to the command to allow clients to specify desired behavior. This shouldn't be too difficult to implement. Another big change is that the client must explicitly request manifest nodes to retrieve. This is a major departure from "getbundle," where the server derives relevant manifests as it iterates changesets and sends them automatically. As implemented, the client must transmit each requested node to the server. At 20 bytes per node, we're looking at 2 MB per 100,000 nodes. Plus wire encoding overhead. This isn't ideal for clients with limited upload bandwidth. I plan to address this in the future by allowing alternate mechanisms for defining the revisions to retrieve. One idea is to define a range of changeset revisions whose manifest revisions to retrieve (similar to how "changesetdata" works). We almost certainly want an API to look up an individual manifest by node. And that's where I've chosen to start with the implementation. Again, a theme of this early exchangev2 work is I want to start by building primitives for accessing raw repository data first and see how far we can get with those before we need more complexity. Differential Revision: https://phab.mercurial-scm.org/D4488

File last commit:

r37425:567bddcb default
r39673:c7a7c7e8 default
Show More
test-contrib.t
175 lines | 3.8 KiB | text/troff | Tads3Lexer
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031 Set vars:
Thomas Arendsen Hein
tests: make tests work if directory contains special characters...
r16350 $ CONTRIBDIR="$TESTDIR/../contrib"
Augie Fackler
Move test-dumprevlog to test-contrib in anticipation of more contrib tests
r14031
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 Test simplemerge command:
$ cp "$CONTRIBDIR/simplemerge" .
$ echo base > base
$ echo local > local
$ cat base >> local
$ cp local orig
$ cat base > other
$ echo other >> other
changing local directly
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge local base other && echo "merge succeeded"
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 merge succeeded
$ cat local
local
base
other
$ cp orig local
printing to stdout
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p local base other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 local
base
other
local:
$ cat local
local
base
conflicts
$ cp base conflict-local
$ cp other conflict-other
$ echo not other >> conflict-local
$ echo end >> conflict-local
$ echo end >> conflict-other
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p conflict-local base conflict-other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 base
<<<<<<< conflict-local
not other
=======
other
Ryan McElroy
merge: minimize conflicts when common base is not shown (issue4447)...
r28072 >>>>>>> conflict-other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 end
[1]
1 label
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p -L foo conflict-local base conflict-other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 base
<<<<<<< foo
not other
=======
other
Ryan McElroy
merge: minimize conflicts when common base is not shown (issue4447)...
r28072 >>>>>>> conflict-other
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 end
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 [1]
2 labels
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p -L foo -L bar conflict-local base conflict-other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 base
<<<<<<< foo
not other
=======
other
Ryan McElroy
merge: minimize conflicts when common base is not shown (issue4447)...
r28072 >>>>>>> bar
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 end
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 [1]
Pierre-Yves David
simplemerge: support three labels when merging...
r22024 3 labels
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p -L foo -L bar -L base conflict-local base conflict-other
Pierre-Yves David
simplemerge: support three labels when merging...
r22024 base
<<<<<<< foo
not other
end
||||||| base
=======
other
end
>>>>>>> bar
[1]
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 too many labels
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p -L foo -L bar -L baz -L buz conflict-local base conflict-other
Pierre-Yves David
simplemerge: support three labels when merging...
r22024 abort: can only specify three labels.
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 [255]
binary file
Pulkit Goyal
py3: replace file() with open() in test-contrib.t...
r36048 $ $PYTHON -c "f = open('binary-local', 'w'); f.write('\x00'); f.close()"
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 $ cat orig >> binary-local
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -p binary-local base other
Sune Foldager
fix test broken in merge from stable
r14330 warning: binary-local looks like a binary file.
[1]
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032
binary file --text
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge -a -p binary-local base other 2>&1
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 warning: binary-local looks like a binary file.
\x00local (esc)
base
other
help
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge --help
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 simplemerge [OPTS] LOCAL BASE OTHER
Simple three-way file merge utility with a minimal feature set.
Apply to LOCAL the changes necessary to go from BASE to OTHER.
By default, LOCAL is overwritten with the results of this operation.
options:
-L --label labels to use on conflict markers
-a --text treat all files as text
-p --print print results instead of overwriting LOCAL
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 --no-minimal no effect (DEPRECATED)
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 -h --help display help and exit
-q --quiet suppress output
wrong number of arguments
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 simplemerge: wrong number of arguments
simplemerge [OPTS] LOCAL BASE OTHER
Simple three-way file merge utility with a minimal feature set.
Apply to LOCAL the changes necessary to go from BASE to OTHER.
By default, LOCAL is overwritten with the results of this operation.
options:
-L --label labels to use on conflict markers
-a --text treat all files as text
-p --print print results instead of overwriting LOCAL
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 --no-minimal no effect (DEPRECATED)
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 -h --help display help and exit
-q --quiet suppress output
[1]
bad option
Augie Fackler
tests: replace yet more calls to `python` with $PYTHON...
r33262 $ $PYTHON simplemerge --foo -p local base other
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 simplemerge: option --foo not recognized
simplemerge [OPTS] LOCAL BASE OTHER
Simple three-way file merge utility with a minimal feature set.
Apply to LOCAL the changes necessary to go from BASE to OTHER.
By default, LOCAL is overwritten with the results of this operation.
options:
-L --label labels to use on conflict markers
-a --text treat all files as text
-p --print print results instead of overwriting LOCAL
Pierre-Yves David
simplemerge: burn "minimal" feature to the ground...
r22023 --no-minimal no effect (DEPRECATED)
Augie Fackler
test-simplemerge-cmd.t: move all tests into test-contrib.t
r14032 -h --help display help and exit
-q --quiet suppress output
[1]