Mercurial > hg
annotate tests/test-backwards-remove.t @ 40924:08cfa77d7288
wireprotov2: unify file revision collection and linknode derivation
The old mechanism for choosing which file revisions to send in the
haveparents=True case was buggy in multiple ways - the most severe
of which being that file revisions were excluded when they shouldn't
have been.
This commit unifies the logic for deriving the filenodes that will
be sent by the "filesdata" command. We now consistently read files
data from manifests. The "haveparents" argument now controls whether
we iterate ctx.files() or use the full manifest to derive relevant
files.
The logic here is still woefully lacking to fully support shallow
clones. It will require an API break to fully address. This commit
should at least make the server APIs emit proper data, which is
strictly better than before.
Differential Revision: https://phab.mercurial-scm.org/D5406
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 10 Dec 2018 18:55:08 +0000 |
parents | 4c94b6d0fb1c |
children | 5c2a4f37eace |
rev | line source |
---|---|
11857
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
1 $ hg init |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
2 $ echo This is file a1 > a |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
3 $ hg add a |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11857
diff
changeset
|
4 $ hg commit -m "commit #0" |
11857
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
5 $ ls |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
6 a |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
7 $ echo This is file b1 > b |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
8 $ hg add b |
12156
4c94b6d0fb1c
tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents:
11857
diff
changeset
|
9 $ hg commit -m "commit #1" |
11857
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
10 $ hg co 0 |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
11 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
12 |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
13 B should disappear |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
14 |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
15 $ ls |
9661514f85ae
tests: unify test-backwards-remove
Martin Geisler <mg@lazybytes.net>
parents:
1933
diff
changeset
|
16 a |