Show More
@@ -0,0 +1,14 b'' | |||
|
1 | #!/bin/sh | |
|
2 | ||
|
3 | mkdir t | |
|
4 | cd t | |
|
5 | hg init | |
|
6 | echo a > a | |
|
7 | hg add a | |
|
8 | hg commit -m test -d "1000000 0" | |
|
9 | rm .hg/requires | |
|
10 | hg tip | |
|
11 | echo indoor-pool > .hg/requires | |
|
12 | hg tip | |
|
13 | ||
|
14 | true |
@@ -0,0 +1,2 b'' | |||
|
1 | abort: index 00changelog.i unknown format 2! | |
|
2 | abort: requirement 'indoor-pool' not supported! |
@@ -128,15 +128,13 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
128 | 128 | if self.dir_: |
|
129 | 129 | self.rmtree(self.dir_, True) |
|
130 | 130 | |
|
131 | dest_repo = repository(ui, dest, create=True) | |
|
132 | ||
|
133 | 131 | dir_cleanup = None |
|
134 |
if |
|
|
135 |
dir_cleanup = DirCleanup( |
|
|
132 | if islocal(dest): | |
|
133 | dir_cleanup = DirCleanup(dest) | |
|
136 | 134 | |
|
137 | 135 | abspath = source |
|
138 | 136 | copy = False |
|
139 |
if src_repo.local() and |
|
|
137 | if src_repo.local() and islocal(dest): | |
|
140 | 138 | abspath = os.path.abspath(source) |
|
141 | 139 | copy = not pull and not rev |
|
142 | 140 | |
@@ -152,9 +150,27 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
152 | 150 | copy = False |
|
153 | 151 | |
|
154 | 152 | if copy: |
|
155 | # we lock here to avoid premature writing to the target | |
|
153 | def force_copy(src, dst): | |
|
154 | try: | |
|
155 | util.copyfiles(src, dst) | |
|
156 | except OSError, inst: | |
|
157 | if inst.errno != errno.ENOENT: | |
|
158 | raise | |
|
159 | ||
|
156 | 160 | src_store = os.path.realpath(src_repo.spath) |
|
157 | dest_store = os.path.realpath(dest_repo.spath) | |
|
161 | if not os.path.exists(dest): | |
|
162 | os.mkdir(dest) | |
|
163 | dest_path = os.path.realpath(os.path.join(dest, ".hg")) | |
|
164 | os.mkdir(dest_path) | |
|
165 | if src_repo.spath != src_repo.path: | |
|
166 | dest_store = os.path.join(dest_path, "store") | |
|
167 | os.mkdir(dest_store) | |
|
168 | else: | |
|
169 | dest_store = dest_path | |
|
170 | # copy the requires file | |
|
171 | force_copy(src_repo.join("requires"), | |
|
172 | os.path.join(dest_path, "requires")) | |
|
173 | # we lock here to avoid premature writing to the target | |
|
158 | 174 | dest_lock = lock.lock(os.path.join(dest_store, "lock")) |
|
159 | 175 | |
|
160 | 176 | files = ("data", |
@@ -163,17 +179,15 b' def clone(ui, source, dest=None, pull=Fa' | |||
|
163 | 179 | for f in files: |
|
164 | 180 | src = os.path.join(src_store, f) |
|
165 | 181 | dst = os.path.join(dest_store, f) |
|
166 | try: | |
|
167 | util.copyfiles(src, dst) | |
|
168 | except OSError, inst: | |
|
169 | if inst.errno != errno.ENOENT: | |
|
170 | raise | |
|
182 | force_copy(src, dst) | |
|
171 | 183 | |
|
172 | 184 | # we need to re-init the repo after manually copying the data |
|
173 | 185 | # into it |
|
174 | 186 | dest_repo = repository(ui, dest) |
|
175 | 187 | |
|
176 | 188 | else: |
|
189 | dest_repo = repository(ui, dest, create=True) | |
|
190 | ||
|
177 | 191 | revs = None |
|
178 | 192 | if rev: |
|
179 | 193 | if 'lookup' not in src_repo.capabilities: |
@@ -10,12 +10,14 b' import os, mimetypes' | |||
|
10 | 10 | import os.path |
|
11 | 11 | |
|
12 | 12 | def get_mtime(repo_path): |
|
13 |
|
|
|
14 | cl_path = os.path.join(hg_path, "00changelog.i") | |
|
15 | if os.path.exists(os.path.join(cl_path)): | |
|
13 | store_path = os.path.join(repo_path, ".hg") | |
|
14 | if not os.path.isdir(os.path.join(store_path, "data")): | |
|
15 | store_path = os.path.join(store_path, "store") | |
|
16 | cl_path = os.path.join(store_path, "00changelog.i") | |
|
17 | if os.path.exists(cl_path): | |
|
16 | 18 | return os.stat(cl_path).st_mtime |
|
17 | 19 | else: |
|
18 |
return os.stat( |
|
|
20 | return os.stat(store_path).st_mtime | |
|
19 | 21 | |
|
20 | 22 | def staticfile(directory, fname, req): |
|
21 | 23 | """return a file inside directory with guessed content-type header |
@@ -16,6 +16,7 b' demandload(globals(), "os revlog time ut' | |||
|
16 | 16 | |
|
17 | 17 | class localrepository(repo.repository): |
|
18 | 18 | capabilities = ('lookup', 'changegroupsubset') |
|
19 | supported = ('revlogv1', 'store') | |
|
19 | 20 | |
|
20 | 21 | def __del__(self): |
|
21 | 22 | self.transhandle = None |
@@ -30,28 +31,55 b' class localrepository(repo.repository):' | |||
|
30 | 31 | raise repo.RepoError(_("There is no Mercurial repository" |
|
31 | 32 | " here (.hg not found)")) |
|
32 | 33 | path = p |
|
34 | ||
|
33 | 35 | self.path = os.path.join(path, ".hg") |
|
34 |
self. |
|
|
36 | self.root = os.path.realpath(path) | |
|
37 | self.origroot = path | |
|
38 | self.opener = util.opener(self.path) | |
|
39 | self.wopener = util.opener(self.root) | |
|
35 | 40 | |
|
36 | 41 | if not os.path.isdir(self.path): |
|
37 | 42 | if create: |
|
38 | 43 | if not os.path.exists(path): |
|
39 | 44 | os.mkdir(path) |
|
40 | 45 | os.mkdir(self.path) |
|
41 |
|
|
|
42 | os.mkdir(self.spath) | |
|
46 | os.mkdir(os.path.join(self.path, "store")) | |
|
47 | requirements = ("revlogv1", "store") | |
|
48 | reqfile = self.opener("requires", "w") | |
|
49 | for r in requirements: | |
|
50 | reqfile.write("%s\n" % r) | |
|
51 | reqfile.close() | |
|
52 | # create an invalid changelog | |
|
53 | self.opener("00changelog.i", "a").write('\0\0\0\2') | |
|
43 | 54 | else: |
|
44 | 55 | raise repo.RepoError(_("repository %s not found") % path) |
|
45 | 56 | elif create: |
|
46 | 57 | raise repo.RepoError(_("repository %s already exists") % path) |
|
58 | else: | |
|
59 | # find requirements | |
|
60 | try: | |
|
61 | requirements = self.opener("requires").read().splitlines() | |
|
62 | except IOError, inst: | |
|
63 | if inst.errno != errno.ENOENT: | |
|
64 | raise | |
|
65 | requirements = [] | |
|
66 | # check them | |
|
67 | for r in requirements: | |
|
68 | if r not in self.supported: | |
|
69 | raise repo.RepoError(_("requirement '%s' not supported") % r) | |
|
47 | 70 | |
|
48 | self.root = os.path.realpath(path) | |
|
49 | self.origroot = path | |
|
71 | # setup store | |
|
72 | if "store" in requirements: | |
|
73 | self.encodefn = util.encodefilename | |
|
74 | self.decodefn = util.decodefilename | |
|
75 | self.spath = os.path.join(self.path, "store") | |
|
76 | else: | |
|
77 | self.encodefn = lambda x: x | |
|
78 | self.decodefn = lambda x: x | |
|
79 | self.spath = self.path | |
|
80 | self.sopener = util.encodedopener(util.opener(self.spath), self.encodefn) | |
|
81 | ||
|
50 | 82 | self.ui = ui.ui(parentui=parentui) |
|
51 | self.opener = util.opener(self.path) | |
|
52 | self.sopener = util.opener(self.spath) | |
|
53 | self.wopener = util.opener(self.root) | |
|
54 | ||
|
55 | 83 | try: |
|
56 | 84 | self.ui.readconfig(self.join("hgrc"), self.root) |
|
57 | 85 | except IOError: |
@@ -408,6 +436,7 b' class localrepository(repo.repository):' | |||
|
408 | 436 | return os.path.join(self.path, f) |
|
409 | 437 | |
|
410 | 438 | def sjoin(self, f): |
|
439 | f = self.encodefn(f) | |
|
411 | 440 | return os.path.join(self.spath, f) |
|
412 | 441 | |
|
413 | 442 | def wjoin(self, f): |
@@ -32,12 +32,32 b' def opener(base):' | |||
|
32 | 32 | class statichttprepository(localrepo.localrepository): |
|
33 | 33 | def __init__(self, ui, path): |
|
34 | 34 | self._url = path |
|
35 | self.path = (path + "/.hg") | |
|
36 | self.spath = self.path | |
|
37 | 35 | self.ui = ui |
|
38 | 36 | self.revlogversion = 0 |
|
37 | ||
|
38 | self.path = (path + "/.hg") | |
|
39 | 39 | self.opener = opener(self.path) |
|
40 | self.sopener = opener(self.spath) | |
|
40 | # find requirements | |
|
41 | try: | |
|
42 | requirements = self.opener("requires").read().splitlines() | |
|
43 | except IOError: | |
|
44 | requirements = [] | |
|
45 | # check them | |
|
46 | for r in requirements: | |
|
47 | if r not in self.supported: | |
|
48 | raise repo.RepoError(_("requirement '%s' not supported") % r) | |
|
49 | ||
|
50 | # setup store | |
|
51 | if "store" in requirements: | |
|
52 | self.encodefn = util.encodefilename | |
|
53 | self.decodefn = util.decodefilename | |
|
54 | self.spath = self.path + "/store" | |
|
55 | else: | |
|
56 | self.encodefn = lambda x: x | |
|
57 | self.decodefn = lambda x: x | |
|
58 | self.spath = self.path | |
|
59 | self.sopener = util.encodedopener(opener(self.spath), self.encodefn) | |
|
60 | ||
|
41 | 61 | self.manifest = manifest.manifest(self.sopener) |
|
42 | 62 | self.changelog = changelog.changelog(self.sopener) |
|
43 | 63 | self.tagscache = None |
@@ -79,6 +79,8 b' def stream_out(repo, fileobj):' | |||
|
79 | 79 | entries = [] |
|
80 | 80 | total_bytes = 0 |
|
81 | 81 | for name, size in walkrepo(repo.spath): |
|
82 | if repo.decodefn: | |
|
83 | name = repo.decodefn(name) | |
|
82 | 84 | entries.append((name, size)) |
|
83 | 85 | total_bytes += size |
|
84 | 86 | repolock.release() |
@@ -905,6 +905,38 b' else:' | |||
|
905 | 905 | st = fstat(f) |
|
906 | 906 | return st.st_uid == os.getuid() |
|
907 | 907 | |
|
908 | def _buildencodefun(): | |
|
909 | e = '_' | |
|
910 | win_reserved = [ord(x) for x in '|\?*<":>+[]'] | |
|
911 | cmap = dict([ (chr(x), chr(x)) for x in xrange(127) ]) | |
|
912 | for x in (range(32) + range(126, 256) + win_reserved): | |
|
913 | cmap[chr(x)] = "~%02x" % x | |
|
914 | for x in range(ord("A"), ord("Z")+1) + [ord(e)]: | |
|
915 | cmap[chr(x)] = e + chr(x).lower() | |
|
916 | dmap = {} | |
|
917 | for k, v in cmap.iteritems(): | |
|
918 | dmap[v] = k | |
|
919 | def decode(s): | |
|
920 | i = 0 | |
|
921 | while i < len(s): | |
|
922 | for l in xrange(1, 4): | |
|
923 | try: | |
|
924 | yield dmap[s[i:i+l]] | |
|
925 | i += l | |
|
926 | break | |
|
927 | except KeyError: | |
|
928 | pass | |
|
929 | else: | |
|
930 | raise KeyError | |
|
931 | return (lambda s: "".join([cmap[c] for c in s]), | |
|
932 | lambda s: "".join(list(decode(s)))) | |
|
933 | ||
|
934 | encodefilename, decodefilename = _buildencodefun() | |
|
935 | ||
|
936 | def encodedopener(openerfn, fn): | |
|
937 | def o(path, *args, **kw): | |
|
938 | return openerfn(fn(path), *args, **kw) | |
|
939 | return o | |
|
908 | 940 | |
|
909 | 941 | def opener(base, audit=True): |
|
910 | 942 | """ |
@@ -41,11 +41,11 b' hg commit -m "1.3m" -d "1000000 0"' | |||
|
41 | 41 | hg update -C 3 |
|
42 | 42 | hg mv afile anotherfile |
|
43 | 43 | hg commit -m "0.3m" -d "1000000 0" |
|
44 | hg debugindex .hg/data/afile.i | |
|
45 | hg debugindex .hg/data/adifferentfile.i | |
|
46 | hg debugindex .hg/data/anotherfile.i | |
|
47 | hg debugindex .hg/data/fred.i | |
|
48 | hg debugindex .hg/00manifest.i | |
|
44 | hg debugindex .hg/store/data/afile.i | |
|
45 | hg debugindex .hg/store/data/adifferentfile.i | |
|
46 | hg debugindex .hg/store/data/anotherfile.i | |
|
47 | hg debugindex .hg/store/data/fred.i | |
|
48 | hg debugindex .hg/store/00manifest.i | |
|
49 | 49 | hg verify |
|
50 | 50 | cd .. |
|
51 | 51 | for i in 0 1 2 3 4 5 6 7 8; do |
@@ -41,11 +41,11 b' hg commit -m "1.3m"' | |||
|
41 | 41 | hg update -C 3 |
|
42 | 42 | hg mv afile anotherfile |
|
43 | 43 | hg commit -m "0.3m" |
|
44 | hg debugindex .hg/data/afile.i | |
|
45 | hg debugindex .hg/data/adifferentfile.i | |
|
46 | hg debugindex .hg/data/anotherfile.i | |
|
47 | hg debugindex .hg/data/fred.i | |
|
48 | hg debugindex .hg/00manifest.i | |
|
44 | hg debugindex .hg/store/data/afile.i | |
|
45 | hg debugindex .hg/store/data/adifferentfile.i | |
|
46 | hg debugindex .hg/store/data/anotherfile.i | |
|
47 | hg debugindex .hg/store/data/fred.i | |
|
48 | hg debugindex .hg/store/00manifest.i | |
|
49 | 49 | hg verify |
|
50 | 50 | cd .. |
|
51 | 51 | for i in 0 1 2 3 4 5 6 7 8; do |
@@ -11,4 +11,4 b' echo >> bar' | |||
|
11 | 11 | hg ci -m 'cp bar foo; change bar' |
|
12 | 12 | |
|
13 | 13 | hg debugrename foo |
|
14 | hg debugindex .hg/data/bar.i | |
|
14 | hg debugindex .hg/store/data/bar.i |
@@ -13,16 +13,16 b' hg history -v' | |||
|
13 | 13 | echo "we should see one log entry for a" |
|
14 | 14 | hg log a |
|
15 | 15 | echo "this should show a revision linked to changeset 0" |
|
16 | hg debugindex .hg/data/a.i | |
|
16 | hg debugindex .hg/store/data/a.i | |
|
17 | 17 | echo "we should see one log entry for b" |
|
18 | 18 | hg log b |
|
19 | 19 | echo "this should show a revision linked to changeset 1" |
|
20 | hg debugindex .hg/data/b.i | |
|
20 | hg debugindex .hg/store/data/b.i | |
|
21 | 21 | |
|
22 | 22 | echo "this should show the rename information in the metadata" |
|
23 | hg debugdata .hg/data/b.d 0 | head -3 | tail -2 | |
|
23 | hg debugdata .hg/store/data/b.d 0 | head -3 | tail -2 | |
|
24 | 24 | |
|
25 | $TESTDIR/md5sum.py .hg/data/b.i | |
|
25 | $TESTDIR/md5sum.py .hg/store/data/b.i | |
|
26 | 26 | hg cat b > bsum |
|
27 | 27 | $TESTDIR/md5sum.py bsum |
|
28 | 28 | hg cat a > asum |
@@ -41,7 +41,7 b' this should show a revision linked to ch' | |||
|
41 | 41 | this should show the rename information in the metadata |
|
42 | 42 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
43 | 43 | copy: a |
|
44 | ed156f22f0a6fde642de0b5eba0cbbb2 .hg/data/b.i | |
|
44 | ed156f22f0a6fde642de0b5eba0cbbb2 .hg/store/data/b.i | |
|
45 | 45 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
|
46 | 46 | 60b725f10c9c85c70d97880dfe8191b3 asum |
|
47 | 47 | checking changesets |
@@ -14,7 +14,7 b' hg commit -m2 -d"0 0"' | |||
|
14 | 14 | hg debugstate|grep '^copy' |
|
15 | 15 | |
|
16 | 16 | echo "# should match" |
|
17 | hg debugindex .hg/data/foo.i | |
|
17 | hg debugindex .hg/store/data/foo.i | |
|
18 | 18 | hg debugrename bar |
|
19 | 19 | |
|
20 | 20 | echo bleah > foo |
@@ -30,9 +30,9 b" hg debugstate|grep '^copy'" | |||
|
30 | 30 | hg commit -m3 -d"0 0" |
|
31 | 31 | |
|
32 | 32 | echo "# should show no parents for tip" |
|
33 | hg debugindex .hg/data/bar.i | |
|
33 | hg debugindex .hg/store/data/bar.i | |
|
34 | 34 | echo "# should match" |
|
35 | hg debugindex .hg/data/foo.i | |
|
35 | hg debugindex .hg/store/data/foo.i | |
|
36 | 36 | hg debugrename bar |
|
37 | 37 | |
|
38 | 38 | echo "# should show no copies" |
@@ -30,12 +30,12 b' hg ci -A -m 2 -d "1000000 0"' | |||
|
30 | 30 | hg merge 1 |
|
31 | 31 | hg ci -A -m m1 -d "1000000 0" |
|
32 | 32 | #hg log |
|
33 | #hg debugindex .hg/00manifest.i | |
|
33 | #hg debugindex .hg/store/00manifest.i | |
|
34 | 34 | hg update -C 1 |
|
35 | 35 | hg merge 2 |
|
36 | 36 | hg ci -A -m m2 -d "1000000 0" |
|
37 | 37 | #hg log |
|
38 | #hg debugindex .hg/00manifest.i | |
|
38 | #hg debugindex .hg/store/00manifest.i | |
|
39 | 39 | |
|
40 | 40 | cd .. |
|
41 | 41 | hg clone -r 3 a b |
@@ -22,7 +22,7 b' echo %% no changes' | |||
|
22 | 22 | hg status |
|
23 | 23 | |
|
24 | 24 | echo %% uncompressed contents in repo |
|
25 | hg debugdata .hg/data/a.gz.d 0 | |
|
25 | hg debugdata .hg/store/data/a.gz.d 0 | |
|
26 | 26 | |
|
27 | 27 | echo %% uncompress our working dir copy |
|
28 | 28 | gunzip < a.gz |
@@ -26,7 +26,7 b' HGMERGE=true hg merge 2' | |||
|
26 | 26 | hg ci -m "merge a/b -> blah" -d "1000000 0" |
|
27 | 27 | |
|
28 | 28 | hg log |
|
29 | hg debugindex .hg/00changelog.i | |
|
29 | hg debugindex .hg/store/00changelog.i | |
|
30 | 30 | |
|
31 | 31 | echo |
|
32 | 32 | |
@@ -41,6 +41,6 b' hg manifest --debug 4' | |||
|
41 | 41 | |
|
42 | 42 | echo |
|
43 | 43 | |
|
44 | hg debugindex .hg/data/a.i | |
|
44 | hg debugindex .hg/store/data/a.i | |
|
45 | 45 | |
|
46 | 46 | hg verify |
@@ -53,22 +53,22 b' hg debugstate | cut -b 1-16,35- | grep "' | |||
|
53 | 53 | hg ci -m "merge" -d "1000000 0" |
|
54 | 54 | |
|
55 | 55 | echo "main: we should have a merge here" |
|
56 | hg debugindex .hg/00changelog.i | |
|
56 | hg debugindex .hg/store/00changelog.i | |
|
57 | 57 | |
|
58 | 58 | echo "log should show foo and quux changed" |
|
59 | 59 | hg log -v -r tip |
|
60 | 60 | |
|
61 | 61 | echo "foo: we should have a merge here" |
|
62 | hg debugindex .hg/data/foo.i | |
|
62 | hg debugindex .hg/store/data/foo.i | |
|
63 | 63 | |
|
64 | 64 | echo "bar: we shouldn't have a merge here" |
|
65 | hg debugindex .hg/data/bar.i | |
|
65 | hg debugindex .hg/store/data/bar.i | |
|
66 | 66 | |
|
67 | 67 | echo "baz: we shouldn't have a merge here" |
|
68 | hg debugindex .hg/data/baz.i | |
|
68 | hg debugindex .hg/store/data/baz.i | |
|
69 | 69 | |
|
70 | 70 | echo "quux: we shouldn't have a merge here" |
|
71 | hg debugindex .hg/data/quux.i | |
|
71 | hg debugindex .hg/store/data/quux.i | |
|
72 | 72 | |
|
73 | 73 | echo "manifest entries should match tips of all files" |
|
74 | 74 | hg manifest --debug |
@@ -43,6 +43,6 b' hg -v merge' | |||
|
43 | 43 | ls -l ../test[123]/a > foo |
|
44 | 44 | cut -b 1-10 < foo |
|
45 | 45 | |
|
46 | hg debugindex .hg/data/a.i | |
|
47 | hg debugindex ../test2/.hg/data/a.i | |
|
48 | hg debugindex ../test1/.hg/data/a.i | |
|
46 | hg debugindex .hg/store/data/a.i | |
|
47 | hg debugindex ../test2/.hg/store/data/a.i | |
|
48 | hg debugindex ../test1/.hg/store/data/a.i |
@@ -42,11 +42,11 b' hg commit -m "1.3m"' | |||
|
42 | 42 | hg update -C 3 |
|
43 | 43 | hg mv afile anotherfile |
|
44 | 44 | hg commit -m "0.3m" |
|
45 | hg debugindex .hg/data/afile.i | |
|
46 | hg debugindex .hg/data/adifferentfile.i | |
|
47 | hg debugindex .hg/data/anotherfile.i | |
|
48 | hg debugindex .hg/data/fred.i | |
|
49 | hg debugindex .hg/00manifest.i | |
|
45 | hg debugindex .hg/store/data/afile.i | |
|
46 | hg debugindex .hg/store/data/adifferentfile.i | |
|
47 | hg debugindex .hg/store/data/anotherfile.i | |
|
48 | hg debugindex .hg/store/data/fred.i | |
|
49 | hg debugindex .hg/store/00manifest.i | |
|
50 | 50 | hg verify |
|
51 | 51 | echo "# Starting server" |
|
52 | 52 | hg serve -p 20061 -d --pid-file=../hg1.pid |
@@ -10,7 +10,7 b' Q=$!' | |||
|
10 | 10 | sleep 3 |
|
11 | 11 | kill -HUP $P |
|
12 | 12 | wait |
|
13 | ls .hg | |
|
13 | ls -R .hg | |
|
14 | 14 | |
|
15 | 15 | |
|
16 | 16 |
@@ -4,5 +4,11 b' adding changesets' | |||
|
4 | 4 | killed! |
|
5 | 5 | transaction abort! |
|
6 | 6 | rollback completed |
|
7 | .hg: | |
|
7 | 8 | 00changelog.i |
|
8 | 9 | journal.dirstate |
|
10 | requires | |
|
11 | store | |
|
12 | ||
|
13 | .hg/store: | |
|
14 | 00changelog.i |
@@ -6,6 +6,6 b' hg --cwd a ci -A -m a' | |||
|
6 | 6 | hg clone a b |
|
7 | 7 | echo b > b/b |
|
8 | 8 | hg --cwd b ci -A -m b |
|
9 | chmod 100 a/.hg | |
|
9 | chmod 100 a/.hg/store | |
|
10 | 10 | hg --cwd b push ../a |
|
11 | chmod 700 a/.hg | |
|
11 | chmod 700 a/.hg/store |
@@ -61,6 +61,6 b' HGMERGE=merge hg merge --debug' | |||
|
61 | 61 | |
|
62 | 62 | cat test.txt | sed "s% .*%%" |
|
63 | 63 | |
|
64 | hg debugindex .hg/data/test.txt.i | |
|
64 | hg debugindex .hg/store/data/test.txt.i | |
|
65 | 65 | |
|
66 | 66 | hg log |
@@ -43,7 +43,7 b' def opener(*args):' | |||
|
43 | 43 | return singlebyteread(f) |
|
44 | 44 | return wrapper |
|
45 | 45 | |
|
46 | cl = changelog.changelog(opener('.hg')) | |
|
46 | cl = changelog.changelog(opener('.hg/store')) | |
|
47 | 47 | print cl.count(), 'revisions:' |
|
48 | 48 | for r in xrange(cl.count()): |
|
49 | 49 | print short(cl.node(r)) |
@@ -5,11 +5,11 b' echo foo > a' | |||
|
5 | 5 | hg add a |
|
6 | 6 | hg commit -m "1" -d "1000000 0" |
|
7 | 7 | hg verify |
|
8 | chmod -r .hg/data/a.i | |
|
8 | chmod -r .hg/store/data/a.i | |
|
9 | 9 | hg verify 2>/dev/null || echo verify failed |
|
10 | chmod +r .hg/data/a.i | |
|
10 | chmod +r .hg/store/data/a.i | |
|
11 | 11 | hg verify 2>/dev/null || echo verify failed |
|
12 | chmod -w .hg/data/a.i | |
|
12 | chmod -w .hg/store/data/a.i | |
|
13 | 13 | echo barber > a |
|
14 | 14 | hg commit -m "2" -d "1000000 0" 2>/dev/null || echo commit failed |
|
15 | 15 |
@@ -7,13 +7,13 b' echo foo > b' | |||
|
7 | 7 | hg add b |
|
8 | 8 | hg ci -m "b" -d "1000000 0" |
|
9 | 9 | |
|
10 | chmod -w .hg | |
|
10 | chmod -w .hg/store | |
|
11 | 11 | |
|
12 | 12 | cd .. |
|
13 | 13 | |
|
14 | 14 | hg clone a b |
|
15 | 15 | |
|
16 | chmod +w a/.hg # let test clean up | |
|
16 | chmod +w a/.hg/store # let test clean up | |
|
17 | 17 | |
|
18 | 18 | cd b |
|
19 | 19 | hg verify |
@@ -41,11 +41,11 b' hg commit -m "1.3m"' | |||
|
41 | 41 | hg update -C 3 |
|
42 | 42 | hg mv afile anotherfile |
|
43 | 43 | hg commit -m "0.3m" |
|
44 | hg debugindex .hg/data/afile.i | |
|
45 | hg debugindex .hg/data/adifferentfile.i | |
|
46 | hg debugindex .hg/data/anotherfile.i | |
|
47 | hg debugindex .hg/data/fred.i | |
|
48 | hg debugindex .hg/00manifest.i | |
|
44 | hg debugindex .hg/store/data/afile.i | |
|
45 | hg debugindex .hg/store/data/adifferentfile.i | |
|
46 | hg debugindex .hg/store/data/anotherfile.i | |
|
47 | hg debugindex .hg/store/data/fred.i | |
|
48 | hg debugindex .hg/store/00manifest.i | |
|
49 | 49 | hg verify |
|
50 | 50 | cd .. |
|
51 | 51 | for i in 0 1 2 3 4 5 6 7 8; do |
@@ -23,5 +23,5 b' hg merge -y --debug' | |||
|
23 | 23 | hg status -AC |
|
24 | 24 | cat b |
|
25 | 25 | hg ci -m "merge" -d "0 0" |
|
26 | hg debugindex .hg/data/b.i | |
|
26 | hg debugindex .hg/store/data/b.i | |
|
27 | 27 | hg debugrename b No newline at end of file |
@@ -28,7 +28,8 b' echo "# creating \'remote\'"' | |||
|
28 | 28 | hg init remote |
|
29 | 29 | cd remote |
|
30 | 30 | echo this > foo |
|
31 | hg ci -A -m "init" -d "1000000 0" foo | |
|
31 | echo this > fooO | |
|
32 | hg ci -A -m "init" -d "1000000 0" foo fooO | |
|
32 | 33 | echo '[server]' > .hg/hgrc |
|
33 | 34 | echo 'uncompressed = True' >> .hg/hgrc |
|
34 | 35 | echo '[hooks]' >> .hg/hgrc |
@@ -66,11 +66,11 b' hg commit -m "1.3m"' | |||
|
66 | 66 | hg update -C 3 |
|
67 | 67 | hg mv afile anotherfile |
|
68 | 68 | hg commit -m "0.3m" |
|
69 | hg debugindex .hg/data/afile.i | |
|
70 | hg debugindex .hg/data/adifferentfile.i | |
|
71 | hg debugindex .hg/data/anotherfile.i | |
|
72 | hg debugindex .hg/data/fred.i | |
|
73 | hg debugindex .hg/00manifest.i | |
|
69 | hg debugindex .hg/store/data/afile.i | |
|
70 | hg debugindex .hg/store/data/adifferentfile.i | |
|
71 | hg debugindex .hg/store/data/anotherfile.i | |
|
72 | hg debugindex .hg/store/data/fred.i | |
|
73 | hg debugindex .hg/store/00manifest.i | |
|
74 | 74 | hg verify |
|
75 | 75 | cd .. |
|
76 | 76 |
@@ -11,20 +11,20 b' checking changesets' | |||
|
11 | 11 | checking manifests |
|
12 | 12 | crosschecking files in changesets and manifests |
|
13 | 13 | checking files |
|
14 |
|
|
|
14 | 2 files, 1 changesets, 2 total revisions | |
|
15 | 15 | # clone remote via pull |
|
16 | 16 | requesting all changes |
|
17 | 17 | adding changesets |
|
18 | 18 | adding manifests |
|
19 | 19 | adding file changes |
|
20 |
added 1 changesets with |
|
|
21 |
|
|
|
20 | added 1 changesets with 2 changes to 2 files | |
|
21 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
22 | 22 | # verify |
|
23 | 23 | checking changesets |
|
24 | 24 | checking manifests |
|
25 | 25 | crosschecking files in changesets and manifests |
|
26 | 26 | checking files |
|
27 |
|
|
|
27 | 2 files, 1 changesets, 2 total revisions | |
|
28 | 28 | # empty default pull |
|
29 | 29 | default = ssh://user@dummy/remote |
|
30 | 30 | pulling from ssh://user@dummy/remote |
@@ -34,7 +34,7 b' no changes found' | |||
|
34 | 34 | # updating rc |
|
35 | 35 | # find outgoing |
|
36 | 36 | searching for changes |
|
37 |
changeset: 1: |
|
|
37 | changeset: 1:572896fe480d | |
|
38 | 38 | tag: tip |
|
39 | 39 | user: test |
|
40 | 40 | date: Mon Jan 12 13:46:40 1970 +0000 |
@@ -42,7 +42,7 b' summary: add' | |||
|
42 | 42 | |
|
43 | 43 | # find incoming on the remote side |
|
44 | 44 | searching for changes |
|
45 |
changeset: 1: |
|
|
45 | changeset: 1:572896fe480d | |
|
46 | 46 | tag: tip |
|
47 | 47 | user: test |
|
48 | 48 | date: Mon Jan 12 13:46:40 1970 +0000 |
@@ -56,7 +56,7 b' remote: adding manifests' | |||
|
56 | 56 | remote: adding file changes |
|
57 | 57 | remote: added 1 changesets with 1 changes to 1 files |
|
58 | 58 | # check remote tip |
|
59 |
changeset: 1: |
|
|
59 | changeset: 1:572896fe480d | |
|
60 | 60 | tag: tip |
|
61 | 61 | user: test |
|
62 | 62 | date: Mon Jan 12 13:46:40 1970 +0000 |
@@ -66,7 +66,7 b' checking changesets' | |||
|
66 | 66 | checking manifests |
|
67 | 67 | crosschecking files in changesets and manifests |
|
68 | 68 | checking files |
|
69 |
|
|
|
69 | 2 files, 2 changesets, 3 total revisions | |
|
70 | 70 | bleah |
|
71 | 71 | # push should succeed |
|
72 | 72 | pushing to ssh://user@dummy/remote |
General Comments 0
You need to be logged in to leave comments.
Login now