Show More
@@ -48,8 +48,7 b' elif url.startswith("remote:http"):' | |||||
48 |
|
48 | |||
49 | out.write("%s hook: " % name) |
|
49 | out.write("%s hook: " % name) | |
50 | for v in env: |
|
50 | for v in env: | |
51 | out.write("%s=%s " % |
|
51 | out.write("%s=%s " % (v, os.environ[v])) | |
52 | (v, os.environ[v].replace(os.environ["HGTMP"], '$HGTMP'))) |
|
|||
53 | out.write("\n") |
|
52 | out.write("\n") | |
54 | out.close() |
|
53 | out.close() | |
55 |
|
54 |
@@ -85,17 +85,18 b' import URL' | |||||
85 |
|
85 | |||
86 | $ echo foo >> foo |
|
86 | $ echo foo >> foo | |
87 | $ hg add foo |
|
87 | $ hg add foo | |
88 |
$ hg diff > |
|
88 | $ hg diff > url.diff | |
89 | $ hg revert --no-backup foo |
|
89 | $ hg revert --no-backup foo | |
90 | $ rm foo |
|
90 | $ rm foo | |
91 |
|
91 | |||
92 | Under unix: file:///foobar/blah |
|
92 | Under unix: file:///foobar/blah | |
93 | Under windows: file:///c:/foobar/blah |
|
93 | Under windows: file:///c:/foobar/blah | |
94 |
|
94 | |||
95 |
$ patchurl=` |
|
95 | $ patchurl=`pwd | tr '\\\\' /`/url.diff | |
96 | $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl" |
|
96 | $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl" | |
97 | $ hg qimport file://"$patchurl" |
|
97 | $ hg qimport file://"$patchurl" | |
98 | adding url.diff to series file |
|
98 | adding url.diff to series file | |
|
99 | $ rm url.diff | |||
99 | $ hg qun |
|
100 | $ hg qun | |
100 | url.diff |
|
101 | url.diff | |
101 |
|
102 |
@@ -141,7 +141,7 b' pull (minimal config)' | |||||
141 | (run 'hg update' to get a working copy) |
|
141 | (run 'hg update' to get a working copy) | |
142 | $ cat <<EOF >> $HGRCPATH |
|
142 | $ cat <<EOF >> $HGRCPATH | |
143 | > [notify] |
|
143 | > [notify] | |
144 |
> config = |
|
144 | > config = `pwd`/.notify.conf | |
145 | > domain = test.com |
|
145 | > domain = test.com | |
146 | > strip = 3 |
|
146 | > strip = 3 | |
147 | > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip} |
|
147 | > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip} | |
@@ -156,7 +156,7 b' fail for config file is missing' | |||||
156 | rolling back to revision 0 (undo pull) |
|
156 | rolling back to revision 0 (undo pull) | |
157 | $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed |
|
157 | $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed | |
158 | pull failed |
|
158 | pull failed | |
159 |
$ touch " |
|
159 | $ touch ".notify.conf" | |
160 |
|
160 | |||
161 | pull |
|
161 | pull | |
162 |
|
162 |
@@ -74,17 +74,18 b' rollback by pretxncommit saves commit me' | |||||
74 | precious commit message |
|
74 | precious commit message | |
75 | $ echo '% same thing, but run $EDITOR' |
|
75 | $ echo '% same thing, but run $EDITOR' | |
76 | % same thing, but run $EDITOR |
|
76 | % same thing, but run $EDITOR | |
77 |
$ cat > |
|
77 | $ cat > editor << '__EOF__' | |
78 | > #!/bin/sh |
|
78 | > #!/bin/sh | |
79 | > echo "another precious commit message" > "$1" |
|
79 | > echo "another precious commit message" > "$1" | |
80 | > __EOF__ |
|
80 | > __EOF__ | |
81 |
|
|
81 | $ chmod +x editor | |
82 |
|
|
82 | $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1 | |
83 | > cat .hg/last-message.txt |
|
|||
84 | transaction abort! |
|
83 | transaction abort! | |
85 | rollback completed |
|
84 | rollback completed | |
86 | note: commit message saved in .hg/last-message.txt |
|
85 | note: commit message saved in .hg/last-message.txt | |
87 | abort: pretxncommit hook exited with status * (glob) |
|
86 | abort: pretxncommit hook exited with status * (glob) | |
|
87 | [255] | |||
|
88 | $ cat .hg/last-message.txt | |||
88 | another precious commit message |
|
89 | another precious commit message | |
89 |
|
90 | |||
90 | .hg/last-message.txt: |
|
91 | .hg/last-message.txt: |
@@ -52,7 +52,7 b' repo not found error' | |||||
52 |
|
52 | |||
53 | non-existent absolute path |
|
53 | non-existent absolute path | |
54 |
|
54 | |||
55 |
$ hg clone -e "python ./dummyssh" ssh://user@dummy// |
|
55 | $ hg clone -e "python ./dummyssh" ssh://user@dummy//`pwd`/nonexistent local | |
56 | remote: abort: There is no Mercurial repository here (.hg not found)! |
|
56 | remote: abort: There is no Mercurial repository here (.hg not found)! | |
57 | abort: no suitable response from remote hg! |
|
57 | abort: no suitable response from remote hg! | |
58 | [255] |
|
58 | [255] |
@@ -186,13 +186,13 b' tag and branch using same name' | |||||
186 |
|
186 | |||
187 | test custom commit messages |
|
187 | test custom commit messages | |
188 |
|
188 | |||
189 |
$ cat > |
|
189 | $ cat > editor << '__EOF__' | |
190 | > #!/bin/sh |
|
190 | > #!/bin/sh | |
191 | > echo "custom tag message" > "$1" |
|
191 | > echo "custom tag message" > "$1" | |
192 | > echo "second line" >> "$1" |
|
192 | > echo "second line" >> "$1" | |
193 | > __EOF__ |
|
193 | > __EOF__ | |
194 |
$ chmod +x |
|
194 | $ chmod +x editor | |
195 |
$ |
|
195 | $ HGEDITOR="'`pwd`'"/editor hg tag custom-tag -e | |
196 | $ hg log -l1 --template "{desc}\n" |
|
196 | $ hg log -l1 --template "{desc}\n" | |
197 | custom tag message |
|
197 | custom tag message | |
198 | second line |
|
198 | second line |
General Comments 0
You need to be logged in to leave comments.
Login now