Show More
@@ -1133,10 +1133,11 b' def commit(ui, repo, commitfunc, pats, o' | |||
|
1133 | 1133 | continue |
|
1134 | 1134 | if f not in files: |
|
1135 | 1135 | rf = repo.wjoin(f) |
|
1136 | rel = repo.pathto(f) | |
|
1136 | 1137 | try: |
|
1137 | 1138 | mode = os.lstat(rf)[stat.ST_MODE] |
|
1138 | 1139 | except OSError: |
|
1139 |
raise util.Abort(_("file %s not found!") % r |
|
|
1140 | raise util.Abort(_("file %s not found!") % rel) | |
|
1140 | 1141 | if stat.S_ISDIR(mode): |
|
1141 | 1142 | name = f + '/' |
|
1142 | 1143 | if slist is None: |
@@ -1145,12 +1146,12 b' def commit(ui, repo, commitfunc, pats, o' | |||
|
1145 | 1146 | i = bisect.bisect(slist, name) |
|
1146 | 1147 | if i >= len(slist) or not slist[i].startswith(name): |
|
1147 | 1148 | raise util.Abort(_("no match under directory %s!") |
|
1148 |
% r |
|
|
1149 | % rel) | |
|
1149 | 1150 | elif not (stat.S_ISREG(mode) or stat.S_ISLNK(mode)): |
|
1150 | 1151 | raise util.Abort(_("can't commit %s: " |
|
1151 |
"unsupported file type!") % r |
|
|
1152 | "unsupported file type!") % rel) | |
|
1152 | 1153 | elif f not in repo.dirstate: |
|
1153 |
raise util.Abort(_("file %s not tracked!") % r |
|
|
1154 | raise util.Abort(_("file %s not tracked!") % rel) | |
|
1154 | 1155 | else: |
|
1155 | 1156 | files = [] |
|
1156 | 1157 | try: |
@@ -1,10 +1,5 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | cleanpath() | |
|
4 | { | |
|
5 | sed -e "s:/.*\(/test/.*\):...\1:" | |
|
6 | } | |
|
7 | ||
|
8 | 3 | echo % commit date test |
|
9 | 4 | hg init test |
|
10 | 5 | cd test |
@@ -23,8 +18,8 b' echo % commit added file that has been d' | |||
|
23 | 18 | echo bar > bar |
|
24 | 19 | hg add bar |
|
25 | 20 | rm bar |
|
26 |
hg commit -d "1000000 0" -m commit-8 |
|
|
27 |
hg commit -d "1000000 0" -m commit-8 bar |
|
|
21 | hg commit -d "1000000 0" -m commit-8 | |
|
22 | hg commit -d "1000000 0" -m commit-8-2 bar | |
|
28 | 23 | |
|
29 | 24 | hg -q revert -a --no-backup |
|
30 | 25 | |
@@ -35,22 +30,22 b" hg -v commit -d '0 0' -m commit-9 dir" | |||
|
35 | 30 | |
|
36 | 31 | echo > dir.file |
|
37 | 32 | hg add |
|
38 |
hg commit -d '0 0' -m commit-10 dir dir.file |
|
|
33 | hg commit -d '0 0' -m commit-10 dir dir.file | |
|
39 | 34 | |
|
40 | 35 | echo >> dir/file |
|
41 | 36 | mkdir bleh |
|
42 | 37 | mkdir dir2 |
|
43 | 38 | cd bleh |
|
44 |
hg commit -d '0 0' -m commit-11 . |
|
|
45 |
hg commit -d '0 0' -m commit-12 ../dir ../dir2 |
|
|
39 | hg commit -d '0 0' -m commit-11 . | |
|
40 | hg commit -d '0 0' -m commit-12 ../dir ../dir2 | |
|
46 | 41 | hg -v commit -d '0 0' -m commit-13 ../dir |
|
47 | 42 | cd .. |
|
48 | 43 | |
|
49 |
hg commit -d '0 0' -m commit-14 does-not-exist |
|
|
44 | hg commit -d '0 0' -m commit-14 does-not-exist | |
|
50 | 45 | ln -s foo baz |
|
51 |
hg commit -d '0 0' -m commit-15 baz |
|
|
46 | hg commit -d '0 0' -m commit-15 baz | |
|
52 | 47 | touch quux |
|
53 |
hg commit -d '0 0' -m commit-16 quux |
|
|
48 | hg commit -d '0 0' -m commit-16 quux | |
|
54 | 49 | echo >> dir/file |
|
55 | 50 | hg -v commit -d '0 0' -m commit-17 dir/file |
|
56 | 51 | cd .. |
@@ -14,18 +14,18 b" abort: invalid date: 'foo bar'" | |||
|
14 | 14 | nothing changed |
|
15 | 15 | % commit added file that has been deleted |
|
16 | 16 | nothing changed |
|
17 |
abort: file |
|
|
17 | abort: file bar not found! | |
|
18 | 18 | adding dir/file |
|
19 | 19 | dir/file |
|
20 | 20 | adding dir.file |
|
21 |
abort: no match under directory |
|
|
22 |
abort: no match under directory . |
|
|
23 |
abort: no match under directory .. |
|
|
21 | abort: no match under directory dir! | |
|
22 | abort: no match under directory .! | |
|
23 | abort: no match under directory ../dir2! | |
|
24 | 24 | dir/file |
|
25 | 25 | does-not-exist: No such file or directory |
|
26 |
abort: file |
|
|
27 |
abort: file |
|
|
28 |
abort: file |
|
|
26 | abort: file does-not-exist not found! | |
|
27 | abort: file baz not tracked! | |
|
28 | abort: file quux not tracked! | |
|
29 | 29 | dir/file |
|
30 | 30 | % partial subdir commit test |
|
31 | 31 | adding bar/bar |
@@ -2,17 +2,12 b'' | |||
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" symlink || exit 80 |
|
4 | 4 | |
|
5 | cleanpath() | |
|
6 | { | |
|
7 | sed -e "s:/.*\(/test-symlink-basic/.*\):...\1:" | |
|
8 | } | |
|
9 | ||
|
10 | 5 | hg init a |
|
11 | 6 | cd a |
|
12 | 7 | ln -s nothing dangling |
|
13 |
hg commit -m 'commit symlink without adding' |
|
|
8 | hg commit -m 'commit symlink without adding' dangling | |
|
14 | 9 | hg add dangling |
|
15 |
hg commit -m 'add symlink' |
|
|
10 | hg commit -m 'add symlink' | |
|
16 | 11 | |
|
17 | 12 | hg tip -v |
|
18 | 13 | hg manifest --debug |
General Comments 0
You need to be logged in to leave comments.
Login now