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