2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2020-01-20 13:42:49 +03:00
|
|
|
TODO: configure mutation
|
|
|
|
$ configure noevolution
|
2016-10-28 01:25:32 +03:00
|
|
|
$ . "$TESTDIR/library.sh"
|
|
|
|
|
|
|
|
|
|
|
|
$ hginit master
|
|
|
|
$ cd master
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [remotefilelog]
|
|
|
|
> server=True
|
2019-10-28 18:42:32 +03:00
|
|
|
> [treemanifest]
|
|
|
|
> server=True
|
2016-10-28 01:25:32 +03:00
|
|
|
> EOF
|
|
|
|
$ echo x > x
|
|
|
|
$ hg commit -qAm 'add x'
|
|
|
|
$ cd ..
|
|
|
|
|
2019-10-28 18:42:32 +03:00
|
|
|
$ hgcloneshallow ssh://user@dummy/master client -q --noupdate
|
2016-10-28 01:25:32 +03:00
|
|
|
$ cd client
|
|
|
|
|
|
|
|
Test autocreatetrees
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [treemanifest]
|
|
|
|
> autocreatetrees=True
|
|
|
|
> EOF
|
|
|
|
$ cd ../master
|
|
|
|
$ mkdir subdir
|
|
|
|
$ echo z >> subdir/z
|
|
|
|
$ hg commit -qAm 'add subdir/z'
|
|
|
|
|
|
|
|
$ cd ../client
|
|
|
|
$ hg pull
|
|
|
|
pulling from ssh://user@dummy/master
|
|
|
|
searching for changes
|
|
|
|
adding changesets
|
|
|
|
adding manifests
|
|
|
|
adding file changes
|
|
|
|
added 1 changesets with 0 changes to 0 files
|
2019-10-28 18:42:32 +03:00
|
|
|
$ hg up -r tip
|
|
|
|
fetching tree '' 70f2c6726cec346b70b4f2ea65d0e2b9e1092a66, found via e4d61696a942
|
|
|
|
2 trees fetched over * (glob)
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2020-01-09 18:44:55 +03:00
|
|
|
2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob) (?)
|
2017-05-03 20:19:45 +03:00
|
|
|
$ ls_l $CACHEDIR/master/packs/manifests
|
2019-10-28 18:42:32 +03:00
|
|
|
-r--r--r-- 1114 cc7c46997bf8e05307412ce3ac5e2a1ccb159a11.dataidx
|
|
|
|
-r--r--r-- 262 cc7c46997bf8e05307412ce3ac5e2a1ccb159a11.datapack
|
|
|
|
-r--r--r-- 1196 f102ab2df8567126527b595bd4f2b2125cf98975.histidx
|
|
|
|
-r--r--r-- 183 f102ab2df8567126527b595bd4f2b2125cf98975.histpack
|
2016-10-28 01:25:32 +03:00
|
|
|
|
2018-12-16 03:23:20 +03:00
|
|
|
$ hg debugdatapack $CACHEDIR/master/packs/manifests/*.dataidx
|
2019-10-28 18:42:32 +03:00
|
|
|
$TESTTMP/hgcache/master/packs/manifests/cc7c46997bf8e05307412ce3ac5e2a1ccb159a11:
|
2017-11-06 08:45:40 +03:00
|
|
|
subdir:
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
|
|
|
ddb35f099a64 000000000000 43 (missing)
|
2016-10-28 01:25:32 +03:00
|
|
|
|
2017-11-06 08:45:40 +03:00
|
|
|
(empty name):
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-09-04 01:06:43 +03:00
|
|
|
70f2c6726cec 000000000000 92 (missing)
|
2017-11-07 06:09:15 +03:00
|
|
|
|
2016-10-28 01:25:34 +03:00
|
|
|
|
|
|
|
Test that commit creates local trees
|
|
|
|
$ hg up -q tip
|
|
|
|
$ echo z >> subdir/z
|
|
|
|
$ hg commit -qAm 'modify subdir/z'
|
2017-05-03 20:19:45 +03:00
|
|
|
$ ls_l .hg/store/packs/manifests
|
2018-12-16 03:23:20 +03:00
|
|
|
-r--r--r-- 1114 4c1ed7b5ede2ef728698d7c27d195f42c74cd238.dataidx
|
|
|
|
-r--r--r-- 262 4c1ed7b5ede2ef728698d7c27d195f42c74cd238.datapack
|
2018-03-15 23:40:17 +03:00
|
|
|
-r--r--r-- 1196 7c930adf1e81d971be4609f898b1c6948cd50023.histidx
|
|
|
|
-r--r--r-- 183 7c930adf1e81d971be4609f898b1c6948cd50023.histpack
|
|
|
|
$ hg debughistorypack .hg/store/packs/manifests/7c930adf1e81d971be4609f898b1c6948cd50023.histpack
|
|
|
|
|
|
|
|
|
|
|
|
Node P1 Node P2 Node Link Node Copy From
|
|
|
|
7a911436836f 70f2c6726cec 000000000000 7dd80139a0c9
|
|
|
|
|
|
|
|
subdir
|
|
|
|
Node P1 Node P2 Node Link Node Copy From
|
|
|
|
ac728a786423 ddb35f099a64 000000000000 7dd80139a0c9
|
2018-12-16 03:23:20 +03:00
|
|
|
$ hg debugdatapack .hg/store/packs/manifests/*.dataidx
|
|
|
|
.hg/store/packs/manifests/4c1ed7b5ede2ef728698d7c27d195f42c74cd238:
|
2017-11-06 08:45:40 +03:00
|
|
|
subdir:
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
|
|
|
ac728a786423 000000000000 43 (missing)
|
2016-10-28 01:25:34 +03:00
|
|
|
|
2017-11-06 08:45:40 +03:00
|
|
|
(empty name):
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
|
|
|
7a911436836f 000000000000 92 (missing)
|
2017-11-07 06:09:15 +03:00
|
|
|
|
2016-12-03 01:37:28 +03:00
|
|
|
|
|
|
|
Test that manifest matchers work
|
|
|
|
$ hg status --rev 1 --rev 2 -I subdir/a
|
|
|
|
$ hg status --rev 1 --rev 2 -I subdir/z
|
|
|
|
M subdir/z
|
2017-01-14 01:58:20 +03:00
|
|
|
|
2017-06-22 02:59:44 +03:00
|
|
|
Test rebasing a stack of commits results in a pack with all the trees
|
|
|
|
|
|
|
|
$ echo >> subdir/y
|
|
|
|
$ hg commit -qAm 'modify subdir/y'
|
|
|
|
$ echo >> subdir/y
|
|
|
|
$ hg commit -Am 'modify subdir/y again'
|
|
|
|
$ hg rebase -d 0 -s '.^'
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 6a2476258ba5 "modify subdir/y"
|
2019-10-28 18:42:32 +03:00
|
|
|
fetching tree '' bc0c2c938b929f98b1c31a8c5994396ebb096bf0, based on 70f2c6726cec346b70b4f2ea65d0e2b9e1092a66
|
|
|
|
1 trees fetched over * (glob)
|
2019-12-18 00:45:17 +03:00
|
|
|
rebasing f096b21e165f "modify subdir/y again"
|
2017-07-11 19:44:53 +03:00
|
|
|
saved backup bundle to $TESTTMP/client/.hg/strip-backup/6a2476258ba5-a90056a1-rebase.hg (glob)
|
2017-06-22 02:59:44 +03:00
|
|
|
$ hg log -r '.^::.' -T '{manifest}\n'
|
2017-11-07 20:06:24 +03:00
|
|
|
0d05c20bb7eb53dbfe91f834ed3f0c26ca6ca655
|
|
|
|
8289b85c6a307a5a64ffe3bd80bd7998775c787a
|
2018-12-16 03:23:20 +03:00
|
|
|
$ hg debugdatapack .hg/store/packs/manifests/*.datapack
|
2019-03-22 02:13:16 +03:00
|
|
|
.hg/store/packs/manifests/3f3f675f03d1d5c32ce32a7ca749309fb59f4c9e:
|
2017-11-06 08:45:40 +03:00
|
|
|
subdir:
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
66460700b3a5 000000000000 86 (missing)
|
2017-06-22 02:59:44 +03:00
|
|
|
|
2017-11-06 08:45:40 +03:00
|
|
|
(empty name):
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
ff75b8ba8d79 000000000000 92 (missing)
|
2017-06-22 02:59:44 +03:00
|
|
|
|
2019-03-22 02:13:16 +03:00
|
|
|
.hg/store/packs/manifests/4c1ed7b5ede2ef728698d7c27d195f42c74cd238:
|
2017-11-06 08:45:40 +03:00
|
|
|
subdir:
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
ac728a786423 000000000000 43 (missing)
|
2017-06-22 02:59:44 +03:00
|
|
|
|
2017-11-06 08:45:40 +03:00
|
|
|
(empty name):
|
2017-11-06 05:45:21 +03:00
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
7a911436836f 000000000000 92 (missing)
|
2017-11-07 06:09:15 +03:00
|
|
|
|
2019-03-22 02:13:16 +03:00
|
|
|
.hg/store/packs/manifests/b68f34f2ea3d8cf08d4504d2c8a43775645f1c1a:
|
2018-12-16 03:23:20 +03:00
|
|
|
subdir:
|
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
a4e2f032ee0f 000000000000 43 (missing)
|
2018-12-16 03:23:20 +03:00
|
|
|
|
|
|
|
(empty name):
|
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
0d05c20bb7eb 000000000000 92 (missing)
|
2018-12-16 03:23:20 +03:00
|
|
|
|
2019-03-22 02:13:16 +03:00
|
|
|
.hg/store/packs/manifests/c550c1ee0db73784322bd380c41efc1ee2db5d0e:
|
2018-12-16 03:23:20 +03:00
|
|
|
subdir:
|
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
ad0a48a2ec1e 000000000000 43 (missing)
|
2018-12-16 03:23:20 +03:00
|
|
|
|
|
|
|
(empty name):
|
|
|
|
Node Delta Base Delta Length Blob Size
|
2019-03-22 02:13:16 +03:00
|
|
|
8289b85c6a30 000000000000 92 (missing)
|
2018-12-16 03:23:20 +03:00
|
|
|
|
|
|
|
.hg/store/packs/manifests/dcda72bf149ff3d15689406ee73e30c31a303630:
|
|
|
|
subdir:
|
|
|
|
Node Delta Base Delta Length Blob Size
|
|
|
|
d67ded07f949 000000000000 86 (missing)
|
|
|
|
|
|
|
|
(empty name):
|
|
|
|
Node Delta Base Delta Length Blob Size
|
|
|
|
8e5245404428 000000000000 92 (missing)
|
|
|
|
|
2017-07-14 21:13:39 +03:00
|
|
|
|
|
|
|
Test treemanifest with sparse enabled
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [extensions]
|
2018-10-17 00:19:23 +03:00
|
|
|
> sparse=
|
2018-01-09 23:59:00 +03:00
|
|
|
> reset=
|
2017-07-14 21:13:39 +03:00
|
|
|
> EOF
|
|
|
|
$ hg sparse -I subdir
|
|
|
|
$ hg reset '.^'
|
2019-12-11 21:19:00 +03:00
|
|
|
saved backup bundle to $TESTTMP/client/.hg/strip-backup/*-reset.hg (glob)
|
|
|
|
1 changeset hidden
|
2017-07-14 21:13:39 +03:00
|
|
|
$ hg status
|
|
|
|
M subdir/y
|
2017-07-18 21:30:12 +03:00
|
|
|
$ hg up -C .
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ hg sparse --reset
|
|
|
|
|
|
|
|
Test rebase two commits with same changes
|
|
|
|
$ echo >> subdir/y
|
|
|
|
$ hg commit -qm 'modify subdir/y #1'
|
|
|
|
$ hg up -q '.^'
|
|
|
|
$ echo >> x
|
|
|
|
$ echo >> subdir/y
|
|
|
|
$ hg commit -qm 'modify subdir/y #2'
|
|
|
|
$ hg up -q '.^'
|
|
|
|
$ echo >> noop
|
|
|
|
$ hg add noop
|
|
|
|
$ hg commit -Am 'rebase destination'
|
|
|
|
$ hg rebase -d 6 -s '4 + 5' --config rebase.singletransaction=True
|
2019-10-16 02:28:01 +03:00
|
|
|
rebasing 6052526a0d67 "modify subdir/y #1"
|
|
|
|
rebasing 79a69a1547d7 "modify subdir/y #2"
|
2017-07-18 21:30:12 +03:00
|
|
|
saved backup bundle to $TESTTMP/client/.hg/strip-backup/79a69a1547d7-fc6bc129-rebase.hg (glob)
|
2019-03-22 02:13:16 +03:00
|
|
|
$ hg debughistorypack .hg/store/packs/manifests/387394c1cfba657cf7ac620d361317dd969a5c70.histidx .hg/store/packs/manifests/3b9ccdeefd4d12bf729e949ffdd58c25525a53e2.histidx
|
2017-07-18 21:30:12 +03:00
|
|
|
|
|
|
|
|
|
|
|
Node P1 Node P2 Node Link Node Copy From
|
2018-03-15 23:40:17 +03:00
|
|
|
5ca06dca517c 8011431de863 000000000000 36098647e229
|
2017-07-18 21:30:12 +03:00
|
|
|
|
2019-03-22 02:13:16 +03:00
|
|
|
subdir
|
|
|
|
Node P1 Node P2 Node Link Node Copy From
|
|
|
|
ad0a48a2ec1e a4e2f032ee0f 000000000000 36098647e229
|
|
|
|
|
|
|
|
|
|
|
|
Node P1 Node P2 Node Link Node Copy From
|
|
|
|
8026e03c5a35 8011431de863 000000000000 904f99ba5a9e
|
|
|
|
|
2017-07-18 21:30:12 +03:00
|
|
|
subdir
|
|
|
|
Node P1 Node P2 Node Link Node Copy From
|
2018-03-15 23:40:17 +03:00
|
|
|
ad0a48a2ec1e a4e2f032ee0f 000000000000 904f99ba5a9e
|