2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2021-06-19 03:38:08 +03:00
|
|
|
$ setconfig treemanifest.flatcompat=False
|
2017-08-29 23:02:22 +03:00
|
|
|
$ . "$TESTDIR/library.sh"
|
|
|
|
|
|
|
|
Setup the server
|
|
|
|
|
|
|
|
$ hginit master
|
|
|
|
$ cd master
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [extensions]
|
2018-01-09 23:59:00 +03:00
|
|
|
> pushrebase=
|
|
|
|
> treemanifest=
|
2017-08-29 23:02:22 +03:00
|
|
|
> [treemanifest]
|
|
|
|
> server=True
|
|
|
|
> [remotefilelog]
|
|
|
|
> server=True
|
2017-08-31 21:14:39 +03:00
|
|
|
> shallowtrees=True
|
2017-08-29 23:02:22 +03:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
Make local commits on the server
|
|
|
|
$ mkdir subdir
|
|
|
|
$ echo x > subdir/x
|
|
|
|
$ hg commit -qAm 'add subdir/x'
|
|
|
|
|
|
|
|
The following will simulate the transition from flat to tree-only
|
|
|
|
1. Flat only client, with flat only draft commits
|
|
|
|
2. Hybrid client, with some flat and some flat+tree draft commits
|
|
|
|
3. Tree-only client, with only tree commits (old flat are converted)
|
|
|
|
|
|
|
|
Create flat manifest client
|
|
|
|
$ cd ..
|
|
|
|
$ hgcloneshallow ssh://user@dummy/master client -q
|
2020-09-24 19:44:20 +03:00
|
|
|
fetching tree '' 5fbe397e5ac6cb7ee263c5c67613c4665306d143, found via d618f764f9a1
|
2019-10-28 18:29:28 +03:00
|
|
|
2 trees fetched over * (glob)
|
2020-01-09 18:44:55 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2017-08-29 23:02:22 +03:00
|
|
|
$ cd client
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [extensions]
|
2018-10-11 16:55:19 +03:00
|
|
|
> amend=
|
2018-01-09 23:59:00 +03:00
|
|
|
> pushrebase=
|
2017-08-29 23:02:22 +03:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
Make a flat-only draft commit
|
|
|
|
$ echo f >> subdir/x
|
|
|
|
$ hg commit -qm "flat only commit"
|
|
|
|
$ hg up '.^'
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
|
|
|
Transition to hybrid flat+tree client
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [treemanifest]
|
|
|
|
> demanddownload=True
|
|
|
|
> EOF
|
|
|
|
|
|
|
|
# Viewing commit from server should download trees
|
|
|
|
$ hg log -r . --stat -T "{desc}\n"
|
|
|
|
add subdir/x
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
# Viewing flat draft commit should not produce tree packs
|
|
|
|
$ hg log -r tip --stat -T '{desc}\n'
|
|
|
|
flat only commit
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
Make a local hybrid flat+tree draft commit
|
|
|
|
$ echo h >> subdir/x
|
2019-09-10 23:07:07 +03:00
|
|
|
$ ls_l .hg/store/packs | grep manifests
|
2019-10-28 18:29:28 +03:00
|
|
|
drwxrwxr-x manifests
|
2017-08-29 23:02:22 +03:00
|
|
|
$ hg commit -qm "hybrid flat+tree commit"
|
|
|
|
$ hg up '.^'
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
|
2018-05-09 21:06:47 +03:00
|
|
|
Enable sendtrees and verify flat is converted to tree on demand
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
|
|
> [treemanifest]
|
|
|
|
> sendtrees=True
|
|
|
|
> EOF
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg log -r f3216a7f98b5a80b45db6bd600d958cbffa49d9e --stat
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: f3216a7f98b5
|
2018-05-09 21:06:47 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: flat only commit
|
|
|
|
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2018-05-09 21:06:47 +03:00
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
Make a local tree-only draft commit
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
$ echo t >> subdir/x
|
|
|
|
$ hg commit -qm "tree only commit"
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
$ hg debugdata -c 3
|
2019-10-28 18:29:28 +03:00
|
|
|
0b096b20288404c17aa355fdeca48decf58d745d
|
2017-08-29 23:02:22 +03:00
|
|
|
test
|
|
|
|
0 0
|
|
|
|
subdir/x
|
|
|
|
|
|
|
|
tree only commit (no-eol)
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
Tree-only amend
|
|
|
|
$ echo >> subdir/x
|
|
|
|
$ hg commit --amend
|
2017-09-08 21:24:24 +03:00
|
|
|
# amend commit was added
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
# No manifest revlog revision was added
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2017-08-29 23:02:22 +03:00
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg log -r 'predecessors(tip)-tip' --stat
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: 43903a6bf43f
|
2017-08-29 23:02:22 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
2017-09-08 21:24:24 +03:00
|
|
|
summary: tree only commit
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2021-06-19 03:38:08 +03:00
|
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
2020-07-02 23:11:57 +03:00
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
Test pulling new commits from a hybrid server
|
|
|
|
$ cd ../master
|
|
|
|
$ echo x >> subdir/x
|
|
|
|
$ hg commit -qAm 'modify subdir/x'
|
|
|
|
$ hg log -r tip -T '{manifest}'
|
2019-10-28 18:29:28 +03:00
|
|
|
7e265a5dc5229c2b237874c6bd19f6ef4120f949 (no-eol)
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
$ cd ../client
|
|
|
|
$ hg pull
|
|
|
|
pulling from ssh://user@dummy/master
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2019-11-07 21:50:10 +03:00
|
|
|
added 1 changesets with 0 changes to 0 files
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
$ hg debugindex -m --config treemanifest.treeonly=False
|
2019-10-29 05:18:47 +03:00
|
|
|
hg debugindex: invalid arguments
|
|
|
|
(use 'hg debugindex -h' to get help)
|
2019-10-28 18:29:28 +03:00
|
|
|
[255]
|
2017-08-29 23:02:22 +03:00
|
|
|
$ hg log -r tip --stat --pager=off
|
2020-07-02 23:11:57 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
|
|
|
fetching tree '' 7e265a5dc5229c2b237874c6bd19f6ef4120f949, found via 098a163f13ea
|
2017-08-29 23:02:22 +03:00
|
|
|
2 trees fetched over * (glob)
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: 098a163f13ea
|
2017-08-29 23:02:22 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: modify subdir/x
|
|
|
|
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
Test rebasing treeonly commits
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg rebase -d 'max(desc(modify))' -b 'max(desc(hybrid))'
|
2019-10-28 18:29:28 +03:00
|
|
|
rebasing abc828a8166c "hybrid flat+tree commit"
|
2017-08-29 23:02:22 +03:00
|
|
|
merging subdir/x
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging subdir/x! (edit, then use 'hg resolve --mark')
|
2017-08-29 23:02:22 +03:00
|
|
|
unresolved conflicts (see hg resolve, then hg rebase --continue)
|
|
|
|
[1]
|
|
|
|
$ printf "x\nx\nh\n" > subdir/x
|
|
|
|
$ hg resolve --mark subdir/x
|
|
|
|
(no more unresolved files)
|
|
|
|
continue: hg rebase --continue
|
|
|
|
$ hg rebase --continue
|
2019-10-28 18:29:28 +03:00
|
|
|
rebasing abc828a8166c "hybrid flat+tree commit"
|
2017-08-29 23:02:22 +03:00
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
Test histedit treeonly commits
|
2019-10-28 18:29:28 +03:00
|
|
|
$ hg up -q bb62fe710976
|
2020-01-22 07:45:48 +03:00
|
|
|
$ hg purge
|
2017-08-29 23:02:22 +03:00
|
|
|
$ echo y > y
|
|
|
|
$ hg commit -Aqm 'add y'
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg histedit bb62fe710976 --config extensions.histedit= --commands - <<EOF
|
2019-10-28 18:29:28 +03:00
|
|
|
> pick 3d62f4200ab6 add y
|
|
|
|
> pick bb62fe710976 hybrid flat+tree commit
|
2017-08-29 23:02:22 +03:00
|
|
|
> EOF
|
|
|
|
$ hg log -l 2 -G -T '{desc}'
|
|
|
|
@ hybrid flat+tree commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2017-08-29 23:02:22 +03:00
|
|
|
o add y
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2017-08-29 23:02:22 +03:00
|
|
|
~
|
|
|
|
|
2017-11-07 20:06:24 +03:00
|
|
|
Test {manifest} template
|
|
|
|
$ hg log -r . -T '{manifest}'
|
2019-10-28 18:29:28 +03:00
|
|
|
5f15f80c2b54c16d75780bd0344a0487d4e6ff3b (no-eol)
|
2017-11-07 20:06:24 +03:00
|
|
|
|
2017-11-07 20:06:24 +03:00
|
|
|
Test turning treeonly off and making sure we can still commit on top of treeonly
|
|
|
|
commits
|
|
|
|
$ echo >> subdir/x
|
|
|
|
$ hg debugindex -m --config treemanifest.treeonly=False | tail -1
|
2019-10-29 05:18:47 +03:00
|
|
|
hg debugindex: invalid arguments
|
|
|
|
(use 'hg debugindex -h' to get help)
|
2019-10-28 18:29:28 +03:00
|
|
|
$ hg commit -m 'treeonly from hybrid repo'
|
2017-11-07 20:06:24 +03:00
|
|
|
$ hg log -r . -T '{desc}\n' --stat
|
|
|
|
treeonly from hybrid repo
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2019-10-28 18:29:28 +03:00
|
|
|
$ hg log -r . -T '{desc}\n' --stat
|
2017-11-07 20:06:24 +03:00
|
|
|
treeonly from hybrid repo
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
$ hg debugindex -m --config treemanifest.treeonly=False | tail -1
|
2019-10-29 05:18:47 +03:00
|
|
|
hg debugindex: invalid arguments
|
|
|
|
(use 'hg debugindex -h' to get help)
|
2019-02-25 14:50:46 +03:00
|
|
|
$ hg debugstrip -r .
|
2017-11-07 20:06:24 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
Test peer-to-peer push/pull of tree only commits
|
|
|
|
$ cd ..
|
|
|
|
$ clearcache
|
2019-10-28 18:29:28 +03:00
|
|
|
$ hgcloneshallow ssh://user@dummy/master client2 -q
|
|
|
|
fetching tree '' 7e265a5dc5229c2b237874c6bd19f6ef4120f949, found via 098a163f13ea
|
2017-08-31 21:14:39 +03:00
|
|
|
2 trees fetched over * (glob)
|
2020-01-09 18:44:55 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2017-08-29 23:02:22 +03:00
|
|
|
$ cd client2
|
2017-08-31 21:14:39 +03:00
|
|
|
$ rm -rf $CACHEDIR
|
2017-08-29 23:02:22 +03:00
|
|
|
$ cp ../client/.hg/hgrc .hg/hgrc
|
|
|
|
|
|
|
|
# Test pulling from a treeonly peer
|
2018-06-30 01:37:05 +03:00
|
|
|
# - We should see one tree recieve from the client, and then a second one when
|
|
|
|
# prefetching the draft commit parent.
|
|
|
|
$ hg pull -r tip ssh://user@dummy/client --debug 2>&1 | egrep "(payload|treegroup|running)"
|
2020-08-17 12:40:58 +03:00
|
|
|
running * 'user@dummy' 'hg -R client serve --stdio' (glob)
|
|
|
|
running * 'user@dummy' 'hg -R master serve --stdio' (glob)
|
2020-04-15 20:21:45 +03:00
|
|
|
bundle2-input-part: total payload size 831
|
2017-08-29 23:02:22 +03:00
|
|
|
bundle2-input-part: "b2x:treegroup2" (params: 3 mandatory) supported
|
2017-08-31 21:14:39 +03:00
|
|
|
bundle2-input-part: total payload size 663
|
2017-08-29 23:02:22 +03:00
|
|
|
$ hg up tip
|
2017-08-31 21:14:39 +03:00
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg log -G -l 3 -T '{desc}\n' --stat
|
|
|
|
@ hybrid flat+tree commit
|
2020-07-02 23:11:57 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2020-10-20 03:05:23 +03:00
|
|
|
│ subdir/x | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
|
|
|
o add y
|
|
|
|
│ y | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2020-09-24 19:44:20 +03:00
|
|
|
fetching tree '' 5fbe397e5ac6cb7ee263c5c67613c4665306d143, found via d618f764f9a1
|
2017-08-29 23:02:22 +03:00
|
|
|
2 trees fetched over * (glob)
|
2017-08-31 21:14:39 +03:00
|
|
|
o modify subdir/x
|
2020-10-20 03:05:23 +03:00
|
|
|
│ subdir/x | 1 +
|
2017-08-31 21:14:39 +03:00
|
|
|
~ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
|
|
|
|
# Test pushing to a treeonly peer
|
|
|
|
$ echo y >> y
|
|
|
|
$ hg commit -qm "modify y"
|
|
|
|
$ hg push -f -r . ssh://user@dummy/client --debug 2>&1 | grep treegroup
|
|
|
|
bundle2-output-part: "b2x:treegroup2" (params: 3 mandatory) streamed payload
|
|
|
|
$ cd ../client
|
|
|
|
$ hg log -r tip -T '{desc}\n' --stat
|
|
|
|
modify y
|
|
|
|
y | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2017-08-29 23:02:22 +03:00
|
|
|
Test bundling
|
|
|
|
$ hg bundle -r 'tip~3::tip' ../mybundle.hg
|
|
|
|
searching for changes
|
|
|
|
3 changesets found
|
|
|
|
$ cd ..
|
|
|
|
$ hgcloneshallow ssh://user@dummy/master client3 -q
|
|
|
|
$ cd client3
|
|
|
|
$ cp ../client/.hg/hgrc .hg/hgrc
|
|
|
|
$ hg unbundle ../mybundle.hg
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2017-08-31 21:14:39 +03:00
|
|
|
added 3 changesets with 3 changes to 2 files
|
2017-08-29 23:02:22 +03:00
|
|
|
$ hg log -r 'tip^::tip' -G -T "{desc}\n" --stat
|
|
|
|
o modify y
|
2020-10-20 03:05:23 +03:00
|
|
|
│ y | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2017-08-29 23:02:22 +03:00
|
|
|
o hybrid flat+tree commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│ subdir/x | 1 +
|
2017-08-29 23:02:22 +03:00
|
|
|
~ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2017-08-31 21:14:39 +03:00
|
|
|
Test pushing to a hybrid server w/ pushrebase w/ hooks
|
|
|
|
$ cat >> $TESTTMP/filehook.sh <<EOF
|
2019-10-04 20:47:53 +03:00
|
|
|
> #!/bin/bash
|
2020-01-15 08:00:48 +03:00
|
|
|
> set -e
|
2017-08-31 21:14:39 +03:00
|
|
|
> [[ \$(hg log -r \$HG_NODE -T '{file_adds}') == 'y' ]] && exit 1
|
|
|
|
> echo \$(hg log -r \$HG_NODE -T '{file_adds}')
|
|
|
|
> exit 2
|
|
|
|
> EOF
|
|
|
|
$ chmod a+x $TESTTMP/filehook.sh
|
|
|
|
$ cat >> ../master/.hg/hgrc <<EOF
|
|
|
|
> [hooks]
|
|
|
|
> prepushrebase.fail=$TESTTMP/filehook.sh
|
|
|
|
> EOF
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg push -r 'max(desc(add))' --to master
|
2017-08-31 21:14:39 +03:00
|
|
|
pushing to ssh://user@dummy/master
|
|
|
|
searching for changes
|
|
|
|
remote: prepushrebase.fail hook exited with status 1
|
|
|
|
abort: push failed on remote
|
|
|
|
[255]
|
|
|
|
|
|
|
|
Test pushing to a hybrid server w/ pushrebase w/o hooks
|
2018-07-27 20:20:38 +03:00
|
|
|
$ cd ../master
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
2017-08-31 21:14:39 +03:00
|
|
|
> [hooks]
|
|
|
|
> prepushrebase.fail=true
|
|
|
|
> EOF
|
2018-07-27 20:20:38 +03:00
|
|
|
- Add an extra head to the master repo so we trigger the slowpath
|
|
|
|
- shallowbundle.generatemanifests() codepath, so we can verify it doesnt try to
|
|
|
|
- process all the manifests either.
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg up -q 'desc(add)'
|
2018-07-27 20:20:38 +03:00
|
|
|
$ echo >> extrahead
|
|
|
|
$ hg commit -Aqm 'extra head commit'
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg up -q 'desc(modify)'
|
2018-07-27 20:20:38 +03:00
|
|
|
$ cd ../client3
|
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg push -r 'max(desc(add))' --to master --debug 2>&1 | egrep '(remote:|add|converting)'
|
2018-07-24 04:40:17 +03:00
|
|
|
remote: * (glob)
|
|
|
|
remote: * (glob)
|
|
|
|
remote: 1
|
2017-08-31 21:14:39 +03:00
|
|
|
remote: pushing 1 changeset:
|
2019-10-28 18:29:28 +03:00
|
|
|
remote: 41bd8aa2aeb7 add y
|
2017-08-31 21:14:39 +03:00
|
|
|
|
|
|
|
$ cd ../master
|
2018-07-27 20:20:38 +03:00
|
|
|
- Delete the temporary commit we made earlier
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg debugstrip -qr 'max(desc(add))'
|
2018-07-27 20:20:38 +03:00
|
|
|
|
2017-08-31 21:14:39 +03:00
|
|
|
- Verify the received tree was written down as a flat
|
|
|
|
$ hg debugindex -m
|
|
|
|
rev offset length delta linkrev nodeid p1 p2
|
2019-10-28 18:29:28 +03:00
|
|
|
0 0 50 -1 0 5fbe397e5ac6 000000000000 000000000000
|
|
|
|
1 50 50 -1 1 7e265a5dc522 5fbe397e5ac6 000000000000
|
2020-07-15 00:31:20 +03:00
|
|
|
2 100 63 0 2 9bd1ef658bef 5fbe397e5ac6 000000000000
|
2020-07-21 03:23:52 +03:00
|
|
|
3 163 55 1 3 14bce01d0d73 7e265a5dc522 000000000000
|
2017-08-31 21:14:39 +03:00
|
|
|
$ hg debugindex .hg/store/00manifesttree.i
|
|
|
|
rev offset length delta linkrev nodeid p1 p2
|
2019-10-28 18:29:28 +03:00
|
|
|
0 0 50 -1 0 5fbe397e5ac6 000000000000 000000000000
|
|
|
|
1 50 50 -1 1 7e265a5dc522 5fbe397e5ac6 000000000000
|
2020-07-15 00:31:20 +03:00
|
|
|
2 100 63 0 2 9bd1ef658bef 5fbe397e5ac6 000000000000
|
2020-07-21 03:23:52 +03:00
|
|
|
3 163 55 1 3 14bce01d0d73 7e265a5dc522 000000000000
|
2017-08-31 21:14:39 +03:00
|
|
|
- Verify the manifest data is accessible
|
|
|
|
$ hg log -r tip --stat
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: dad1be784127
|
2017-08-31 21:14:39 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
2019-10-28 18:29:28 +03:00
|
|
|
summary: extra head commit
|
2017-08-31 21:14:39 +03:00
|
|
|
|
2019-10-28 18:29:28 +03:00
|
|
|
extrahead | 1 +
|
2017-08-31 21:14:39 +03:00
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2018-02-15 22:17:59 +03:00
|
|
|
|
|
|
|
Test prefetch
|
2017-11-21 23:31:27 +03:00
|
|
|
$ cd ../client
|
2018-02-15 22:17:59 +03:00
|
|
|
$ clearcache
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg prefetch -r d618f764f9a11819b57268f02604ec1d311afc4c
|
2020-01-09 18:44:55 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2020-07-02 23:11:57 +03:00
|
|
|
fetching tree '' 5fbe397e5ac6cb7ee263c5c67613c4665306d143, found via 06f5aa20a0d4
|
|
|
|
2 trees fetched over * (glob)
|
2018-02-15 22:17:59 +03:00
|
|
|
$ clearcache
|
|
|
|
|
2017-11-21 23:31:27 +03:00
|
|
|
$ hg pull
|
|
|
|
pulling from ssh://user@dummy/master
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2019-11-07 21:50:10 +03:00
|
|
|
added 1 changesets with 0 changes to 0 files
|
2018-02-08 04:17:28 +03:00
|
|
|
$ cd ..
|
|
|
|
|
2018-03-12 21:10:30 +03:00
|
|
|
Test converting server to treeonly
|
|
|
|
$ cd master
|
|
|
|
$ cp .hg/hgrc .hg/hgrc.bak
|
|
|
|
- Move the flat manifest away so we guarantee its not read
|
|
|
|
$ hg log -G -T "{desc}\n" --stat
|
2019-10-28 18:29:28 +03:00
|
|
|
o extra head commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│ extrahead | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
|
|
|
│ @ modify subdir/x
|
|
|
|
├─╯ subdir/x | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2018-03-12 21:10:30 +03:00
|
|
|
o add subdir/x
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
$ hg up -q tip
|
|
|
|
$ echo >> subdir/x
|
|
|
|
$ hg commit -m 'modify subdir/x again'
|
|
|
|
$ hg log -r tip -T "{desc}\n" --stat
|
|
|
|
modify subdir/x again
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
Test pulling to a treeonly client from a treeonly server
|
|
|
|
$ cd ../client2
|
|
|
|
$ hg pull
|
|
|
|
pulling from ssh://user@dummy/master
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2019-11-07 21:50:10 +03:00
|
|
|
added 2 changesets with 0 changes to 0 files
|
2018-03-12 21:10:30 +03:00
|
|
|
$ hg log -r tip -T '{desc}\n' --stat
|
2019-10-28 18:29:28 +03:00
|
|
|
fetching tree '' 9bd1ef658bef2ded12bd295198d1abbe1cf4115b, found via dad1be784127
|
|
|
|
2 trees fetched over * (glob)
|
2020-07-02 23:11:57 +03:00
|
|
|
2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob) (?)
|
|
|
|
fetching tree '' e249b5cd4abe985a0e7ecd0af4d66d60e560ef4c, found via 7253109af085
|
2018-03-12 21:10:30 +03:00
|
|
|
2 trees fetched over * (glob)
|
|
|
|
modify subdir/x again
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
Test pushing from a treeonly client to a treeonly server
|
|
|
|
$ hg config treemanifest
|
2019-05-10 19:56:31 +03:00
|
|
|
treemanifest.flatcompat=False
|
2018-03-12 21:10:30 +03:00
|
|
|
treemanifest.sendtrees=True
|
2020-06-10 19:26:55 +03:00
|
|
|
treemanifest.treeonly=True
|
|
|
|
treemanifest.rustmanifest=True
|
2020-09-24 19:44:20 +03:00
|
|
|
treemanifest.useruststore=True
|
2018-03-12 21:10:30 +03:00
|
|
|
treemanifest.demanddownload=True
|
|
|
|
$ echo 'pushable' >> subdir/x
|
|
|
|
$ hg commit -Aqm 'pushable treeonly commit'
|
2018-03-17 01:16:33 +03:00
|
|
|
|
|
|
|
Test pushing from a treeonly client to a treeonly server *without* pushrebase
|
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg log -Gf -l 4 -T '{shortest(node)} {manifest|short} {remotenames} {bookmarks}\n'
|
2019-10-28 18:29:28 +03:00
|
|
|
@ 5f0b c760d8ba4646
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-10-28 18:29:28 +03:00
|
|
|
o 06f5 13c9facfa409
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-10-28 18:29:28 +03:00
|
|
|
o 77ec 5f15f80c2b54
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2019-10-28 18:29:28 +03:00
|
|
|
o 41bd 14bce01d0d73
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2018-03-17 01:16:33 +03:00
|
|
|
~
|
|
|
|
$ hg push -r . --config extensions.pushrebase=! -f
|
|
|
|
pushing to ssh://user@dummy/master
|
|
|
|
searching for changes
|
2019-10-28 18:29:28 +03:00
|
|
|
fetching tree 'subdir' a18d21674e76d6aab2edb46810b20fbdbd10fb4b (?)
|
|
|
|
1 trees fetched over * (glob) (?)
|
|
|
|
fetching tree '' 7e265a5dc5229c2b237874c6bd19f6ef4120f949, found via 5f0bc1aaff22
|
|
|
|
2 trees fetched over * (glob)
|
2018-03-17 01:16:33 +03:00
|
|
|
remote: adding changesets
|
|
|
|
remote: adding manifests
|
|
|
|
remote: adding file changes
|
2020-07-21 03:23:52 +03:00
|
|
|
remote: added 4 changesets with 3 changes to 2 files
|
2020-01-09 18:44:55 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2018-03-17 01:16:33 +03:00
|
|
|
$ hg --cwd ../master debugindex .hg/store/00manifesttree.i | tail -4
|
2020-07-21 03:23:52 +03:00
|
|
|
4 218 61 2 3 e249b5cd4abe 9bd1ef658bef 000000000000
|
|
|
|
5 279 61 3 5 5f15f80c2b54 14bce01d0d73 000000000000
|
2020-07-15 00:31:20 +03:00
|
|
|
6 340 93 -1 6 13c9facfa409 5f15f80c2b54 000000000000
|
|
|
|
7 433 61 6 7 c760d8ba4646 13c9facfa409 000000000000
|
2018-03-17 01:16:33 +03:00
|
|
|
$ hg --cwd ../master debugindex .hg/store/meta/subdir/00manifest.i
|
|
|
|
rev offset length delta linkrev nodeid p1 p2
|
|
|
|
0 0 44 -1 0 bc0c2c938b92 000000000000 000000000000
|
|
|
|
1 44 44 -1 1 a18d21674e76 bc0c2c938b92 000000000000
|
2019-10-28 18:29:28 +03:00
|
|
|
2 88 44 -1 3 986e3ffada22 bc0c2c938b92 000000000000
|
2018-03-17 01:16:33 +03:00
|
|
|
3 132 44 -1 5 f4c373af9a41 a18d21674e76 000000000000
|
|
|
|
4 176 44 -1 7 d20854ad7783 f4c373af9a41 000000000000
|
|
|
|
$ hg -R ../master log -r tip --stat
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: 5f0bc1aaff22
|
2018-03-17 01:16:33 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: pushable treeonly commit
|
|
|
|
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2019-02-25 14:50:46 +03:00
|
|
|
$ hg -R ../master debugstrip -q -r tip~3
|
2018-03-17 01:16:33 +03:00
|
|
|
|
2018-03-17 01:16:37 +03:00
|
|
|
Test pushing from a public treeonly client to a treeonly server *with* pushrebase
|
|
|
|
(it should send tree data, versus p2p pushes which wouldnt)
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg log -T '{desc} {remotenames} {bookmarks}\n' -G
|
|
|
|
@ pushable treeonly commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o modify subdir/x again
|
|
|
|
│ │
|
|
|
|
│ o extra head commit
|
|
|
|
│ │
|
|
|
|
o │ modify y
|
|
|
|
│ │
|
|
|
|
o │ hybrid flat+tree commit
|
|
|
|
│ │
|
|
|
|
o │ add y
|
|
|
|
│ │
|
|
|
|
o │ modify subdir/x
|
|
|
|
├─╯
|
2020-07-02 23:11:57 +03:00
|
|
|
o add subdir/x
|
|
|
|
|
|
|
|
$ hg debugmakepublic -r .~2
|
2018-03-17 01:16:37 +03:00
|
|
|
$ hg push -r . --config extensions.pushrebase=! -f
|
|
|
|
pushing to ssh://user@dummy/master
|
|
|
|
searching for changes
|
2020-07-02 23:11:57 +03:00
|
|
|
fetching tree '' 5fbe397e5ac6cb7ee263c5c67613c4665306d143, based on 5f15f80c2b54c16d75780bd0344a0487d4e6ff3b, found via 5f0bc1aaff22
|
|
|
|
2 trees fetched over 0.00s
|
2018-03-17 01:16:37 +03:00
|
|
|
remote: adding changesets
|
|
|
|
remote: adding manifests
|
|
|
|
remote: adding file changes
|
2020-07-21 03:23:52 +03:00
|
|
|
remote: added 4 changesets with 0 changes to 2 files
|
2018-03-17 01:16:37 +03:00
|
|
|
$ hg -R ../master log -r tip --stat
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: 5f0bc1aaff22
|
2018-03-17 01:16:37 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: pushable treeonly commit
|
|
|
|
|
|
|
|
subdir/x | 1 +
|
|
|
|
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg debugmakepublic -d -r 'desc(pushable)~2'
|
2019-02-25 14:50:46 +03:00
|
|
|
$ hg -R ../master debugstrip -r tip~3
|
2018-03-17 01:16:37 +03:00
|
|
|
|
2018-03-17 01:16:33 +03:00
|
|
|
Test pushing from a treeonly client to a treeonly server *with* pushrebase
|
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg log -T '{desc} {remotenames} {bookmarks}\n' -G
|
|
|
|
@ pushable treeonly commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ o modify subdir/x again
|
|
|
|
│ │
|
|
|
|
│ o extra head commit
|
|
|
|
│ │
|
|
|
|
o │ modify y
|
|
|
|
│ │
|
|
|
|
o │ hybrid flat+tree commit
|
|
|
|
│ │
|
|
|
|
o │ add y
|
|
|
|
│ │
|
|
|
|
o │ modify subdir/x
|
|
|
|
├─╯
|
2020-07-02 23:11:57 +03:00
|
|
|
o add subdir/x
|
|
|
|
|
2018-03-12 21:10:30 +03:00
|
|
|
$ hg push --to master
|
|
|
|
pushing to ssh://user@dummy/master
|
|
|
|
searching for changes
|
2020-07-02 23:11:57 +03:00
|
|
|
remote: pushing 5 changesets:
|
|
|
|
remote: 098a163f13ea modify subdir/x
|
2019-10-28 18:29:28 +03:00
|
|
|
remote: 41bd8aa2aeb7 add y
|
|
|
|
remote: 77ec7ac93315 hybrid flat+tree commit
|
|
|
|
remote: 06f5aa20a0d4 modify y
|
|
|
|
remote: 5f0bc1aaff22 pushable treeonly commit
|
2018-03-12 21:10:30 +03:00
|
|
|
$ hg -R ../master log -l 4 -T '{desc}\n' -G --stat
|
|
|
|
o pushable treeonly commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│ subdir/x | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2018-03-12 21:10:30 +03:00
|
|
|
o modify y
|
2020-10-20 03:05:23 +03:00
|
|
|
│ y | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2018-03-12 21:10:30 +03:00
|
|
|
o hybrid flat+tree commit
|
2020-10-20 03:05:23 +03:00
|
|
|
│ subdir/x | 1 +
|
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2018-03-12 21:10:30 +03:00
|
|
|
o add y
|
2020-10-20 03:05:23 +03:00
|
|
|
│ y | 1 +
|
2018-03-12 21:10:30 +03:00
|
|
|
~ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
|
2018-11-07 15:30:49 +03:00
|
|
|
Strip the pushed commits + the recently made commit from the server
|
2019-02-25 14:50:46 +03:00
|
|
|
$ hg -R ../master debugstrip -r '.:'
|
2019-10-28 18:29:28 +03:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2018-11-07 15:30:49 +03:00
|
|
|
|
2018-03-22 08:33:29 +03:00
|
|
|
Test histedit with changing commits in the middle
|
|
|
|
$ cat >> $TESTTMP/commands <<EOF
|
2019-10-28 18:29:28 +03:00
|
|
|
> pick 06f5aa20a0d4 4
|
2018-03-22 08:33:29 +03:00
|
|
|
> x echo >> y && hg amend
|
2019-10-28 18:29:28 +03:00
|
|
|
> pick 5f0bc1aaff22 7
|
2018-03-22 08:33:29 +03:00
|
|
|
> EOF
|
|
|
|
$ hg histedit '.^' --commands $TESTTMP/commands --config extensions.histedit= --config extensions.fbhistedit=
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
2018-03-12 21:10:30 +03:00
|
|
|
Reset the server back to hybrid mode
|
|
|
|
$ cd ../master
|
|
|
|
$ mv .hg/hgrc.bak .hg/hgrc
|
2018-06-28 04:01:30 +03:00
|
|
|
$ cd ..
|
2018-03-12 21:10:30 +03:00
|
|
|
|
2018-02-08 04:17:28 +03:00
|
|
|
Test creating a treeonly repo from scratch
|
|
|
|
$ hg init treeonlyrepo
|
|
|
|
$ cd treeonlyrepo
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [treemanifest]
|
|
|
|
> sendtrees=True
|
|
|
|
>
|
|
|
|
> [remotefilelog]
|
|
|
|
> reponame=treeonlyrepo
|
|
|
|
> EOF
|
|
|
|
$ echo foo > a
|
|
|
|
$ hg commit -Aqm 'add a'
|
|
|
|
$ hg log -r . -p
|
2020-07-21 03:23:52 +03:00
|
|
|
commit: f87d03aef498
|
2018-02-08 04:17:28 +03:00
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: add a
|
|
|
|
|
|
|
|
diff -r 000000000000 -r f87d03aef498 a
|
|
|
|
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
+++ b/a Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
@@ -0,0 +1,1 @@
|
|
|
|
+foo
|
|
|
|
|
2018-02-22 05:36:44 +03:00
|
|
|
Test pulling new commits from a local repository (not over ssh),
|
|
|
|
with pullprefetchrevs configured.
|
|
|
|
$ cd ..
|
|
|
|
$ hg init treeonlyrepo2
|
|
|
|
$ cd treeonlyrepo2
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [paths]
|
|
|
|
> default=$TESTTMP/master
|
|
|
|
>
|
|
|
|
> [treemanifest]
|
|
|
|
> sendtrees=True
|
|
|
|
> pullprefetchrevs=tip
|
|
|
|
>
|
|
|
|
> [remotefilelog]
|
|
|
|
> reponame=treeonlyrepo2
|
|
|
|
> EOF
|
|
|
|
$ hg pull
|
|
|
|
pulling from $TESTTMP/master
|
|
|
|
requesting all changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
2019-11-07 21:50:10 +03:00
|
|
|
added 3 changesets with 3 changes to 2 files
|
2019-10-28 18:29:28 +03:00
|
|
|
prefetching tree for dad1be784127
|
2020-09-24 19:44:20 +03:00
|
|
|
fetching tree '' 9bd1ef658bef2ded12bd295198d1abbe1cf4115b, found via dad1be784127
|
2018-02-22 05:36:44 +03:00
|
|
|
2 trees fetched over * (glob)
|
2018-06-28 04:01:30 +03:00
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
Test ondemand downloading trees with a limited depth
|
2019-10-28 18:29:28 +03:00
|
|
|
$ hgcloneshallow ssh://user@dummy/master client4 -q
|
2020-01-09 18:44:55 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2018-06-28 04:01:30 +03:00
|
|
|
$ cd client4
|
|
|
|
$ cp ../client/.hg/hgrc .hg/hgrc
|
|
|
|
|
|
|
|
$ clearcache
|
|
|
|
$ hg status --change 'tip^'
|
2020-09-24 19:44:20 +03:00
|
|
|
fetching tree '' 5fbe397e5ac6cb7ee263c5c67613c4665306d143, found via d618f764f9a1
|
2018-06-28 04:01:30 +03:00
|
|
|
2 trees fetched over * (glob)
|
2019-10-28 18:29:28 +03:00
|
|
|
A subdir/x
|
2018-06-28 04:01:30 +03:00
|
|
|
|
|
|
|
$ clearcache
|
|
|
|
$ hg status --change 'tip^' --config treemanifest.fetchdepth=1
|
2020-09-24 19:44:20 +03:00
|
|
|
fetching tree '' 5fbe397e5ac6cb7ee263c5c67613c4665306d143, found via d618f764f9a1
|
2018-06-28 04:01:30 +03:00
|
|
|
1 trees fetched over * (glob)
|
|
|
|
fetching tree 'subdir' bc0c2c938b929f98b1c31a8c5994396ebb096bf0
|
|
|
|
1 trees fetched over * (glob)
|
2019-10-28 18:29:28 +03:00
|
|
|
A subdir/x
|
2020-06-10 03:29:15 +03:00
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
Make a second repo with some flat manifests and some treeonly manifests, then
|
|
|
|
push it to the treeonly and verify it can be pushed. This simulates merging an
|
|
|
|
old repository into another repo.
|
|
|
|
|
|
|
|
$ hginit secondmaster
|
|
|
|
$ cd secondmaster
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [extensions]
|
|
|
|
> pushrebase=
|
|
|
|
> remotenames=
|
|
|
|
> treemanifest=
|
|
|
|
> [remotefilelog]
|
|
|
|
> server=True
|
|
|
|
> shallowtrees=True
|
|
|
|
> [treemanifest]
|
|
|
|
> treeonly=False
|
|
|
|
> sendtrees=False
|
|
|
|
> server=True
|
|
|
|
> EOF
|
|
|
|
$ mkdir second_dir
|
|
|
|
$ echo s >> second_dir/s
|
|
|
|
$ hg commit -qAm 'flat manifest commit'
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [treemanifest]
|
|
|
|
> treeonly=True
|
|
|
|
> sendtrees=True
|
|
|
|
> EOF
|
|
|
|
$ echo s >> second_dir/s
|
|
|
|
$ hg commit -qAm 'treeonly manifest commit'
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
$ hgcloneshallow ssh://user@dummy/secondmaster secondclient -q
|
|
|
|
fetching tree '' dcf227dd21f37ac6b3848ab69ee0d0910dbb4071, found via 0a0cac7a2bb2
|
|
|
|
2 trees fetched over * (glob)
|
2020-06-24 04:45:45 +03:00
|
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
2020-06-10 03:29:15 +03:00
|
|
|
$ cd secondclient
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [extensions]
|
|
|
|
> pushrebase=
|
|
|
|
> remotenames=
|
|
|
|
> treemanifest=
|
|
|
|
> EOF
|
|
|
|
|
2020-07-02 23:11:57 +03:00
|
|
|
$ hg push --config extensions.pushrebase=! ssh://user@dummy/master -f --to main --create
|
|
|
|
pushing rev 0a0cac7a2bb2 to destination ssh://user@dummy/master bookmark main
|
2020-06-10 03:29:15 +03:00
|
|
|
searching for changes
|
|
|
|
warning: repository is unrelated
|
2020-09-24 19:44:20 +03:00
|
|
|
fetching tree '' 99dd81527cb1abd011deb06b629366bfc7c76e3a, found via 03e23940cb22
|
2020-06-10 03:29:15 +03:00
|
|
|
2 trees fetched over * (glob)
|
2020-07-02 23:11:57 +03:00
|
|
|
exporting bookmark main
|
2020-06-10 03:29:15 +03:00
|
|
|
remote: adding changesets
|
|
|
|
remote: adding manifests
|
|
|
|
remote: adding file changes
|
|
|
|
remote: added 2 changesets with 2 changes to 1 files
|
|
|
|
|
|
|
|
$ hg log -G -T '{node}'
|
|
|
|
@ 0a0cac7a2bb2ff6613da8280f7f356863cee022b
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2020-06-10 03:29:15 +03:00
|
|
|
o 03e23940cb22c80ad0d5abf1d4dc8f31dec3b945
|
|
|
|
|
|
|
|
$ hg -R ../master log -G -T '{node}'
|
|
|
|
o 0a0cac7a2bb2ff6613da8280f7f356863cee022b
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
2020-06-10 03:29:15 +03:00
|
|
|
o 03e23940cb22c80ad0d5abf1d4dc8f31dec3b945
|
|
|
|
|
|
|
|
o dad1be7841274c8bc9fe4772c99e52833240f715
|
2020-10-20 03:05:23 +03:00
|
|
|
│
|
|
|
|
│ @ 098a163f13ea73eb83a2bd8b426560575e1e91eb
|
|
|
|
├─╯
|
2020-06-10 03:29:15 +03:00
|
|
|
o d618f764f9a11819b57268f02604ec1d311afc4c
|
|
|
|
|
2021-06-19 03:38:08 +03:00
|
|
|
|
|
|
|
# trailing whitespace
|