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

r35722:41ef02ba default
r39673:c7a7c7e8 default
Show More
test-merge9.t
94 lines | 1.7 KiB | text/troff | Tads3Lexer
Pradeepkumar Gayam
tests: unify test-merge9
r11982 test that we don't interrupt the merge session if
a file-level merge failed
$ hg init repo
$ cd repo
$ echo foo > foo
$ echo a > bar
$ hg ci -Am 'add foo'
adding bar
adding foo
$ hg mv foo baz
$ echo b >> bar
$ echo quux > quux1
$ hg ci -Am 'mv foo baz'
adding quux1
$ hg up -qC 0
$ echo >> foo
$ echo c >> bar
$ echo quux > quux2
$ hg ci -Am 'change foo'
adding quux2
created new head
test with the rename on the remote side
$ HGMERGE=false hg merge
merging bar
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 merging foo and baz to baz
Pradeepkumar Gayam
tests: unify test-merge9
r11982 merging bar failed!
1 files updated, 1 files merged, 0 files removed, 1 files unresolved
Pulkit Goyal
merge: add `--abort` flag which can abort the merge...
r35722 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Pradeepkumar Gayam
tests: unify test-merge9
r11982 $ hg resolve -l
U bar
R baz
test with the rename on the local side
$ hg up -C 1
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ HGMERGE=false hg merge
merging bar
Siddharth Agarwal
merge.mergestate: perform all premerges before any merges (BC)...
r26618 merging baz and foo to baz
Pradeepkumar Gayam
tests: unify test-merge9
r11982 merging bar failed!
1 files updated, 1 files merged, 0 files removed, 1 files unresolved
Pulkit Goyal
merge: add `--abort` flag which can abort the merge...
r35722 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Pradeepkumar Gayam
tests: unify test-merge9
r11982
show unresolved
$ hg resolve -l
U bar
R baz
unmark baz
$ hg resolve -u baz
show
$ hg resolve -l
U bar
U baz
$ hg st
M bar
M baz
M quux2
? bar.orig
re-resolve baz
$ hg resolve baz
merging baz and foo to baz
after resolve
$ hg resolve -l
U bar
R baz
resolve all warning
$ hg resolve
Nathan Goldbaum
resolve: report no argument warning using a hint...
r21940 abort: no files or directories specified
timeless@mozdev.org
resolve: consistently describe re-merge + unresolved
r26352 (use --all to re-merge all unresolved files)
Matt Mackall
tests: add exit codes to unified tests
r12316 [255]
Pradeepkumar Gayam
tests: unify test-merge9
r11982
resolve all
$ hg resolve -a
merging bar
Siddharth Agarwal
simplemerge: move conflict warning message to filemerge...
r26614 warning: conflicts while merging bar! (edit, then use 'hg resolve --mark')
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Pradeepkumar Gayam
tests: unify test-merge9
r11982
after
$ hg resolve -l
U bar
R baz
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..