Mercurial > hg
diff tests/test-narrow-widen-no-ellipsis.t @ 40070:8feae5b989bc
narrow: the first version of narrow_widen wireprotocol command
This patch introduces a wireprotocol command narrow_widen() which will be used
to widen a narrow copy using `hg tracked` command provided by narrow extension.
The wireprotocol command takes the old and new includes and excludes, common
heads, changegroup version, known revs, and a boolean ellipses and generates a
bundle2 of the required data and send it. The clients receives the bundle2
and applies that.
A bundle2 instead of changegroup because in future we might want to add more
things to send while widening. Thanks for martinvonz for the suggestion.
I am not sure whether we need changegroup version as an argument to the command
as I *think* narrow needs changegroup3 already.
The tests shows that we don't exchange phase data now while widening which is
nice. Also we don't check for pushkeys, rbc-cache, bookmarks etc.
This does not support ellipses cases for now but will be supported in future
patches. Since we send bundle2, it won't be hard to plug the ellipses logic in
here.
The existing code for widening a non-ellipses case is also dropped in this
patch.
Differential Revision: https://phab.mercurial-scm.org/D4813
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 28 Sep 2018 23:42:31 +0300 |
parents | 693dda764efe |
children | cb516a854bc7 |
line wrap: on
line diff
--- a/tests/test-narrow-widen-no-ellipsis.t Fri Oct 05 21:43:57 2018 +0900 +++ b/tests/test-narrow-widen-no-ellipsis.t Fri Sep 28 23:42:31 2018 +0300 @@ -104,8 +104,7 @@ sending batch command searching for changes all local heads known remotely - no changes found - sending getbundle command + sending narrow_widen command bundle2-input-bundle: with-transaction bundle2-input-part: "changegroup" (params: * mandatory) supported (glob) adding changesets @@ -115,12 +114,7 @@ adding widest/f revisions (tree !) added 0 changesets with 1 changes to 1 files bundle2-input-part: total payload size * (glob) - bundle2-input-part: "listkeys" (params: 1 mandatory) supported - bundle2-input-part: "phase-heads" supported - bundle2-input-part: total payload size 24 - bundle2-input-bundle: 2 parts total - checking for updated bookmarks - 3 local changesets published + bundle2-input-bundle: 0 parts total widest/f: add from widened narrow clone -> g getting widest/f $ hg tracked @@ -143,6 +137,7 @@ adding file changes added 5 changesets with 4 changes to 2 files new changesets *:* (glob) + 3 local changesets published (run 'hg update' to get a working copy) $ hg update -r 'desc("add wider")' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -179,12 +174,10 @@ $ hg tracked --addinclude wider comparing with ssh://user@dummy/master searching for changes - no changes found adding changesets adding manifests adding file changes added 0 changesets with 1 changes to 1 files - 5 local changesets published $ hg tracked I path:inside I path:wider @@ -284,12 +277,10 @@ $ hg tracked --addinclude d1 comparing with ssh://user@dummy/upstream searching for changes - no changes found adding changesets adding manifests adding file changes added 0 changesets with 1 changes to 1 files - 11 local changesets published $ hg tracked I path:d0 I path:d1 @@ -376,12 +367,10 @@ $ hg --config hooks.pretxnchangegroup.bad=false tracked --addinclude d1 comparing with ssh://user@dummy/upstream searching for changes - no changes found adding changesets adding manifests adding file changes added 0 changesets with 1 changes to 1 files - 11 local changesets published $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" 11: local 10: add d10/f