2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2018-10-03 18:46:12 +03:00
|
|
|
Push treeonly commits from a treeonly shallow repo to a treeonly server
|
|
|
|
|
2020-02-28 04:51:13 +03:00
|
|
|
$ setconfig remotefilelog.reponame=x remotefilelog.cachepath=$TESTTMP/cache
|
2019-05-10 19:56:31 +03:00
|
|
|
$ setconfig treemanifest.flatcompat=False
|
2021-02-11 20:33:15 +03:00
|
|
|
$ setconfig remotefilelog.write-hgcache-to-indexedlog=False remotefilelog.write-local-to-indexedlog=False
|
2020-02-28 04:51:13 +03:00
|
|
|
$ configure dummyssh
|
2018-10-03 18:46:12 +03:00
|
|
|
|
|
|
|
$ newrepo server
|
|
|
|
$ setconfig treemanifest.server=True
|
|
|
|
$ enable pushrebase treemanifest
|
|
|
|
|
|
|
|
$ newrepo client
|
|
|
|
$ setconfig paths.default=ssh://user@dummy/server
|
|
|
|
$ echo remotefilelog >> .hg/requires
|
|
|
|
$ enable treemanifest remotefilelog pushrebase remotenames
|
|
|
|
$ setconfig treemanifest.sendtrees=True treemanifest.treeonly=True
|
|
|
|
$ drawdag <<'EOS'
|
|
|
|
> B
|
|
|
|
> |
|
|
|
|
> A
|
|
|
|
> EOS
|
|
|
|
|
|
|
|
$ hg push --to foo -r $B --create
|
|
|
|
pushing rev 112478962961 to destination ssh://user@dummy/server bookmark foo
|
|
|
|
searching for changes
|
2020-02-28 04:51:13 +03:00
|
|
|
exporting bookmark foo
|
2018-10-03 18:46:12 +03:00
|
|
|
remote: pushing 2 changesets:
|
|
|
|
remote: 426bada5c675 A
|
|
|
|
remote: 112478962961 B
|
|
|
|
|
|
|
|
Make server treeonly and push trees to it
|
|
|
|
$ switchrepo server
|
|
|
|
$ setconfig treemanifest.treeonly=True
|
|
|
|
|
|
|
|
$ switchrepo client
|
|
|
|
$ hg up $A
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ mkdir sub
|
|
|
|
$ echo >> sub/C
|
|
|
|
$ hg commit -Aqm "C"
|
|
|
|
$ echo >> sub/C
|
|
|
|
$ hg commit -qm "D"
|
2018-10-03 18:46:14 +03:00
|
|
|
$ hg push --to foo
|
|
|
|
pushing rev 0560779f58ae to destination ssh://user@dummy/server bookmark foo
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 2 changesets with 2 changes to 1 files
|
|
|
|
updating bookmark foo
|
2020-02-28 04:51:13 +03:00
|
|
|
remote: pushing 2 changesets:
|
|
|
|
remote: e297a1e684b7 C
|
|
|
|
remote: 0560779f58ae D
|
|
|
|
remote: 2 new changesets from the server will be downloaded
|
2018-10-27 04:52:14 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2018-10-03 18:46:12 +03:00
|
|
|
|
|
|
|
$ tglog --stat -l 2
|
2020-10-09 06:30:01 +03:00
|
|
|
@ d9ee86e3acc1 'D' sub/C | 1 +
|
2020-10-20 03:05:23 +03:00
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
|
|
|
│
|
2020-10-09 06:30:01 +03:00
|
|
|
o 4197fbd39b1b 'C' sub/C | 1 +
|
2020-10-20 03:05:23 +03:00
|
|
|
│ 1 files changed, 1 insertions(+), 0 deletions(-)
|
2018-10-03 18:46:12 +03:00
|
|
|
~
|