##// 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:

r39442:cb70501d default
r39673:c7a7c7e8 default
Show More
test-issue660.t
154 lines | 2.0 KiB | text/troff | Tads3Lexer
Matt Mackall
urls: bulk-change BTS urls to new location
r26420 https://bz.mercurial-scm.org/660 and:
https://bz.mercurial-scm.org/322
Adrian Buehlmann
tests: unify test-issue*
r12195
$ hg init
$ echo a > a
$ mkdir b
$ echo b > b/b
$ hg commit -A -m "a is file, b is dir"
adding a
adding b/b
File replaced with directory:
$ rm a
$ mkdir a
$ echo a > a/a
Should fail - would corrupt dirstate:
$ hg add a/a
abort: file 'a' in dirstate clashes with 'a/a'
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Adrian Buehlmann
tests: unify test-issue*
r12195
Removing shadow:
$ hg rm --after a
Should succeed - shadow removed:
$ hg add a/a
Directory replaced with file:
$ rm -r b
$ echo b > b
Should fail - would corrupt dirstate:
$ hg add b
abort: directory 'b' already in dirstate
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Adrian Buehlmann
tests: unify test-issue*
r12195
Removing shadow:
$ hg rm --after b/b
Should succeed - shadow removed:
$ hg add b
Look what we got:
$ hg st
A a/a
A b
R a
R b/b
Revert reintroducing shadow - should fail:
$ rm -r a b
$ hg revert b/b
abort: file 'b' in dirstate clashes with 'b/b'
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Adrian Buehlmann
tests: unify test-issue*
r12195
Revert all - should succeed:
$ hg revert --all
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 forgetting a/a
Adrian Buehlmann
tests: unify test-issue*
r12195 forgetting b
Sushil khanchi
revert: fix the inconsistency of status msgs in --interactive mode...
r39442 undeleting a
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 undeleting b/b
Adrian Buehlmann
tests: unify test-issue*
r12195
$ hg st
Matt Mackall
revert: make backup when unforgetting a file (issue3423)...
r19510 Issue3423:
$ hg forget a
$ echo zed > a
$ hg revert a
$ hg st
? a.orig
$ rm a.orig
Adrian Buehlmann
tests: unify test-issue*
r12195 addremove:
$ rm -r a b
$ mkdir a
$ echo a > a/a
$ echo b > b
$ hg addremove -s 0
removing a
adding a/a
adding b
removing b/b
$ hg st
A a/a
A b
R a
R b/b
commit:
$ hg ci -A -m "a is dir, b is file"
$ hg st --all
C a/a
C b
Long directory replaced with file:
$ mkdir d
$ mkdir d/d
$ echo d > d/d/d
$ hg commit -A -m "d is long directory"
adding d/d/d
$ rm -r d
$ echo d > d
Should fail - would corrupt dirstate:
$ hg add d
abort: directory 'd' already in dirstate
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Adrian Buehlmann
tests: unify test-issue*
r12195
Removing shadow:
$ hg rm --after d/d/d
Should succeed - shadow removed:
$ hg add d
$ hg ci -md
Update should work at least with clean working directory:
$ rm -r a b d
$ hg up -r 0
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg st --all
C a
C b/b
$ rm -r a b
$ hg up -r 1
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg st --all
C a/a
C b