##// END OF EJS Templates
make manifest friendlier...
Matt Mackall -
r3736:ad3d5b43 default
parent child Browse files
Show More
@@ -1513,25 +1513,22 b' def manifest(ui, repo, rev=None):'
1513 1513 Print a list of version controlled files for the given revision.
1514 1514
1515 1515 The manifest is the list of files being version controlled. If no revision
1516 is given then the tip is used.
1516 is given then the first parent of the working directory is used.
1517
1518 With -v flag, print file permissions. With --debug flag, print
1519 file revision hashes.
1517 1520 """
1518 if rev:
1519 try:
1520 # assume all revision numbers are for changesets
1521 n = repo.lookup(rev)
1522 change = repo.changelog.read(n)
1523 n = change[0]
1524 except hg.RepoError:
1525 n = repo.manifest.lookup(rev)
1526 else:
1527 n = repo.manifest.tip()
1528 m = repo.manifest.read(n)
1521
1522 m = repo.changectx(rev).manifest()
1529 1523 files = m.keys()
1530 1524 files.sort()
1531 1525
1532 1526 for f in files:
1533 ui.write("%40s %3s %s\n" % (hex(m[f]),
1534 m.execf(f) and "755" or "644", f))
1527 if ui.debugflag:
1528 ui.write("%40s " % hex(m[f]))
1529 if ui.verbose:
1530 ui.write("%3s " % (m.execf(f) and "755" or "644"))
1531 ui.write("%s\n" % f)
1535 1532
1536 1533 def merge(ui, repo, node=None, force=None, branch=None):
1537 1534 """Merge working directory with another revision
@@ -7,6 +7,6 b' echo a > a'
7 7 hg add a
8 8 hg commit -m test -d "1000000 0"
9 9 hg history
10 hg manifest
10 hg manifest --debug
11 11 hg cat a
12 12 hg verify
@@ -22,4 +22,4 b' hg merge 1'
22 22 # empty file that came from rev 1.
23 23 hg status
24 24 hg commit -m merge -d '1000000 0'
25 hg manifest tip
25 hg manifest --debug tip
@@ -31,13 +31,13 b' hg debugindex .hg/00changelog.i'
31 31 echo
32 32
33 33 echo 1
34 hg manifest 1
34 hg manifest --debug 1
35 35 echo 2
36 hg manifest 2
36 hg manifest --debug 2
37 37 echo 3
38 hg manifest 3
38 hg manifest --debug 3
39 39 echo 4
40 hg manifest 4
40 hg manifest --debug 4
41 41
42 42 echo
43 43
@@ -71,7 +71,7 b' echo "quux: we shouldn\'t have a merge he'
71 71 hg debugindex .hg/data/quux.i
72 72
73 73 echo "manifest entries should match tips of all files"
74 hg manifest
74 hg manifest --debug
75 75
76 76 echo "everything should be clean now"
77 77 hg status
@@ -161,7 +161,7 b' rename from foo'
161 161 rename to foo2
162 162 EOF
163 163 cat foo2
164 hg manifest | grep binary
164 hg manifest --debug | grep binary
165 165
166 166 echo % many binary files
167 167 hg import -m multibinary - <<EOF
@@ -180,4 +180,4 b' literal 5'
180 180 Mc\${NkU|\`?^000jF3jhEB
181 181
182 182 EOF
183 hg manifest | grep mbinary
183 hg manifest --debug | grep mbinary
@@ -36,11 +36,11 b' hg pull ../B1'
36 36 hg merge
37 37 hg commit -m "commit test" -d "1000000 0"
38 38 echo bar should remain deleted.
39 hg manifest
39 hg manifest --debug
40 40
41 41 cd ../B2
42 42 hg pull ../A2
43 43 hg merge
44 44 hg commit -m "commit test" -d "1000000 0"
45 45 echo bar should remain deleted.
46 hg manifest
46 hg manifest --debug
@@ -16,5 +16,5 b' cd copy'
16 16 hg verify
17 17 hg co
18 18 cat foo
19 hg manifest
19 hg manifest --debug
20 20 hg pull
@@ -6,28 +6,28 b' hg commit -m0 -d "1000000 0"'
6 6 echo this is b1 > b
7 7 hg add b
8 8 hg commit -m1 -d "1000000 0"
9 hg manifest 1
9 hg manifest --debug 1
10 10 echo this is c1 > c
11 11 hg rawcommit -p 1 -d "1000000 0" -m2 c
12 hg manifest 2
12 hg manifest --debug 2
13 13 hg -v parents
14 14 rm b
15 15 hg rawcommit -p 2 -d "1000000 0" -m3 b
16 hg manifest 3
16 hg manifest --debug 3
17 17 hg -v parents
18 18 echo this is a22 > a
19 19 hg rawcommit -p 3 -d "1000000 0" -m4 a
20 hg manifest 4
20 hg manifest --debug 4
21 21 hg -v parents
22 22 echo this is c22 > c
23 23 hg rawcommit -p 1 -d "1000000 0" -m5 c
24 hg manifest 5
24 hg manifest --debug 5
25 25 hg -v parents
26 26 # merge, but no files changed
27 27 hg rawcommit -p 4 -p 5 -d "1000000 0" -m6
28 hg manifest 6
28 hg manifest --debug 6
29 29 hg -v parents
30 30 # no changes what-so-ever
31 31 hg rawcommit -p 6 -d "1000000 0" -m7
32 hg manifest 7
32 hg manifest --debug 7
33 33 hg -v parents
@@ -21,4 +21,4 b' hg pull ../branch'
21 21 hg verify
22 22 hg co
23 23 cat foo
24 hg manifest
24 hg manifest --debug
General Comments 0
You need to be logged in to leave comments. Login now