annotate tests/test-remotefilelog-repack.t @ 42859:2b869a515ba6

context: filter out invalid copies from workingctx.p[12]copies() workingctx normally gets its lists of modified, added, removed files etc. based on the dirstate status. Its constructor also accepts a "changes" argument to override the status from the dirstate. This is used for partial commits. If a "changed" argument was passed, we should clearly also filter out copies to those paths, which I had previously missed. This patch adds that filtering and fixes the bugs demonstrated in the previous patch. Differential Revision: https://phab.mercurial-scm.org/D6750
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 19 Aug 2019 15:43:27 -0700
parents 2c74337e6483
children 5fadf6103790
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
40722
0800d9e6e216 tests: disable remotefilelog on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40572
diff changeset
1 #require no-windows
0800d9e6e216 tests: disable remotefilelog on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40572
diff changeset
2
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
3 $ . "$TESTDIR/remotefilelog-library.sh"
42842
2c74337e6483 remotefilelog: reduce probability of race-condition in remotefilelog tests
Boris Feld <boris.feld@octobus.net>
parents: 40722
diff changeset
4 # devel.remotefilelog.ensurestart: reduce race condition with
2c74337e6483 remotefilelog: reduce probability of race-condition in remotefilelog tests
Boris Feld <boris.feld@octobus.net>
parents: 40722
diff changeset
5 # waiton{repack/prefetch}
2c74337e6483 remotefilelog: reduce probability of race-condition in remotefilelog tests
Boris Feld <boris.feld@octobus.net>
parents: 40722
diff changeset
6 $ cat >> $HGRCPATH <<EOF
2c74337e6483 remotefilelog: reduce probability of race-condition in remotefilelog tests
Boris Feld <boris.feld@octobus.net>
parents: 40722
diff changeset
7 > [devel]
2c74337e6483 remotefilelog: reduce probability of race-condition in remotefilelog tests
Boris Feld <boris.feld@octobus.net>
parents: 40722
diff changeset
8 > remotefilelog.ensurestart=True
2c74337e6483 remotefilelog: reduce probability of race-condition in remotefilelog tests
Boris Feld <boris.feld@octobus.net>
parents: 40722
diff changeset
9 > EOF
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
10
40571
95a079ea1e19 tests: drop obsolete "hginit" alias in remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com>
parents: 40507
diff changeset
11 $ hg init master
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
12 $ cd master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
13 $ cat >> .hg/hgrc <<EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
14 > [remotefilelog]
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
15 > server=True
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
16 > serverexpiration=-1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
17 > EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
18 $ echo x > x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
19 $ hg commit -qAm x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
20 $ echo x >> x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
21 $ hg commit -qAm x2
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
22 $ cd ..
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
23
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
24 $ hgcloneshallow ssh://user@dummy/master shallow -q
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
25 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
26
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
27 # Set the prefetchdays config to zero so that all commits are prefetched
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
28 # no matter what their creation date is.
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
29 $ cd shallow
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
30 $ cat >> .hg/hgrc <<EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
31 > [remotefilelog]
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
32 > prefetchdays=0
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
33 > EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
34 $ cd ..
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
35
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
36 # Test that repack cleans up the old files and creates new packs
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
37
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
38 $ cd shallow
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
39 $ find $CACHEDIR | sort
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
40 $TESTTMP/hgcache
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
41 $TESTTMP/hgcache/master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
42 $TESTTMP/hgcache/master/11
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
43 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
44 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/aee31534993a501858fb6dd96a065671922e7d51
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
45 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
46
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
47 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
48
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
49 $ find $CACHEDIR | sort
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
50 $TESTTMP/hgcache
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
51 $TESTTMP/hgcache/master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
52 $TESTTMP/hgcache/master/packs
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
53 $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
54 $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
55 $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
56 $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
57 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
58 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
59
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
60 # Test that the packs are readonly
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
61 $ ls_l $CACHEDIR/master/packs
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
62 -r--r--r-- 1145 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
63 -r--r--r-- 172 1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
64 -r--r--r-- 1074 b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
65 -r--r--r-- 72 b1e0cfc7f345e408a7825e3081501959488d59ce.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
66 -rw-r--r-- 0 repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
67
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
68 # Test that the data in the new packs is accessible
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
69 $ hg cat -r . x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
70 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
71 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
72
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
73 # Test that adding new data and repacking it results in the loose data and the
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
74 # old packs being combined.
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
75
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
76 $ cd ../master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
77 $ echo x >> x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
78 $ hg commit -m x3
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
79 $ cd ../shallow
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
80 $ hg pull -q
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
81 $ hg up -q tip
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
82 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
83
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
84 $ find $CACHEDIR -type f | sort
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
85 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
86 $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
87 $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
88 $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
89 $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
90 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
91 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
92
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
93 # First assert that with --packsonly, the loose object will be ignored:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
94
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
95 $ hg repack --packsonly
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
96
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
97 $ find $CACHEDIR -type f | sort
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
98 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/d4a3ed9310e5bd9887e3bf779da5077efab28216
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
99 $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
100 $TESTTMP/hgcache/master/packs/1e91b207daf5d7b48f1be9c587d6b5ae654ce78c.histpack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
101 $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
102 $TESTTMP/hgcache/master/packs/b1e0cfc7f345e408a7825e3081501959488d59ce.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
103 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
104 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
105
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
106 $ hg repack --traceback
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
107
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
108 $ find $CACHEDIR -type f | sort
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
109 $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
110 $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
111 $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
112 $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
113 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
114 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
115
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
116 # Verify all the file data is still available
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
117 $ hg cat -r . x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
118 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
119 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
120 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
121 $ hg cat -r '.^' x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
122 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
123 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
124
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
125 # Test that repacking again without new data does not delete the pack files
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
126 # and did not change the pack names
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
127 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
128 $ find $CACHEDIR -type f | sort
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
129 $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
130 $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
131 $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
132 $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
133 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
134 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
135
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
136 # Run two repacks at once
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
137 $ hg repack --config "hooks.prerepack=sleep 3" &
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
138 $ sleep 1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
139 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
140 skipping repack - another repack is already running
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
141 $ hg debugwaitonrepack >/dev/null 2>&1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
142
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
143 # Run repack in the background
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
144 $ cd ../master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
145 $ echo x >> x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
146 $ hg commit -m x4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
147 $ cd ../shallow
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
148 $ hg pull -q
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
149 $ hg up -q tip
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
150 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
151 $ find $CACHEDIR -type f | sort
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
152 $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/1bb2e6237e035c8f8ef508e281f1ce075bc6db72
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
153 $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
154 $TESTTMP/hgcache/master/packs/78840d69389c7404327f7477e3931c89945c37d1.datapack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
155 $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
156 $TESTTMP/hgcache/master/packs/8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
157 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
158 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
159
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
160 $ hg repack --background
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
161 (running background repack)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
162 $ sleep 0.5
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
163 $ hg debugwaitonrepack >/dev/null 2>&1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
164 $ find $CACHEDIR -type f | sort
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
165 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
166 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0.datapack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
167 $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
168 $TESTTMP/hgcache/master/packs/604552d403a1381749faf656feca0ca265a6d52c.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
169 $TESTTMP/hgcache/master/packs/repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
170 $TESTTMP/hgcache/repos
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
171
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
172 # Test debug commands
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
173
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
174 $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
175 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
176 x:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
177 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
178 1bb2e6237e03 000000000000 8 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
179 d4a3ed9310e5 1bb2e6237e03 12 6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
180 aee31534993a d4a3ed9310e5 12 4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
181
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
182 Total: 32 18 (77.8% bigger)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
183 $ hg debugdatapack --long $TESTTMP/hgcache/master/packs/*.datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
184 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
185 x:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
186 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
187 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 8 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
188 d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 12 6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
189 aee31534993a501858fb6dd96a065671922e7d51 d4a3ed9310e5bd9887e3bf779da5077efab28216 12 4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
190
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
191 Total: 32 18 (77.8% bigger)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
192 $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack --node d4a3ed9310e5bd9887e3bf779da5077efab28216
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
193 $TESTTMP/hgcache/master/packs/39443fa1064182e93d968b5cba292eb5283260d0:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
194
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
195 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
196 Node Delta Base Delta SHA1 Delta Length
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
197 d4a3ed9310e5bd9887e3bf779da5077efab28216 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 77029ab56e83ea2115dd53ff87483682abe5d7ca 12
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
198 Node Delta Base Delta SHA1 Delta Length
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
199 1bb2e6237e035c8f8ef508e281f1ce075bc6db72 0000000000000000000000000000000000000000 7ca8c71a64f7b56380e77573da2f7a5fdd2ecdb5 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
200 $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
201
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
202 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
203 Node P1 Node P2 Node Link Node Copy From
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
204 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
205 d4a3ed9310e5 aee31534993a 000000000000 421535db10b6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
206 aee31534993a 1406e7411862 000000000000 a89d614e2364
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
207 1406e7411862 000000000000 000000000000 b292c1e3311f
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
208
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
209 # Test copy tracing from a pack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
210 $ cd ../master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
211 $ hg mv x y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
212 $ hg commit -m 'move x to y'
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
213 $ cd ../shallow
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
214 $ hg pull -q
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
215 $ hg up -q tip
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
216 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
217 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
218 $ hg log -f y -T '{desc}\n'
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
219 move x to y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
220 x4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
221 x3
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
222 x2
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
223 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
224
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
225 # Test copy trace across rename and back
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
226 $ cp -R $TESTTMP/hgcache/master/packs $TESTTMP/backuppacks
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
227 $ cd ../master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
228 $ hg mv y x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
229 $ hg commit -m 'move y back to x'
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
230 $ hg revert -r 0 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
231 $ mv x y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
232 $ hg add y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
233 $ echo >> y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
234 $ hg revert x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
235 $ hg commit -m 'add y back without metadata'
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
236 $ cd ../shallow
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
237 $ hg pull -q
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
238 $ hg up -q tip
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
239 2 files fetched over 2 fetches - (2 misses, 0.00% hit ratio) over * (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
240 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
241 $ ls $TESTTMP/hgcache/master/packs
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
242 bfd60adb76018bb952e27cd23fc151bf94865d7d.histidx
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
243 bfd60adb76018bb952e27cd23fc151bf94865d7d.histpack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
244 fb3aa57b22789ebcc45706c352e2d6af099c5816.dataidx
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
245 fb3aa57b22789ebcc45706c352e2d6af099c5816.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
246 repacklock
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
247 $ hg debughistorypack $TESTTMP/hgcache/master/packs/*.histidx
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
248
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
249 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
250 Node P1 Node P2 Node Link Node Copy From
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
251 cd410a44d584 577959738234 000000000000 609547eda446 y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
252 1bb2e6237e03 d4a3ed9310e5 000000000000 0b03bbc9e1e7
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
253 d4a3ed9310e5 aee31534993a 000000000000 421535db10b6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
254 aee31534993a 1406e7411862 000000000000 a89d614e2364
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
255 1406e7411862 000000000000 000000000000 b292c1e3311f
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
256
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
257 y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
258 Node P1 Node P2 Node Link Node Copy From
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
259 577959738234 1bb2e6237e03 000000000000 c7faf2fc439a x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
260 21f46f2721e7 000000000000 000000000000 d6868642b790
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
261 $ hg strip -r '.^'
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
262 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
263 saved backup bundle to $TESTTMP/shallow/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
264 $ hg -R ../master strip -r '.^'
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
265 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
266 saved backup bundle to $TESTTMP/master/.hg/strip-backup/609547eda446-b26b56a8-backup.hg (glob)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
267
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
268 $ rm -rf $TESTTMP/hgcache/master/packs
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
269 $ cp -R $TESTTMP/backuppacks $TESTTMP/hgcache/master/packs
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
270
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
271 # Test repacking datapack without history
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
272 $ rm -rf $CACHEDIR/master/packs/*hist*
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
273 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
274 $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
275 $TESTTMP/hgcache/master/packs/922aca43dbbeda4d250565372e8892ec7b08da6a:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
276 x:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
277 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
278 1bb2e6237e03 000000000000 8 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
279 d4a3ed9310e5 1bb2e6237e03 12 6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
280 aee31534993a d4a3ed9310e5 12 4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
281
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
282 Total: 32 18 (77.8% bigger)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
283 y:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
284 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
285 577959738234 000000000000 70 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
286
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
287 Total: 70 8 (775.0% bigger)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
288
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
289 $ hg cat -r ".^" x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
290 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
291 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
292 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
293 x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
294
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
295 Incremental repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
296 $ rm -rf $CACHEDIR/master/packs/*
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
297 $ cat >> .hg/hgrc <<EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
298 > [remotefilelog]
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
299 > data.generations=60
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
300 > 150
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
301 > EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
302
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
303 Single pack - repack does nothing
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
304 $ hg prefetch -r 0
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
305 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
306 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
307 [1]
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
308 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
309 [1]
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
310 $ hg repack --incremental
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
311 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
312 -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
313 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
314 -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
315
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
316 3 gen1 packs, 1 gen0 pack - packs 3 gen1 into 1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
317 $ hg prefetch -r 1
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
318 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
319 $ hg prefetch -r 2
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
320 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
321 $ hg prefetch -r 38
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
322 abort: unknown revision '38'!
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
323 [255]
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
324 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
325 -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
326 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
327 -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
328
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
329 For the data packs, setting the limit for the repackmaxpacksize to be 64 such
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
330 that data pack with size 65 is more than the limit. This effectively ensures
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
331 that no generation has 3 packs and therefore, no packs are chosen for the
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
332 incremental repacking. As for the history packs, setting repackmaxpacksize to be
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
333 0 which should always result in no repacking.
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
334 $ hg repack --incremental --config remotefilelog.data.repackmaxpacksize=64 \
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
335 > --config remotefilelog.history.repackmaxpacksize=0
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
336 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
337 -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
338 -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
339 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
340 -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
341 -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
342
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
343 Setting limit for the repackmaxpacksize to be the size of the biggest pack file
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
344 which ensures that it is effectively ignored in the incremental repacking.
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
345 $ hg repack --incremental --config remotefilelog.data.repackmaxpacksize=65 \
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
346 > --config remotefilelog.history.repackmaxpacksize=336
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
347 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
348 -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
349 -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
350 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
351 -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
352 -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
353
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
354 1 gen3 pack, 1 gen0 pack - does nothing
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
355 $ hg repack --incremental
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
356 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
357 -r--r--r-- 70 052643fdcdebbd42d7c180a651a30d46098e6fe1.datapack
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
358 -r--r--r-- 149 78840d69389c7404327f7477e3931c89945c37d1.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
359 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
360 -r--r--r-- 254 8abe7889aae389337d12ebe6085d4ee13854c7c9.histpack
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
361 -r--r--r-- 90 955a622173324b2d8b53e1147f209f1cf125302e.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
362
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
363 Pull should run background repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
364 $ cat >> .hg/hgrc <<EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
365 > [remotefilelog]
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
366 > backgroundrepack=True
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
367 > EOF
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
368 $ clearcache
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
369 $ hg prefetch -r 0
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
370 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
371 $ hg prefetch -r 1
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
372 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
373 $ hg prefetch -r 2
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
374 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
375 $ hg prefetch -r 3
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
376 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
377
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
378 $ hg pull
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
379 pulling from ssh://user@dummy/master
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
380 searching for changes
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
381 no changes found
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
382 (running background incremental repack)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
383 $ sleep 0.5
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
384 $ hg debugwaitonrepack >/dev/null 2>&1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
385 $ ls_l $TESTTMP/hgcache/master/packs/ | grep datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
386 -r--r--r-- 303 156a6c1c83aeb69422d7936e0a46ba9bc06a71c0.datapack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
387 $ ls_l $TESTTMP/hgcache/master/packs/ | grep histpack
40506
10c10da14c5d remotefilelog: bump pack file formats to version 2
Augie Fackler <augie@google.com>
parents: 40502
diff changeset
388 -r--r--r-- 336 604552d403a1381749faf656feca0ca265a6d52c.histpack
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
389
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
390 Test environment variable resolution
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
391 $ CACHEPATH=$TESTTMP/envcache hg prefetch --config 'remotefilelog.cachepath=$CACHEPATH'
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
392 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
393 $ find $TESTTMP/envcache | sort
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
394 $TESTTMP/envcache
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
395 $TESTTMP/envcache/master
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
396 $TESTTMP/envcache/master/95
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
397 $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
398 $TESTTMP/envcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/577959738234a1eb241ed3ed4b22a575833f56e0
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
399 $TESTTMP/envcache/repos
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
400
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
401 Test local remotefilelog blob is correct when based on a pack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
402 $ hg prefetch -r .
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
403 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
404 $ echo >> y
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
405 $ hg commit -m y2
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
406 $ hg debugremotefilelog .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
407 size: 9 bytes
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
408 path: .hg/store/data/95cb0bfd2977c761298d9624e4b4d4c72a39974a/b70860edba4f8242a1d52f2a94679dd23cb76808
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
409 key: b70860edba4f
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
410
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
411 node => p1 p2 linknode copyfrom
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
412 b70860edba4f => 577959738234 000000000000 08d3fbc98c48
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
413 577959738234 => 1bb2e6237e03 000000000000 c7faf2fc439a x
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
414 1bb2e6237e03 => d4a3ed9310e5 000000000000 0b03bbc9e1e7
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
415 d4a3ed9310e5 => aee31534993a 000000000000 421535db10b6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
416 aee31534993a => 1406e7411862 000000000000 a89d614e2364
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
417 1406e7411862 => 000000000000 000000000000 b292c1e3311f
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
418
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
419 Test limiting the max delta chain length
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
420 $ hg repack --config packs.maxchainlen=1
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
421 $ hg debugdatapack $TESTTMP/hgcache/master/packs/*.dataidx
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
422 $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
423 x:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
424 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
425 1bb2e6237e03 000000000000 8 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
426 d4a3ed9310e5 1bb2e6237e03 12 6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
427 aee31534993a 000000000000 4 4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
428 1406e7411862 aee31534993a 12 2
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
429
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
430 Total: 36 20 (80.0% bigger)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
431 y:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
432 Node Delta Base Delta Length Blob Size
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
433 577959738234 000000000000 70 8
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
434
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
435 Total: 70 8 (775.0% bigger)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
436
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
437 Test huge pack cleanup using different values of packs.maxpacksize:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
438 $ hg repack --incremental --debug
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
439 $ hg repack --incremental --debug --config packs.maxpacksize=512
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
440 removing oversize packfile $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909.datapack (425 bytes)
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
441 removing oversize packfile $TESTTMP/hgcache/master/packs/f258af4c033dd5cd32b4dbc42a1efcd8e4c7d909.dataidx (1.21 KB)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
442
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
443 Do a repack where the new pack reuses a delta from the old pack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
444 $ clearcache
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
445 $ hg prefetch -r '2::3'
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
446 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
447 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
448 $ hg debugdatapack $CACHEDIR/master/packs/*.datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
449 $TESTTMP/hgcache/master/packs/9ec6b30891bd851320acb7c66b69a2bdf41c8df3:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
450 x:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
451 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
452 1bb2e6237e03 000000000000 8 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
453 d4a3ed9310e5 1bb2e6237e03 12 6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
454
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
455 Total: 20 14 (42.9% bigger)
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
456 $ hg prefetch -r '0::1'
40502
6d64e2abe8d3 remotefilelog: remove support for fetching packs
Augie Fackler <augie@google.com>
parents: 40495
diff changeset
457 2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob)
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
458 $ hg repack
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
459 $ hg debugdatapack $CACHEDIR/master/packs/*.datapack
40507
e2a1584e9e3f remotefilelog: rip out lz4 support
Augie Fackler <augie@google.com>
parents: 40506
diff changeset
460 $TESTTMP/hgcache/master/packs/156a6c1c83aeb69422d7936e0a46ba9bc06a71c0:
40495
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
461 x:
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
462 Node Delta Base Delta Length Blob Size
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
463 1bb2e6237e03 000000000000 8 8
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
464 d4a3ed9310e5 1bb2e6237e03 12 6
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
465 aee31534993a d4a3ed9310e5 12 4
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
466 1406e7411862 aee31534993a 12 2
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
467
3a333a582d7b remotefilelog: import pruned-down remotefilelog extension from hg-experimental
Augie Fackler <augie@google.com>
parents:
diff changeset
468 Total: 44 20 (120.0% bigger)