Show More
@@ -0,0 +1,38 b'' | |||||
|
1 | #header# | |||
|
2 | <title>#repo|escape#: shortlog</title> | |||
|
3 | <link rel="alternate" type="application/rss+xml" | |||
|
4 | href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#"> | |||
|
5 | </head> | |||
|
6 | <body> | |||
|
7 | ||||
|
8 | <div class="buttons"> | |||
|
9 | <a href="?cl=#rev#">changelog</a> | |||
|
10 | <a href="?cmd=tags">tags</a> | |||
|
11 | <a href="?mf=#manifest|short#;path=/">manifest</a> | |||
|
12 | #archives%archiveentry# | |||
|
13 | <a type="application/rss+xml" href="?style=rss">rss</a> | |||
|
14 | </div> | |||
|
15 | ||||
|
16 | <h2>shortlog for #repo|escape#</h2> | |||
|
17 | ||||
|
18 | <form action="#"> | |||
|
19 | <p> | |||
|
20 | <label for="search1">search:</label> | |||
|
21 | <input type="hidden" name="cmd" value="changelog"> | |||
|
22 | <input name="rev" id="search1" type="text" size="30"> | |||
|
23 | navigate: <small class="navigate">#changenav%navshortentry#</small> | |||
|
24 | </p> | |||
|
25 | </form> | |||
|
26 | ||||
|
27 | #entries%shortlogentry# | |||
|
28 | ||||
|
29 | <form action="#"> | |||
|
30 | <p> | |||
|
31 | <label for="search2">search:</label> | |||
|
32 | <input type="hidden" name="cmd" value="changelog"> | |||
|
33 | <input name="rev" id="search2" type="text" size="30"> | |||
|
34 | navigate: <small class="navigate">#changenav%navshortentry#</small> | |||
|
35 | </p> | |||
|
36 | </form> | |||
|
37 | ||||
|
38 | #footer# |
@@ -0,0 +1,7 b'' | |||||
|
1 | <table class="slogEntry parity#parity#"> | |||
|
2 | <tr> | |||
|
3 | <td class="age">#date|age#</td> | |||
|
4 | <td class="author">#author|obfuscate#</td> | |||
|
5 | <td class="node"><a href="?cs=#node|short#">#desc|strip|firstline|escape#</a></td> | |||
|
6 | </tr> | |||
|
7 | </table> |
@@ -0,0 +1,51 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | # Environement setup for MQ | |||
|
4 | export HGRCPATH=./hgrc | |||
|
5 | echo "[extensions]" >> ./hgrc | |||
|
6 | echo "mq=" >> ./hgrc | |||
|
7 | ||||
|
8 | #Repo init | |||
|
9 | hg init | |||
|
10 | hg qinit | |||
|
11 | ||||
|
12 | hg qnew -m "First commit message" first-patch | |||
|
13 | echo aaaa > file | |||
|
14 | hg add file | |||
|
15 | hg qrefresh | |||
|
16 | echo ======================= | |||
|
17 | echo "Should display 'First commit message'" | |||
|
18 | hg log -l1 -v | sed -n '/description/,$p' | |||
|
19 | echo | |||
|
20 | ||||
|
21 | # Testing changing message with -m | |||
|
22 | echo bbbb > file | |||
|
23 | hg qrefresh -m "Second commit message" | |||
|
24 | echo ======================= | |||
|
25 | echo "Should display 'Second commit message'" | |||
|
26 | hg log -l1 -v | sed -n '/description/,$p' | |||
|
27 | echo | |||
|
28 | ||||
|
29 | ||||
|
30 | # Testing changing message with -l | |||
|
31 | echo "Third commit message" > logfile | |||
|
32 | echo " This is the 3rd log message" >> logfile | |||
|
33 | echo bbbb > file | |||
|
34 | hg qrefresh -l logfile | |||
|
35 | echo ======================= | |||
|
36 | echo "Should display 'Third commit message\n This is the 3rd log message'" | |||
|
37 | hg log -l1 -v | sed -n '/description/,$p' | |||
|
38 | echo | |||
|
39 | ||||
|
40 | # Testing changing message with -l- | |||
|
41 | hg qnew -m "First commit message" second-patch | |||
|
42 | echo aaaa > file2 | |||
|
43 | hg add file2 | |||
|
44 | echo bbbb > file2 | |||
|
45 | (echo "Fifth commit message" | |||
|
46 | echo " This is the 5th log message" >> logfile) |\ | |||
|
47 | hg qrefresh -l- | |||
|
48 | echo ======================= | |||
|
49 | echo "Should display 'Fifth commit message\n This is the 5th log message'" | |||
|
50 | hg log -l1 -v | sed -n '/description/,$p' | |||
|
51 | echo |
@@ -0,0 +1,29 b'' | |||||
|
1 | ======================= | |||
|
2 | Should display 'First commit message' | |||
|
3 | description: | |||
|
4 | First commit message | |||
|
5 | ||||
|
6 | ||||
|
7 | ||||
|
8 | ======================= | |||
|
9 | Should display 'Second commit message' | |||
|
10 | description: | |||
|
11 | Second commit message | |||
|
12 | ||||
|
13 | ||||
|
14 | ||||
|
15 | ======================= | |||
|
16 | Should display 'Third commit message\n This is the 3rd log message' | |||
|
17 | description: | |||
|
18 | Third commit message | |||
|
19 | This is the 3rd log message | |||
|
20 | ||||
|
21 | ||||
|
22 | ||||
|
23 | ======================= | |||
|
24 | Should display 'Fifth commit message\n This is the 5th log message' | |||
|
25 | description: | |||
|
26 | Fifth commit message | |||
|
27 | ||||
|
28 | ||||
|
29 |
@@ -2,7 +2,7 b' include hg' | |||||
2 | recursive-include mercurial *.py |
|
2 | recursive-include mercurial *.py | |
3 | include hgweb.cgi hgwebdir.cgi |
|
3 | include hgweb.cgi hgwebdir.cgi | |
4 | include hgeditor rewrite-log |
|
4 | include hgeditor rewrite-log | |
5 |
include tests/README tests/ |
|
5 | include tests/README tests/*.py tests/test-*[a-z0-9] tests/*.out | |
6 | prune tests/*.err |
|
6 | prune tests/*.err | |
7 | include *.txt |
|
7 | include *.txt | |
8 | include templates/map templates/map-*[a-z0-9] |
|
8 | include templates/map templates/map-*[a-z0-9] | |
@@ -10,8 +10,10 b' include templates/*.tmpl' | |||||
10 | include templates/static/* |
|
10 | include templates/static/* | |
11 | include doc/README doc/Makefile doc/gendoc.py doc/*.txt doc/*.html doc/*.[0-9] |
|
11 | include doc/README doc/Makefile doc/gendoc.py doc/*.txt doc/*.html doc/*.[0-9] | |
12 | recursive-include contrib * |
|
12 | recursive-include contrib * | |
|
13 | recursive-include hgext * | |||
13 | include README |
|
14 | include README | |
14 | include CONTRIBUTORS |
|
15 | include CONTRIBUTORS | |
15 | include COPYING |
|
16 | include COPYING | |
16 | include Makefile |
|
17 | include Makefile | |
17 | include MANIFEST.in |
|
18 | include MANIFEST.in | |
|
19 | prune *.elc *.orig *.rej *~ *.o *.so *.pyc *.swp *.prof |
@@ -288,7 +288,7 b' complete -o bashdefault -o default -F _h' | |||||
288 |
|
288 | |||
289 | _hg_cmd_qdelete() |
|
289 | _hg_cmd_qdelete() | |
290 | { |
|
290 | { | |
291 |
_hg_ext_mq_patchlist q |
|
291 | _hg_ext_mq_patchlist qunapplied | |
292 | } |
|
292 | } | |
293 |
|
293 | |||
294 | _hg_cmd_qsave() |
|
294 | _hg_cmd_qsave() | |
@@ -313,6 +313,11 b' complete -o bashdefault -o default -F _h' | |||||
313 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) |
|
313 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) | |
314 | } |
|
314 | } | |
315 |
|
315 | |||
|
316 | _hg_cmd_export() | |||
|
317 | { | |||
|
318 | _hg_ext_mq_patchlist qapplied | |||
|
319 | } | |||
|
320 | ||||
316 |
|
321 | |||
317 | # hbisect |
|
322 | # hbisect | |
318 | _hg_cmd_bisect() |
|
323 | _hg_cmd_bisect() |
@@ -5,13 +5,73 b'' | |||||
5 | <meta http-equiv="Content-Style-Type" content="text/css"> |
|
5 | <meta http-equiv="Content-Style-Type" content="text/css"> | |
6 | <title></title> |
|
6 | <title></title> | |
7 | <style type="text/css"> |
|
7 | <style type="text/css"> | |
8 |
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 1 |
|
8 | p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica} | |
9 | p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} |
|
9 | p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} | |
10 | </style> |
|
10 | </style> | |
11 | </head> |
|
11 | </head> | |
12 | <body> |
|
12 | <body> | |
13 | <p class="p1">This is a prepackaged release of <a href="http://www.selenic.com/mercurial">Mercurial</a> for Mac OS X.</p> |
|
13 | <p class="p1">This is a prepackaged release of <a href="http://www.selenic.com/mercurial">Mercurial</a> for Mac OS X.</p> | |
14 | <p class="p2"><br></p> |
|
14 | <p class="p2"><br></p> | |
15 | <p class="p1">It is based on Mercurial 0.9.</p> |
|
15 | <p class="p1">It is based on Mercurial 0.9.1</p> | |
|
16 | <br> | |||
|
17 | <pre> | |||
|
18 | Release Notes | |||
|
19 | ------------- | |||
|
20 | ||||
|
21 | 2006-07-24 v0.9.1 | |||
|
22 | ||||
|
23 | Major changes between Mercurial 0.9 and 0.9.1: | |||
|
24 | ||||
|
25 | New features: | |||
|
26 | - You can now configure your 'hgweb' server to let remote users | |||
|
27 | 'push' changes over http. | |||
|
28 | - You can now 'import' a patch in a mail message by saving the mail | |||
|
29 | message, and importing it. This works for patches sent either | |||
|
30 | inline or as attachments. | |||
|
31 | - The 'diff' command now accepts '-rA:B' syntax as a synonym for | |||
|
32 | '-r A -r B', and adds '-b' and '-B' options. | |||
|
33 | ||||
|
34 | New contributions and extensions: | |||
|
35 | - The 'acl' extension lets you lock down parts of a repository | |||
|
36 | against incoming changes | |||
|
37 | - The 'extdiff' extension lets you run your favourite graphical | |||
|
38 | change viewer | |||
|
39 | - Comprehensive integration with the 'vim' editor | |||
|
40 | - A restricted shell for 'ssh'-hosted repositories | |||
|
41 | - An importer for 'darcs' repositories | |||
|
42 | ||||
|
43 | New hooks added: | |||
|
44 | - 'preupdate' is run before an update or merge in the working | |||
|
45 | directory. | |||
|
46 | - 'update' is run after an update or merge in the working | |||
|
47 | directory. | |||
|
48 | ||||
|
49 | Behaviour changes: | |||
|
50 | - NOTE: Mercurial as installed by the Windows binary | |||
|
51 | installer no longer performs automatic line-ending conversion for | |||
|
52 | Unix/Linux compatibility. To re-enable this feature, edit your | |||
|
53 | 'mercurial.ini' file after you upgrade. | |||
|
54 | - The Windows binary installer now automatically adds 'hg' to your | |||
|
55 | '%PATH%'. | |||
|
56 | - The 'backout' command now runs an editor by default, to let you | |||
|
57 | modify the commit message for a backed-out changeset. | |||
|
58 | - An earlier problem with parsing of tags has been fixed. | |||
|
59 | This makes tag parsing slower but more reliable. | |||
|
60 | ||||
|
61 | Memory usage and performance improvements: | |||
|
62 | - The 'remove' command has been rewritten to be hundreds of times | |||
|
63 | faster in large repositories. | |||
|
64 | - It is now possible to 'clone' a repository very quickly over a | |||
|
65 | LAN, if the server is configured to allow it. See the new 'server' | |||
|
66 | section in the 'hgrc' documentation. | |||
|
67 | ||||
|
68 | Other changes of note: | |||
|
69 | - Mercurial will now print help for an extension if you type 'hg | |||
|
70 | help EXT_NAME'. | |||
|
71 | - The usual array of bug fixes and documentation improvements. | |||
|
72 | - The integrated web server is now more WSGI-compliant. | |||
|
73 | - Work has begun to solidify Mercurial's API for use by third-party | |||
|
74 | packages. | |||
|
75 | </pre> | |||
16 | </body> |
|
76 | </body> | |
17 | </html> |
|
77 | </html> |
@@ -380,7 +380,9 b" Handle frickin' frackin' gratuitous even" | |||||
380 | (save-excursion |
|
380 | (save-excursion | |
381 | (while hg-prev-buffer |
|
381 | (while hg-prev-buffer | |
382 | (set-buffer hg-prev-buffer)) |
|
382 | (set-buffer hg-prev-buffer)) | |
383 | (let ((path (or default (buffer-file-name) default-directory))) |
|
383 | (let ((path (or default | |
|
384 | (buffer-file-name) | |||
|
385 | (expand-file-name default-directory)))) | |||
384 | (if (or (not path) current-prefix-arg) |
|
386 | (if (or (not path) current-prefix-arg) | |
385 | (expand-file-name |
|
387 | (expand-file-name | |
386 | (eval (list* 'read-file-name |
|
388 | (eval (list* 'read-file-name | |
@@ -972,7 +974,8 b' With a prefix argument, prompt for the p' | |||||
972 | (cd (hg-root path))) |
|
974 | (cd (hg-root path))) | |
973 | (when update |
|
975 | (when update | |
974 | (with-current-buffer buf |
|
976 | (with-current-buffer buf | |
975 |
|
|
977 | (when (local-variable-p 'backup-inhibited) | |
|
978 | (kill-local-variable 'backup-inhibited)) | |||
976 | (hg-mode-line))))) |
|
979 | (hg-mode-line))))) | |
977 |
|
980 | |||
978 | (defun hg-incoming (&optional repo) |
|
981 | (defun hg-incoming (&optional repo) |
@@ -14,7 +14,7 b'' | |||||
14 | </head> |
|
14 | </head> | |
15 |
|
15 | |||
16 | <body> |
|
16 | <body> | |
17 | <h1>Mercurial version 0.9 for Windows</h1> |
|
17 | <h1>Mercurial version 0.9.1 for Windows</h1> | |
18 |
|
18 | |||
19 | <p>Welcome to Mercurial for Windows!</p> |
|
19 | <p>Welcome to Mercurial for Windows!</p> | |
20 |
|
20 |
@@ -4,7 +4,7 b'' | |||||
4 | [Setup] |
|
4 | [Setup] | |
5 | AppCopyright=Copyright 2005, 2006 Matt Mackall and others |
|
5 | AppCopyright=Copyright 2005, 2006 Matt Mackall and others | |
6 | AppName=Mercurial |
|
6 | AppName=Mercurial | |
7 | AppVerName=Mercurial version 0.9 |
|
7 | AppVerName=Mercurial version 0.9.1 | |
8 | InfoAfterFile=contrib/win32/postinstall.txt |
|
8 | InfoAfterFile=contrib/win32/postinstall.txt | |
9 | LicenseFile=COPYING |
|
9 | LicenseFile=COPYING | |
10 | ShowLanguageDialog=yes |
|
10 | ShowLanguageDialog=yes | |
@@ -14,10 +14,10 b' AppSupportURL=http://www.selenic.com/mer' | |||||
14 | AppUpdatesURL=http://www.selenic.com/mercurial |
|
14 | AppUpdatesURL=http://www.selenic.com/mercurial | |
15 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} |
|
15 | AppID={{4B95A5F1-EF59-4B08-BED8-C891C46121B3} | |
16 | AppContact=mercurial@selenic.com |
|
16 | AppContact=mercurial@selenic.com | |
17 | OutputBaseFilename=Mercurial-0.9 |
|
17 | OutputBaseFilename=Mercurial-0.9.1 | |
18 | DefaultDirName={sd}\Mercurial |
|
18 | DefaultDirName={sd}\Mercurial | |
19 | SourceDir=C:\hg\hg-release |
|
19 | SourceDir=C:\hg\hg-release | |
20 | VersionInfoVersion=0.9 |
|
20 | VersionInfoVersion=0.9.1 | |
21 | VersionInfoDescription=Mercurial distributed SCM |
|
21 | VersionInfoDescription=Mercurial distributed SCM | |
22 | VersionInfoCopyright=Copyright 2005, 2006 Matt Mackall and others |
|
22 | VersionInfoCopyright=Copyright 2005, 2006 Matt Mackall and others | |
23 | VersionInfoCompany=Matt Mackall and others |
|
23 | VersionInfoCompany=Matt Mackall and others |
@@ -7,6 +7,62 b' file that comes with this package.' | |||||
7 | Release Notes |
|
7 | Release Notes | |
8 | ------------- |
|
8 | ------------- | |
9 |
|
9 | |||
|
10 | 2006-07-24 v0.9.1 | |||
|
11 | ||||
|
12 | Major changes between Mercurial 0.9 and 0.9.1: | |||
|
13 | ||||
|
14 | New features: | |||
|
15 | - You can now configure your 'hgweb' server to let remote users | |||
|
16 | 'push' changes over http. | |||
|
17 | - You can now 'import' a patch in a mail message by saving the mail | |||
|
18 | message, and importing it. This works for patches sent either | |||
|
19 | inline or as attachments. | |||
|
20 | - The 'diff' command now accepts '-rA:B' syntax as a synonym for | |||
|
21 | '-r A -r B', and adds '-b' and '-B' options. | |||
|
22 | ||||
|
23 | New contributions and extensions: | |||
|
24 | - The 'acl' extension lets you lock down parts of a repository | |||
|
25 | against incoming changes | |||
|
26 | - The 'extdiff' extension lets you run your favourite graphical | |||
|
27 | change viewer | |||
|
28 | - Comprehensive integration with the 'vim' editor | |||
|
29 | - A restricted shell for 'ssh'-hosted repositories | |||
|
30 | - An importer for 'darcs' repositories | |||
|
31 | ||||
|
32 | New hooks added: | |||
|
33 | - 'preupdate' is run before an update or merge in the working | |||
|
34 | directory. | |||
|
35 | - 'update' is run after an update or merge in the working | |||
|
36 | directory. | |||
|
37 | ||||
|
38 | Behaviour changes: | |||
|
39 | - NOTE: Mercurial as installed by the Windows binary | |||
|
40 | installer no longer performs automatic line-ending conversion for | |||
|
41 | Unix/Linux compatibility. To re-enable this feature, edit your | |||
|
42 | 'mercurial.ini' file after you upgrade. | |||
|
43 | - The Windows binary installer now automatically adds 'hg' to your | |||
|
44 | '%PATH%'. | |||
|
45 | - The 'backout' command now runs an editor by default, to let you | |||
|
46 | modify the commit message for a backed-out changeset. | |||
|
47 | - An earlier problem with parsing of tags has been fixed. | |||
|
48 | This makes tag parsing slower but more reliable. | |||
|
49 | ||||
|
50 | Memory usage and performance improvements: | |||
|
51 | - The 'remove' command has been rewritten to be hundreds of times | |||
|
52 | faster in large repositories. | |||
|
53 | - It is now possible to 'clone' a repository very quickly over a | |||
|
54 | LAN, if the server is configured to allow it. See the new 'server' | |||
|
55 | section in the 'hgrc' documentation. | |||
|
56 | ||||
|
57 | Other changes of note: | |||
|
58 | - Mercurial will now print help for an extension if you type 'hg | |||
|
59 | help EXT_NAME'. | |||
|
60 | - The usual array of bug fixes and documentation improvements. | |||
|
61 | - The integrated web server is now more WSGI-compliant. | |||
|
62 | - Work has begun to solidify Mercurial's API for use by third-party | |||
|
63 | packages. | |||
|
64 | ||||
|
65 | ||||
10 | 2006-05-10 v0.9 |
|
66 | 2006-05-10 v0.9 | |
11 |
|
67 | |||
12 | * Major changes between Mercurial 0.8.1 and 0.9: |
|
68 | * Major changes between Mercurial 0.8.1 and 0.9: |
@@ -138,9 +138,17 b' email::' | |||||
138 | from;; |
|
138 | from;; | |
139 | Optional. Email address to use in "From" header and SMTP envelope |
|
139 | Optional. Email address to use in "From" header and SMTP envelope | |
140 | of outgoing messages. |
|
140 | of outgoing messages. | |
|
141 | to;; | |||
|
142 | Optional. Comma-separated list of recipients' email addresses. | |||
|
143 | cc;; | |||
|
144 | Optional. Comma-separated list of carbon copy recipients' | |||
|
145 | email addresses. | |||
|
146 | bcc;; | |||
|
147 | Optional. Comma-separated list of blind carbon copy | |||
|
148 | recipients' email addresses. Cannot be set interactively. | |||
141 | method;; |
|
149 | method;; | |
142 | Optional. Method to use to send email messages. If value is |
|
150 | Optional. Method to use to send email messages. If value is | |
143 |
"smtp" (default), use SMTP (see section "[ |
|
151 | "smtp" (default), use SMTP (see section "[smtp]" for | |
144 | configuration). Otherwise, use as name of program to run that |
|
152 | configuration). Otherwise, use as name of program to run that | |
145 | acts like sendmail (takes "-f" option for sender, list of |
|
153 | acts like sendmail (takes "-f" option for sender, list of | |
146 | recipients on command line, message on stdin). Normally, setting |
|
154 | recipients on command line, message on stdin). Normally, setting | |
@@ -194,7 +202,8 b' hooks::' | |||||
194 |
|
202 | |||
195 | changegroup;; |
|
203 | changegroup;; | |
196 | Run after a changegroup has been added via push, pull or |
|
204 | Run after a changegroup has been added via push, pull or | |
197 | unbundle. ID of the first new changeset is in $HG_NODE. |
|
205 | unbundle. ID of the first new changeset is in $HG_NODE. URL from | |
|
206 | which changes came is in $HG_URL. | |||
198 | commit;; |
|
207 | commit;; | |
199 | Run after a changeset has been created in the local repository. |
|
208 | Run after a changeset has been created in the local repository. | |
200 | ID of the newly created changeset is in $HG_NODE. Parent |
|
209 | ID of the newly created changeset is in $HG_NODE. Parent | |
@@ -202,7 +211,7 b' hooks::' | |||||
202 | incoming;; |
|
211 | incoming;; | |
203 | Run after a changeset has been pulled, pushed, or unbundled into |
|
212 | Run after a changeset has been pulled, pushed, or unbundled into | |
204 | the local repository. The ID of the newly arrived changeset is in |
|
213 | the local repository. The ID of the newly arrived changeset is in | |
205 | $HG_NODE. |
|
214 | $HG_NODE. URL that was source of changes came is in $HG_URL. | |
206 | outgoing;; |
|
215 | outgoing;; | |
207 | Run after sending changes from local repository to another. ID of |
|
216 | Run after sending changes from local repository to another. ID of | |
208 | first changeset sent is in $HG_NODE. Source of operation is in |
|
217 | first changeset sent is in $HG_NODE. Source of operation is in | |
@@ -210,7 +219,8 b' hooks::' | |||||
210 | prechangegroup;; |
|
219 | prechangegroup;; | |
211 | Run before a changegroup is added via push, pull or unbundle. |
|
220 | Run before a changegroup is added via push, pull or unbundle. | |
212 | Exit status 0 allows the changegroup to proceed. Non-zero status |
|
221 | Exit status 0 allows the changegroup to proceed. Non-zero status | |
213 | will cause the push, pull or unbundle to fail. |
|
222 | will cause the push, pull or unbundle to fail. URL from which | |
|
223 | changes will come is in $HG_URL. | |||
214 | precommit;; |
|
224 | precommit;; | |
215 | Run before starting a local commit. Exit status 0 allows the |
|
225 | Run before starting a local commit. Exit status 0 allows the | |
216 | commit to proceed. Non-zero status will cause the commit to fail. |
|
226 | commit to proceed. Non-zero status will cause the commit to fail. | |
@@ -236,7 +246,8 b' hooks::' | |||||
236 | before accepting them. Passed the ID of the first new changeset |
|
246 | before accepting them. Passed the ID of the first new changeset | |
237 | in $HG_NODE. Exit status 0 allows the transaction to commit. |
|
247 | in $HG_NODE. Exit status 0 allows the transaction to commit. | |
238 | Non-zero status will cause the transaction to be rolled back and |
|
248 | Non-zero status will cause the transaction to be rolled back and | |
239 | the push, pull or unbundle will fail. |
|
249 | the push, pull or unbundle will fail. URL that was source of | |
|
250 | changes is in $HG_URL. | |||
240 | pretxncommit;; |
|
251 | pretxncommit;; | |
241 | Run after a changeset has been created but the transaction not yet |
|
252 | Run after a changeset has been created but the transaction not yet | |
242 | committed. Changeset is visible to hook program. This lets you |
|
253 | committed. Changeset is visible to hook program. This lets you | |
@@ -440,6 +451,9 b' web::' | |||||
440 | push_ssl;; |
|
451 | push_ssl;; | |
441 | Whether to require that inbound pushes be transported over SSL to |
|
452 | Whether to require that inbound pushes be transported over SSL to | |
442 | prevent password sniffing. Default is true. |
|
453 | prevent password sniffing. Default is true. | |
|
454 | stripes;; | |||
|
455 | How many lines a "zebra stripe" should span in multiline output. | |||
|
456 | Default is 1; set to 0 to disable. | |||
443 | style;; |
|
457 | style;; | |
444 | Which template map style to use. |
|
458 | Which template map style to use. | |
445 | templates;; |
|
459 | templates;; |
@@ -22,6 +22,9 b'' | |||||
22 | # cmd.vdiff = kdiff3 |
|
22 | # cmd.vdiff = kdiff3 | |
23 | # # add new command called meld, runs meld (no need to name twice) |
|
23 | # # add new command called meld, runs meld (no need to name twice) | |
24 | # cmd.meld = |
|
24 | # cmd.meld = | |
|
25 | # # add new command called vimdiff, runs gvimdiff with DirDiff plugin | |||
|
26 | # #(see http://www.vim.org/scripts/script.php?script_id=102) | |||
|
27 | # cmd.vimdiff = LC_ALL=C gvim -f '+bdel 1 2' '+ execute "DirDiff ".argv(0)." ".argv(1)' | |||
25 | # |
|
28 | # | |
26 | # you can use -I/-X and list of file or directory names like normal |
|
29 | # you can use -I/-X and list of file or directory names like normal | |
27 | # "hg diff" command. extdiff makes snapshots of only needed files, so |
|
30 | # "hg diff" command. extdiff makes snapshots of only needed files, so |
@@ -257,7 +257,7 b' class queue:' | |||||
257 | head = self.qparents(repo) |
|
257 | head = self.qparents(repo) | |
258 |
|
258 | |||
259 | for patch in series: |
|
259 | for patch in series: | |
260 | patch = mergeq.lookup(patch) |
|
260 | patch = mergeq.lookup(patch, strict=True) | |
261 | if not patch: |
|
261 | if not patch: | |
262 | self.ui.warn("patch %s does not exist\n" % patch) |
|
262 | self.ui.warn("patch %s does not exist\n" % patch) | |
263 | return (1, None) |
|
263 | return (1, None) | |
@@ -380,7 +380,7 b' class queue:' | |||||
380 | return (err, n) |
|
380 | return (err, n) | |
381 |
|
381 | |||
382 | def delete(self, repo, patch): |
|
382 | def delete(self, repo, patch): | |
383 | patch = self.lookup(patch) |
|
383 | patch = self.lookup(patch, strict=True) | |
384 | info = self.isapplied(patch) |
|
384 | info = self.isapplied(patch) | |
385 | if info: |
|
385 | if info: | |
386 | self.ui.warn("cannot delete applied patch %s\n" % patch) |
|
386 | self.ui.warn("cannot delete applied patch %s\n" % patch) | |
@@ -418,7 +418,7 b' class queue:' | |||||
418 | commitfiles = c + a + r |
|
418 | commitfiles = c + a + r | |
419 | self.check_toppatch(repo) |
|
419 | self.check_toppatch(repo) | |
420 | wlock = repo.wlock() |
|
420 | wlock = repo.wlock() | |
421 | insert = self.series_end() |
|
421 | insert = self.full_series_end() | |
422 | if msg: |
|
422 | if msg: | |
423 | n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True, |
|
423 | n = repo.commit(commitfiles, "[mq]: %s" % msg, force=True, | |
424 | wlock=wlock) |
|
424 | wlock=wlock) | |
@@ -442,7 +442,7 b' class queue:' | |||||
442 | r = self.qrepo() |
|
442 | r = self.qrepo() | |
443 | if r: r.add([patch]) |
|
443 | if r: r.add([patch]) | |
444 | if commitfiles: |
|
444 | if commitfiles: | |
445 | self.refresh(repo, short=True) |
|
445 | self.refresh(repo, msg=None, short=True) | |
446 |
|
446 | |||
447 | def strip(self, repo, rev, update=True, backup="all", wlock=None): |
|
447 | def strip(self, repo, rev, update=True, backup="all", wlock=None): | |
448 | def limitheads(chlog, stop): |
|
448 | def limitheads(chlog, stop): | |
@@ -530,6 +530,9 b' class queue:' | |||||
530 | revnum = chlog.rev(rev) |
|
530 | revnum = chlog.rev(rev) | |
531 |
|
531 | |||
532 | if update: |
|
532 | if update: | |
|
533 | (c, a, r, d, u) = repo.changes(None, None) | |||
|
534 | if c or a or d or r: | |||
|
535 | raise util.Abort(_("Local changes found")) | |||
533 | urev = self.qparents(repo, rev) |
|
536 | urev = self.qparents(repo, rev) | |
534 | repo.update(urev, allow=False, force=True, wlock=wlock) |
|
537 | repo.update(urev, allow=False, force=True, wlock=wlock) | |
535 | repo.dirstate.write() |
|
538 | repo.dirstate.write() | |
@@ -598,25 +601,79 b' class queue:' | |||||
598 | return (i, a[0], a[1]) |
|
601 | return (i, a[0], a[1]) | |
599 | return None |
|
602 | return None | |
600 |
|
603 | |||
601 | def lookup(self, patch): |
|
604 | # if the exact patch name does not exist, we try a few | |
|
605 | # variations. If strict is passed, we try only #1 | |||
|
606 | # | |||
|
607 | # 1) a number to indicate an offset in the series file | |||
|
608 | # 2) a unique substring of the patch name was given | |||
|
609 | # 3) patchname[-+]num to indicate an offset in the series file | |||
|
610 | def lookup(self, patch, strict=False): | |||
|
611 | def partial_name(s): | |||
|
612 | count = 0 | |||
|
613 | if s in self.series: | |||
|
614 | return s | |||
|
615 | for x in self.series: | |||
|
616 | if s in x: | |||
|
617 | count += 1 | |||
|
618 | last = x | |||
|
619 | if count > 1: | |||
|
620 | return None | |||
|
621 | if count: | |||
|
622 | return last | |||
|
623 | if len(self.series) > 0 and len(self.applied) > 0: | |||
|
624 | if s == 'qtip': | |||
|
625 | return self.series[self.series_end()-1] | |||
|
626 | if s == 'qbase': | |||
|
627 | return self.series[0] | |||
|
628 | return None | |||
602 | if patch == None: |
|
629 | if patch == None: | |
603 | return None |
|
630 | return None | |
604 | if patch in self.series: |
|
631 | ||
605 | return patch |
|
632 | # we don't want to return a partial match until we make | |
|
633 | # sure the file name passed in does not exist (checked below) | |||
|
634 | res = partial_name(patch) | |||
|
635 | if res and res == patch: | |||
|
636 | return res | |||
|
637 | ||||
606 | if not os.path.isfile(os.path.join(self.path, patch)): |
|
638 | if not os.path.isfile(os.path.join(self.path, patch)): | |
607 | try: |
|
639 | try: | |
608 | sno = int(patch) |
|
640 | sno = int(patch) | |
609 | except(ValueError, OverflowError): |
|
641 | except(ValueError, OverflowError): | |
610 | self.ui.warn("patch %s not in series\n" % patch) |
|
642 | pass | |
611 |
|
|
643 | else: | |
612 |
if sno |
|
644 | if sno < len(self.series): | |
613 | self.ui.warn("patch number %d is out of range\n" % sno) |
|
645 | patch = self.series[sno] | |
614 |
|
|
646 | return patch | |
615 | patch = self.series[sno] |
|
647 | if not strict: | |
616 | else: |
|
648 | # return any partial match made above | |
617 | self.ui.warn("patch %s not in series\n" % patch) |
|
649 | if res: | |
618 | sys.exit(1) |
|
650 | return res | |
619 | return patch |
|
651 | minus = patch.rsplit('-', 1) | |
|
652 | if len(minus) > 1: | |||
|
653 | res = partial_name(minus[0]) | |||
|
654 | if res: | |||
|
655 | i = self.series.index(res) | |||
|
656 | try: | |||
|
657 | off = int(minus[1] or 1) | |||
|
658 | except(ValueError, OverflowError): | |||
|
659 | pass | |||
|
660 | else: | |||
|
661 | if i - off >= 0: | |||
|
662 | return self.series[i - off] | |||
|
663 | plus = patch.rsplit('+', 1) | |||
|
664 | if len(plus) > 1: | |||
|
665 | res = partial_name(plus[0]) | |||
|
666 | if res: | |||
|
667 | i = self.series.index(res) | |||
|
668 | try: | |||
|
669 | off = int(plus[1] or 1) | |||
|
670 | except(ValueError, OverflowError): | |||
|
671 | pass | |||
|
672 | else: | |||
|
673 | if i + off < len(self.series): | |||
|
674 | return self.series[i + off] | |||
|
675 | self.ui.warn("patch %s not in series\n" % patch) | |||
|
676 | sys.exit(1) | |||
620 |
|
677 | |||
621 | def push(self, repo, patch=None, force=False, list=False, |
|
678 | def push(self, repo, patch=None, force=False, list=False, | |
622 | mergeq=None, wlock=None): |
|
679 | mergeq=None, wlock=None): | |
@@ -654,7 +711,8 b' class queue:' | |||||
654 | self.ui.write("Now at: %s\n" % top) |
|
711 | self.ui.write("Now at: %s\n" % top) | |
655 | return ret[0] |
|
712 | return ret[0] | |
656 |
|
713 | |||
657 |
def pop(self, repo, patch=None, force=False, update=True, |
|
714 | def pop(self, repo, patch=None, force=False, update=True, all=False, | |
|
715 | wlock=None): | |||
658 | def getfile(f, rev): |
|
716 | def getfile(f, rev): | |
659 | t = repo.file(f).read(rev) |
|
717 | t = repo.file(f).read(rev) | |
660 | try: |
|
718 | try: | |
@@ -695,7 +753,17 b' class queue:' | |||||
695 | self.applied_dirty = 1; |
|
753 | self.applied_dirty = 1; | |
696 | end = len(self.applied) |
|
754 | end = len(self.applied) | |
697 | if not patch: |
|
755 | if not patch: | |
698 | info = [len(self.applied) - 1] + self.applied[-1].split(':') |
|
756 | if all: | |
|
757 | popi = 0 | |||
|
758 | else: | |||
|
759 | popi = len(self.applied) - 1 | |||
|
760 | else: | |||
|
761 | popi = info[0] + 1 | |||
|
762 | if popi >= end: | |||
|
763 | self.ui.warn("qpop: %s is already at the top\n" % patch) | |||
|
764 | return | |||
|
765 | info = [ popi ] + self.applied[popi].split(':') | |||
|
766 | ||||
699 | start = info[0] |
|
767 | start = info[0] | |
700 | rev = revlog.bin(info[1]) |
|
768 | rev = revlog.bin(info[1]) | |
701 |
|
769 | |||
@@ -739,7 +807,7 b' class queue:' | |||||
739 | qp = self.qparents(repo, top) |
|
807 | qp = self.qparents(repo, top) | |
740 | commands.dodiff(sys.stdout, self.ui, repo, qp, None, files) |
|
808 | commands.dodiff(sys.stdout, self.ui, repo, qp, None, files) | |
741 |
|
809 | |||
742 | def refresh(self, repo, short=False): |
|
810 | def refresh(self, repo, msg=None, short=False): | |
743 | if len(self.applied) == 0: |
|
811 | if len(self.applied) == 0: | |
744 | self.ui.write("No patches applied\n") |
|
812 | self.ui.write("No patches applied\n") | |
745 | return |
|
813 | return | |
@@ -822,10 +890,14 b' class queue:' | |||||
822 | repo.dirstate.update(c, 'n') |
|
890 | repo.dirstate.update(c, 'n') | |
823 | repo.dirstate.forget(forget) |
|
891 | repo.dirstate.forget(forget) | |
824 |
|
892 | |||
825 |
if not m |
|
893 | if not msg: | |
826 | message = "patch queue: %s\n" % patch |
|
894 | if not message: | |
|
895 | message = "patch queue: %s\n" % patch | |||
|
896 | else: | |||
|
897 | message = "\n".join(message) | |||
827 | else: |
|
898 | else: | |
828 |
message = |
|
899 | message = msg | |
|
900 | ||||
829 | self.strip(repo, top, update=False, backup='strip', wlock=wlock) |
|
901 | self.strip(repo, top, update=False, backup='strip', wlock=wlock) | |
830 | n = repo.commit(filelist, message, changes[1], force=1, wlock=wlock) |
|
902 | n = repo.commit(filelist, message, changes[1], force=1, wlock=wlock) | |
831 | self.applied[-1] = revlog.hex(n) + ':' + patch |
|
903 | self.applied[-1] = revlog.hex(n) + ':' + patch | |
@@ -852,6 +924,8 b' class queue:' | |||||
852 | else: |
|
924 | else: | |
853 | start = self.series.index(patch) + 1 |
|
925 | start = self.series.index(patch) + 1 | |
854 | for p in self.series[start:]: |
|
926 | for p in self.series[start:]: | |
|
927 | if self.ui.verbose: | |||
|
928 | self.ui.write("%d " % self.series.index(p)) | |||
855 | self.ui.write("%s\n" % p) |
|
929 | self.ui.write("%s\n" % p) | |
856 |
|
930 | |||
857 | def qseries(self, repo, missing=None): |
|
931 | def qseries(self, repo, missing=None): | |
@@ -974,6 +1048,15 b' class queue:' | |||||
974 | self.applied.append(revlog.hex(n) + ":" + '.hg.patches.save.line') |
|
1048 | self.applied.append(revlog.hex(n) + ":" + '.hg.patches.save.line') | |
975 | self.applied_dirty = 1 |
|
1049 | self.applied_dirty = 1 | |
976 |
|
1050 | |||
|
1051 | def full_series_end(self): | |||
|
1052 | if len(self.applied) > 0: | |||
|
1053 | (top, p) = self.applied[-1].split(':') | |||
|
1054 | end = self.find_series(p) | |||
|
1055 | if end == None: | |||
|
1056 | return len(self.full_series) | |||
|
1057 | return end + 1 | |||
|
1058 | return 0 | |||
|
1059 | ||||
977 | def series_end(self): |
|
1060 | def series_end(self): | |
978 | end = 0 |
|
1061 | end = 0 | |
979 | if len(self.applied) > 0: |
|
1062 | if len(self.applied) > 0: | |
@@ -999,8 +1082,11 b' class queue:' | |||||
999 |
|
1082 | |||
1000 | def appliedname(self, index): |
|
1083 | def appliedname(self, index): | |
1001 | p = self.applied[index] |
|
1084 | p = self.applied[index] | |
|
1085 | pname = p.split(':')[1] | |||
1002 | if not self.ui.verbose: |
|
1086 | if not self.ui.verbose: | |
1003 |
p = p |
|
1087 | p = pname | |
|
1088 | else: | |||
|
1089 | p = str(self.series.index(pname)) + " " + p | |||
1004 | return p |
|
1090 | return p | |
1005 |
|
1091 | |||
1006 | def top(self, repo): |
|
1092 | def top(self, repo): | |
@@ -1015,7 +1101,10 b' class queue:' | |||||
1015 | if end == len(self.series): |
|
1101 | if end == len(self.series): | |
1016 | self.ui.write("All patches applied\n") |
|
1102 | self.ui.write("All patches applied\n") | |
1017 | else: |
|
1103 | else: | |
1018 |
|
|
1104 | p = self.series[end] | |
|
1105 | if self.ui.verbose: | |||
|
1106 | self.ui.write("%d " % self.series.index(p)) | |||
|
1107 | self.ui.write(p + '\n') | |||
1019 |
|
1108 | |||
1020 | def prev(self, repo): |
|
1109 | def prev(self, repo): | |
1021 | if len(self.applied) > 1: |
|
1110 | if len(self.applied) > 1: | |
@@ -1055,7 +1144,7 b' class queue:' | |||||
1055 | if patch in self.series: |
|
1144 | if patch in self.series: | |
1056 | self.ui.warn("patch %s is already in the series file\n" % patch) |
|
1145 | self.ui.warn("patch %s is already in the series file\n" % patch) | |
1057 | sys.exit(1) |
|
1146 | sys.exit(1) | |
1058 | index = self.series_end() + i |
|
1147 | index = self.full_series_end() + i | |
1059 | self.full_series[index:index] = [patch] |
|
1148 | self.full_series[index:index] = [patch] | |
1060 | self.read_series(self.full_series) |
|
1149 | self.read_series(self.full_series) | |
1061 | self.ui.warn("adding %s to series file\n" % patch) |
|
1150 | self.ui.warn("adding %s to series file\n" % patch) | |
@@ -1136,14 +1225,16 b' def prev(ui, repo, **opts):' | |||||
1136 | def new(ui, repo, patch, **opts): |
|
1225 | def new(ui, repo, patch, **opts): | |
1137 | """create a new patch""" |
|
1226 | """create a new patch""" | |
1138 | q = repomap[repo] |
|
1227 | q = repomap[repo] | |
1139 | q.new(repo, patch, msg=opts['message'], force=opts['force']) |
|
1228 | message=commands.logmessage(**opts) | |
|
1229 | q.new(repo, patch, msg=message, force=opts['force']) | |||
1140 | q.save_dirty() |
|
1230 | q.save_dirty() | |
1141 | return 0 |
|
1231 | return 0 | |
1142 |
|
1232 | |||
1143 | def refresh(ui, repo, **opts): |
|
1233 | def refresh(ui, repo, **opts): | |
1144 | """update the current patch""" |
|
1234 | """update the current patch""" | |
1145 | q = repomap[repo] |
|
1235 | q = repomap[repo] | |
1146 | q.refresh(repo, short=opts['short']) |
|
1236 | message=commands.logmessage(**opts) | |
|
1237 | q.refresh(repo, msg=message, short=opts['short']) | |||
1147 | q.save_dirty() |
|
1238 | q.save_dirty() | |
1148 | return 0 |
|
1239 | return 0 | |
1149 |
|
1240 | |||
@@ -1208,9 +1299,7 b' def pop(ui, repo, patch=None, **opts):' | |||||
1208 | localupdate = False |
|
1299 | localupdate = False | |
1209 | else: |
|
1300 | else: | |
1210 | q = repomap[repo] |
|
1301 | q = repomap[repo] | |
1211 | if opts['all'] and len(q.applied) > 0: |
|
1302 | q.pop(repo, patch, force=opts['force'], update=localupdate, all=opts['all']) | |
1212 | patch = q.applied[0].split(':')[1] |
|
|||
1213 | q.pop(repo, patch, force=opts['force'], update=localupdate) |
|
|||
1214 | q.save_dirty() |
|
1303 | q.save_dirty() | |
1215 | return 0 |
|
1304 | return 0 | |
1216 |
|
1305 | |||
@@ -1226,7 +1315,8 b' def restore(ui, repo, rev, **opts):' | |||||
1226 | def save(ui, repo, **opts): |
|
1315 | def save(ui, repo, **opts): | |
1227 | """save current queue state""" |
|
1316 | """save current queue state""" | |
1228 | q = repomap[repo] |
|
1317 | q = repomap[repo] | |
1229 | ret = q.save(repo, msg=opts['message']) |
|
1318 | message=commands.logmessage(**opts) | |
|
1319 | ret = q.save(repo, msg=message) | |||
1230 | if ret: |
|
1320 | if ret: | |
1231 | return ret |
|
1321 | return ret | |
1232 | q.save_dirty() |
|
1322 | q.save_dirty() | |
@@ -1272,28 +1362,30 b' def version(ui, q=None):' | |||||
1272 |
|
1362 | |||
1273 | def reposetup(ui, repo): |
|
1363 | def reposetup(ui, repo): | |
1274 | repomap[repo] = queue(ui, repo.join("")) |
|
1364 | repomap[repo] = queue(ui, repo.join("")) | |
1275 |
old |
|
1365 | oldtags = repo.tags | |
|
1366 | ||||
|
1367 | def qtags(): | |||
|
1368 | if repo.tagscache: | |||
|
1369 | return repo.tagscache | |||
1276 |
|
1370 | |||
1277 | def qlookup(key): |
|
1371 | tagscache = oldtags() | |
1278 | try: |
|
1372 | ||
1279 | return oldlookup(key) |
|
1373 | q = repomap[repo] | |
1280 | except hg.RepoError: |
|
1374 | if len(q.applied) == 0: | |
1281 | q = repomap[repo] |
|
1375 | return tagscache | |
1282 |
|
1376 | |||
1283 | qpatchnames = { 'qtip': -1, 'qbase': 0 } |
|
1377 | mqtags = [patch.split(':') for patch in q.applied] | |
1284 | if key in qpatchnames: |
|
1378 | mqtags.append((mqtags[-1][0], 'qtip')) | |
1285 | if len(q.applied) == 0: |
|
1379 | mqtags.append((mqtags[0][0], 'qbase')) | |
1286 | self.ui.warn('No patches applied\n') |
|
1380 | for patch in mqtags: | |
1287 | raise |
|
1381 | if patch[1] in tagscache: | |
1288 | patch = q.applied[qpatchnames[key]].split(':')[0] |
|
1382 | repo.ui.warn('Tag %s overrides mq patch of the same name\n' % patch[1]) | |
1289 | return revlog.bin(patch) |
|
1383 | else: | |
|
1384 | tagscache[patch[1]] = revlog.bin(patch[0]) | |||
1290 |
|
1385 | |||
1291 | patch = q.isapplied(key) |
|
1386 | return tagscache | |
1292 | if not patch: |
|
|||
1293 | raise |
|
|||
1294 | return revlog.bin(patch[1]) |
|
|||
1295 |
|
1387 | |||
1296 | repo.lookup = qlookup |
|
1388 | repo.tags = qtags | |
1297 |
|
1389 | |||
1298 | cmdtable = { |
|
1390 | cmdtable = { | |
1299 | "qapplied": (applied, [], 'hg qapplied [PATCH]'), |
|
1391 | "qapplied": (applied, [], 'hg qapplied [PATCH]'), | |
@@ -1315,9 +1407,10 b' cmdtable = {' | |||||
1315 | 'hg qinit [-c]'), |
|
1407 | 'hg qinit [-c]'), | |
1316 | "qnew": |
|
1408 | "qnew": | |
1317 | (new, |
|
1409 | (new, | |
1318 | [('m', 'message', '', 'commit message'), |
|
1410 | [('m', 'message', '', _('use <text> as commit message')), | |
|
1411 | ('l', 'logfile', '', _('read the commit message from <file>')), | |||
1319 | ('f', 'force', None, 'force')], |
|
1412 | ('f', 'force', None, 'force')], | |
1320 | 'hg qnew [-m TEXT] [-f] PATCH'), |
|
1413 | 'hg qnew [-m TEXT] [-l FILE] [-f] PATCH'), | |
1321 | "qnext": (next, [], 'hg qnext'), |
|
1414 | "qnext": (next, [], 'hg qnext'), | |
1322 | "qprev": (prev, [], 'hg qprev'), |
|
1415 | "qprev": (prev, [], 'hg qprev'), | |
1323 | "^qpop": |
|
1416 | "^qpop": | |
@@ -1336,8 +1429,10 b' cmdtable = {' | |||||
1336 | 'hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]'), |
|
1429 | 'hg qpush [-f] [-l] [-a] [-m] [-n NAME] [PATCH | INDEX]'), | |
1337 | "^qrefresh": |
|
1430 | "^qrefresh": | |
1338 | (refresh, |
|
1431 | (refresh, | |
1339 | [('s', 'short', None, 'short refresh')], |
|
1432 | [('m', 'message', '', _('change commit message with <text>')), | |
1340 | 'hg qrefresh [-s]'), |
|
1433 | ('l', 'logfile', '', _('change commit message with <file> content')), | |
|
1434 | ('s', 'short', None, 'short refresh')], | |||
|
1435 | 'hg qrefresh [-m TEXT] [-l FILE] [-s]'), | |||
1341 | "qrestore": |
|
1436 | "qrestore": | |
1342 | (restore, |
|
1437 | (restore, | |
1343 | [('d', 'delete', None, 'delete save entry'), |
|
1438 | [('d', 'delete', None, 'delete save entry'), | |
@@ -1345,12 +1440,13 b' cmdtable = {' | |||||
1345 | 'hg qrestore [-d] [-u] REV'), |
|
1440 | 'hg qrestore [-d] [-u] REV'), | |
1346 | "qsave": |
|
1441 | "qsave": | |
1347 | (save, |
|
1442 | (save, | |
1348 | [('m', 'message', '', 'commit message'), |
|
1443 | [('m', 'message', '', _('use <text> as commit message')), | |
|
1444 | ('l', 'logfile', '', _('read the commit message from <file>')), | |||
1349 | ('c', 'copy', None, 'copy patch directory'), |
|
1445 | ('c', 'copy', None, 'copy patch directory'), | |
1350 | ('n', 'name', '', 'copy directory name'), |
|
1446 | ('n', 'name', '', 'copy directory name'), | |
1351 | ('e', 'empty', None, 'clear queue status file'), |
|
1447 | ('e', 'empty', None, 'clear queue status file'), | |
1352 | ('f', 'force', None, 'force copy')], |
|
1448 | ('f', 'force', None, 'force copy')], | |
1353 | 'hg qsave [-m TEXT] [-c] [-n NAME] [-e] [-f]'), |
|
1449 | 'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'), | |
1354 | "qseries": |
|
1450 | "qseries": | |
1355 | (series, |
|
1451 | (series, | |
1356 | [('m', 'missing', None, 'print patches not in series')], |
|
1452 | [('m', 'missing', None, 'print patches not in series')], |
@@ -38,6 +38,7 b'' | |||||
38 | # from = My Name <my@email> |
|
38 | # from = My Name <my@email> | |
39 | # to = recipient1, recipient2, ... |
|
39 | # to = recipient1, recipient2, ... | |
40 | # cc = cc1, cc2, ... |
|
40 | # cc = cc1, cc2, ... | |
|
41 | # bcc = bcc1, bcc2, ... | |||
41 |
|
42 | |||
42 | from mercurial.demandload import * |
|
43 | from mercurial.demandload import * | |
43 | demandload(globals(), '''email.MIMEMultipart email.MIMEText email.Utils |
|
44 | demandload(globals(), '''email.MIMEMultipart email.MIMEText email.Utils | |
@@ -185,6 +186,10 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
185 | to = getaddrs('to', 'To') |
|
186 | to = getaddrs('to', 'To') | |
186 | cc = getaddrs('cc', 'Cc', '') |
|
187 | cc = getaddrs('cc', 'Cc', '') | |
187 |
|
188 | |||
|
189 | bcc = opts['bcc'] or (ui.config('email', 'bcc') or | |||
|
190 | ui.config('patchbomb', 'bcc') or '').split(',') | |||
|
191 | bcc = [a.strip() for a in bcc if a.strip()] | |||
|
192 | ||||
188 | if len(patches) > 1: |
|
193 | if len(patches) > 1: | |
189 | ui.write(_('\nWrite the introductory message for the patch series.\n\n')) |
|
194 | ui.write(_('\nWrite the introductory message for the patch series.\n\n')) | |
190 |
|
195 | |||
@@ -242,7 +247,8 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
242 | start_time += 1 |
|
247 | start_time += 1 | |
243 | m['From'] = sender |
|
248 | m['From'] = sender | |
244 | m['To'] = ', '.join(to) |
|
249 | m['To'] = ', '.join(to) | |
245 | if cc: m['Cc'] = ', '.join(cc) |
|
250 | if cc: m['Cc'] = ', '.join(cc) | |
|
251 | if bcc: m['Bcc'] = ', '.join(bcc) | |||
246 | if opts['test']: |
|
252 | if opts['test']: | |
247 | ui.status('Displaying ', m['Subject'], ' ...\n') |
|
253 | ui.status('Displaying ', m['Subject'], ' ...\n') | |
248 | fp = os.popen(os.getenv('PAGER', 'more'), 'w') |
|
254 | fp = os.popen(os.getenv('PAGER', 'more'), 'w') | |
@@ -263,12 +269,13 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
263 | fp.close() |
|
269 | fp.close() | |
264 | else: |
|
270 | else: | |
265 | ui.status('Sending ', m['Subject'], ' ...\n') |
|
271 | ui.status('Sending ', m['Subject'], ' ...\n') | |
266 | mail.sendmail(sender, to + cc, m.as_string(0)) |
|
272 | mail.sendmail(sender, to + bcc + cc, m.as_string(0)) | |
267 |
|
273 | |||
268 | cmdtable = { |
|
274 | cmdtable = { | |
269 | 'email': |
|
275 | 'email': | |
270 | (patchbomb, |
|
276 | (patchbomb, | |
271 |
[(' |
|
277 | [('', 'bcc', [], 'email addresses of blind copy recipients'), | |
|
278 | ('c', 'cc', [], 'email addresses of copy recipients'), | |||
272 | ('d', 'diffstat', None, 'add diffstat output to messages'), |
|
279 | ('d', 'diffstat', None, 'add diffstat output to messages'), | |
273 | ('f', 'from', '', 'email address of sender'), |
|
280 | ('f', 'from', '', 'email address of sender'), | |
274 | ('', 'plain', None, 'omit hg patch header'), |
|
281 | ('', 'plain', None, 'omit hg patch header'), |
@@ -159,6 +159,10 b' class bundlefilelog(bundlerevlog, filelo' | |||||
159 | class bundlerepository(localrepo.localrepository): |
|
159 | class bundlerepository(localrepo.localrepository): | |
160 | def __init__(self, ui, path, bundlename): |
|
160 | def __init__(self, ui, path, bundlename): | |
161 | localrepo.localrepository.__init__(self, ui, path) |
|
161 | localrepo.localrepository.__init__(self, ui, path) | |
|
162 | ||||
|
163 | self._url = 'bundle:' + bundlename | |||
|
164 | if path: self._url += '+' + path | |||
|
165 | ||||
162 | self.tempfile = None |
|
166 | self.tempfile = None | |
163 | self.bundlefile = open(bundlename, "rb") |
|
167 | self.bundlefile = open(bundlename, "rb") | |
164 | header = self.bundlefile.read(6) |
|
168 | header = self.bundlefile.read(6) | |
@@ -208,6 +212,9 b' class bundlerepository(localrepo.localre' | |||||
208 | for c in changegroup.chunkiter(self.bundlefile): |
|
212 | for c in changegroup.chunkiter(self.bundlefile): | |
209 | pass |
|
213 | pass | |
210 |
|
214 | |||
|
215 | def url(self): | |||
|
216 | return self._url | |||
|
217 | ||||
211 | def dev(self): |
|
218 | def dev(self): | |
212 | return -1 |
|
219 | return -1 | |
213 |
|
220 |
@@ -40,6 +40,25 b' def relpath(repo, args):' | |||||
40 | return [util.normpath(os.path.join(cwd, x)) for x in args] |
|
40 | return [util.normpath(os.path.join(cwd, x)) for x in args] | |
41 | return args |
|
41 | return args | |
42 |
|
42 | |||
|
43 | def logmessage(**opts): | |||
|
44 | """ get the log message according to -m and -l option """ | |||
|
45 | message = opts['message'] | |||
|
46 | logfile = opts['logfile'] | |||
|
47 | ||||
|
48 | if message and logfile: | |||
|
49 | raise util.Abort(_('options --message and --logfile are mutually ' | |||
|
50 | 'exclusive')) | |||
|
51 | if not message and logfile: | |||
|
52 | try: | |||
|
53 | if logfile == '-': | |||
|
54 | message = sys.stdin.read() | |||
|
55 | else: | |||
|
56 | message = open(logfile).read() | |||
|
57 | except IOError, inst: | |||
|
58 | raise util.Abort(_("can't read commit message '%s': %s") % | |||
|
59 | (logfile, inst.strerror)) | |||
|
60 | return message | |||
|
61 | ||||
43 | def matchpats(repo, pats=[], opts={}, head=''): |
|
62 | def matchpats(repo, pats=[], opts={}, head=''): | |
44 | cwd = repo.getcwd() |
|
63 | cwd = repo.getcwd() | |
45 | if not pats and cwd: |
|
64 | if not pats and cwd: | |
@@ -989,21 +1008,7 b' def commit(ui, repo, *pats, **opts):' | |||||
989 | If no commit message is specified, the editor configured in your hgrc |
|
1008 | If no commit message is specified, the editor configured in your hgrc | |
990 | or in the EDITOR environment variable is started to enter a message. |
|
1009 | or in the EDITOR environment variable is started to enter a message. | |
991 | """ |
|
1010 | """ | |
992 |
message = opts |
|
1011 | message = logmessage(**opts) | |
993 | logfile = opts['logfile'] |
|
|||
994 |
|
||||
995 | if message and logfile: |
|
|||
996 | raise util.Abort(_('options --message and --logfile are mutually ' |
|
|||
997 | 'exclusive')) |
|
|||
998 | if not message and logfile: |
|
|||
999 | try: |
|
|||
1000 | if logfile == '-': |
|
|||
1001 | message = sys.stdin.read() |
|
|||
1002 | else: |
|
|||
1003 | message = open(logfile).read() |
|
|||
1004 | except IOError, inst: |
|
|||
1005 | raise util.Abort(_("can't read commit message '%s': %s") % |
|
|||
1006 | (logfile, inst.strerror)) |
|
|||
1007 |
|
1012 | |||
1008 | if opts['addremove']: |
|
1013 | if opts['addremove']: | |
1009 | addremove_lock(ui, repo, pats, opts) |
|
1014 | addremove_lock(ui, repo, pats, opts) | |
@@ -2763,7 +2768,8 b' def unbundle(ui, repo, fname, **opts):' | |||||
2763 | raise util.Abort(_("%s: unknown bundle compression type") |
|
2768 | raise util.Abort(_("%s: unknown bundle compression type") | |
2764 | % fname) |
|
2769 | % fname) | |
2765 | gen = generator(util.filechunkiter(f, 4096)) |
|
2770 | gen = generator(util.filechunkiter(f, 4096)) | |
2766 |
modheads = repo.addchangegroup(util.chunkbuffer(gen), 'unbundle' |
|
2771 | modheads = repo.addchangegroup(util.chunkbuffer(gen), 'unbundle', | |
|
2772 | 'bundle:' + fname) | |||
2767 | return postincoming(ui, repo, modheads, opts['update']) |
|
2773 | return postincoming(ui, repo, modheads, opts['update']) | |
2768 |
|
2774 | |||
2769 | def undo(ui, repo): |
|
2775 | def undo(ui, repo): |
@@ -344,6 +344,10 b' class dirstate(object):' | |||||
344 | # directly by this function, but might be modified by your statmatch call. |
|
344 | # directly by this function, but might be modified by your statmatch call. | |
345 | # |
|
345 | # | |
346 | def walkhelper(self, files, statmatch, dc, badmatch=None): |
|
346 | def walkhelper(self, files, statmatch, dc, badmatch=None): | |
|
347 | # self.root may end with a path separator when self.root == '/' | |||
|
348 | common_prefix_len = len(self.root) | |||
|
349 | if not self.root.endswith('/'): | |||
|
350 | common_prefix_len += 1 | |||
347 | # recursion free walker, faster than os.walk. |
|
351 | # recursion free walker, faster than os.walk. | |
348 | def findfiles(s): |
|
352 | def findfiles(s): | |
349 | work = [s] |
|
353 | work = [s] | |
@@ -352,7 +356,7 b' class dirstate(object):' | |||||
352 | names = os.listdir(top) |
|
356 | names = os.listdir(top) | |
353 | names.sort() |
|
357 | names.sort() | |
354 | # nd is the top of the repository dir tree |
|
358 | # nd is the top of the repository dir tree | |
355 |
nd = util.normpath(top[len |
|
359 | nd = util.normpath(top[common_prefix_len:]) | |
356 | if nd == '.': |
|
360 | if nd == '.': | |
357 | nd = '' |
|
361 | nd = '' | |
358 | else: |
|
362 | else: |
@@ -37,6 +37,7 b' class hgweb(object):' | |||||
37 | self.mtime = -1 |
|
37 | self.mtime = -1 | |
38 | self.reponame = name |
|
38 | self.reponame = name | |
39 | self.archives = 'zip', 'gz', 'bz2' |
|
39 | self.archives = 'zip', 'gz', 'bz2' | |
|
40 | self.stripecount = 1 | |||
40 | self.templatepath = self.repo.ui.config("web", "templates", |
|
41 | self.templatepath = self.repo.ui.config("web", "templates", | |
41 | templater.templatepath()) |
|
42 | templater.templatepath()) | |
42 |
|
43 | |||
@@ -46,6 +47,8 b' class hgweb(object):' | |||||
46 | self.mtime = mtime |
|
47 | self.mtime = mtime | |
47 | self.repo = hg.repository(self.repo.ui, self.repo.root) |
|
48 | self.repo = hg.repository(self.repo.ui, self.repo.root) | |
48 | self.maxchanges = int(self.repo.ui.config("web", "maxchanges", 10)) |
|
49 | self.maxchanges = int(self.repo.ui.config("web", "maxchanges", 10)) | |
|
50 | self.stripecount = int(self.repo.ui.config("web", "stripes", 1)) | |||
|
51 | self.maxshortchanges = int(self.repo.ui.config("web", "maxshortchanges", 60)) | |||
49 | self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10)) |
|
52 | self.maxfiles = int(self.repo.ui.config("web", "maxfiles", 10)) | |
50 | self.allowpull = self.repo.ui.configbool("web", "allowpull", True) |
|
53 | self.allowpull = self.repo.ui.configbool("web", "allowpull", True) | |
51 |
|
54 | |||
@@ -158,7 +161,7 b' class hgweb(object):' | |||||
158 | ignorewsamount=ignorewsamount, |
|
161 | ignorewsamount=ignorewsamount, | |
159 | ignoreblanklines=ignoreblanklines), f, tn) |
|
162 | ignoreblanklines=ignoreblanklines), f, tn) | |
160 |
|
163 | |||
161 | def changelog(self, pos): |
|
164 | def changelog(self, pos, shortlog=False): | |
162 | def changenav(**map): |
|
165 | def changenav(**map): | |
163 | def seq(factor, maxchanges=None): |
|
166 | def seq(factor, maxchanges=None): | |
164 | if maxchanges: |
|
167 | if maxchanges: | |
@@ -173,8 +176,9 b' class hgweb(object):' | |||||
173 |
|
176 | |||
174 | l = [] |
|
177 | l = [] | |
175 | last = 0 |
|
178 | last = 0 | |
176 | for f in seq(1, self.maxchanges): |
|
179 | maxchanges = shortlog and self.maxshortchanges or self.maxchanges | |
177 |
|
|
180 | for f in seq(1, maxchanges): | |
|
181 | if f < maxchanges or f <= last: | |||
178 | continue |
|
182 | continue | |
179 | if f > count: |
|
183 | if f > count: | |
180 | break |
|
184 | break | |
@@ -219,14 +223,15 b' class hgweb(object):' | |||||
219 | for e in l: |
|
223 | for e in l: | |
220 | yield e |
|
224 | yield e | |
221 |
|
225 | |||
|
226 | maxchanges = shortlog and self.maxshortchanges or self.maxchanges | |||
222 | cl = self.repo.changelog |
|
227 | cl = self.repo.changelog | |
223 | mf = cl.read(cl.tip())[0] |
|
228 | mf = cl.read(cl.tip())[0] | |
224 | count = cl.count() |
|
229 | count = cl.count() | |
225 |
start = max(0, pos - |
|
230 | start = max(0, pos - maxchanges + 1) | |
226 |
end = min(count, start + |
|
231 | end = min(count, start + maxchanges) | |
227 | pos = end - 1 |
|
232 | pos = end - 1 | |
228 |
|
233 | |||
229 | yield self.t('changelog', |
|
234 | yield self.t(shortlog and 'shortlog' or 'changelog', | |
230 | changenav=changenav, |
|
235 | changenav=changenav, | |
231 | manifest=hex(mf), |
|
236 | manifest=hex(mf), | |
232 | rev=pos, changesets=count, entries=changelist, |
|
237 | rev=pos, changesets=count, entries=changelist, | |
@@ -265,7 +270,7 b' class hgweb(object):' | |||||
265 | hn = hex(n) |
|
270 | hn = hex(n) | |
266 |
|
271 | |||
267 | yield self.t('searchentry', |
|
272 | yield self.t('searchentry', | |
268 |
parity=count |
|
273 | parity=self.stripes(count), | |
269 | author=changes[1], |
|
274 | author=changes[1], | |
270 | parent=self.siblings(cl.parents(n), cl.rev), |
|
275 | parent=self.siblings(cl.parents(n), cl.rev), | |
271 | child=self.siblings(cl.children(n), cl.rev), |
|
276 | child=self.siblings(cl.children(n), cl.rev), | |
@@ -376,7 +381,7 b' class hgweb(object):' | |||||
376 | for l, t in enumerate(text.splitlines(1)): |
|
381 | for l, t in enumerate(text.splitlines(1)): | |
377 | yield {"line": t, |
|
382 | yield {"line": t, | |
378 | "linenumber": "% 6d" % (l + 1), |
|
383 | "linenumber": "% 6d" % (l + 1), | |
379 |
"parity": l |
|
384 | "parity": self.stripes(l)} | |
380 |
|
385 | |||
381 | yield self.t("filerevision", |
|
386 | yield self.t("filerevision", | |
382 | file=f, |
|
387 | file=f, | |
@@ -409,7 +414,7 b' class hgweb(object):' | |||||
409 | mfn = cs[0] |
|
414 | mfn = cs[0] | |
410 |
|
415 | |||
411 | def annotate(**map): |
|
416 | def annotate(**map): | |
412 |
parity = |
|
417 | parity = 0 | |
413 | last = None |
|
418 | last = None | |
414 | for r, l in fl.annotate(n): |
|
419 | for r, l in fl.annotate(n): | |
415 | try: |
|
420 | try: | |
@@ -489,10 +494,10 b' class hgweb(object):' | |||||
489 | yield {"file": full, |
|
494 | yield {"file": full, | |
490 | "manifest": mnode, |
|
495 | "manifest": mnode, | |
491 | "filenode": hex(fnode), |
|
496 | "filenode": hex(fnode), | |
492 | "parity": parity, |
|
497 | "parity": self.stripes(parity), | |
493 | "basename": f, |
|
498 | "basename": f, | |
494 | "permissions": mff[full]} |
|
499 | "permissions": mff[full]} | |
495 |
parity = 1 |
|
500 | parity += 1 | |
496 |
|
501 | |||
497 | def dirlist(**map): |
|
502 | def dirlist(**map): | |
498 | parity = 0 |
|
503 | parity = 0 | |
@@ -503,11 +508,11 b' class hgweb(object):' | |||||
503 | if fnode: |
|
508 | if fnode: | |
504 | continue |
|
509 | continue | |
505 |
|
510 | |||
506 | yield {"parity": parity, |
|
511 | yield {"parity": self.stripes(parity), | |
507 | "path": os.path.join(path, f), |
|
512 | "path": os.path.join(path, f), | |
508 | "manifest": mnode, |
|
513 | "manifest": mnode, | |
509 | "basename": f[:-1]} |
|
514 | "basename": f[:-1]} | |
510 |
parity = 1 |
|
515 | parity += 1 | |
511 |
|
516 | |||
512 | yield self.t("manifest", |
|
517 | yield self.t("manifest", | |
513 | manifest=mnode, |
|
518 | manifest=mnode, | |
@@ -530,12 +535,12 b' class hgweb(object):' | |||||
530 | parity = 0 |
|
535 | parity = 0 | |
531 | for k,n in i: |
|
536 | for k,n in i: | |
532 | if notip and k == "tip": continue |
|
537 | if notip and k == "tip": continue | |
533 | yield {"parity": parity, |
|
538 | yield {"parity": self.stripes(parity), | |
534 | "tag": k, |
|
539 | "tag": k, | |
535 | "tagmanifest": hex(cl.read(n)[0]), |
|
540 | "tagmanifest": hex(cl.read(n)[0]), | |
536 | "date": cl.read(n)[2], |
|
541 | "date": cl.read(n)[2], | |
537 | "node": hex(n)} |
|
542 | "node": hex(n)} | |
538 |
parity = 1 |
|
543 | parity += 1 | |
539 |
|
544 | |||
540 | yield self.t("tags", |
|
545 | yield self.t("tags", | |
541 | manifest=hex(mf), |
|
546 | manifest=hex(mf), | |
@@ -565,12 +570,12 b' class hgweb(object):' | |||||
565 | t = c[2] |
|
570 | t = c[2] | |
566 |
|
571 | |||
567 | yield self.t("tagentry", |
|
572 | yield self.t("tagentry", | |
568 | parity = parity, |
|
573 | parity = self.stripes(parity), | |
569 | tag = k, |
|
574 | tag = k, | |
570 | node = hex(n), |
|
575 | node = hex(n), | |
571 | date = t, |
|
576 | date = t, | |
572 | tagmanifest = hex(m)) |
|
577 | tagmanifest = hex(m)) | |
573 |
parity = 1 |
|
578 | parity += 1 | |
574 |
|
579 | |||
575 | def changelist(**map): |
|
580 | def changelist(**map): | |
576 | parity = 0 |
|
581 | parity = 0 | |
@@ -609,7 +614,8 b' class hgweb(object):' | |||||
609 | lastchange = (0, 0), # FIXME |
|
614 | lastchange = (0, 0), # FIXME | |
610 | manifest = hex(mf), |
|
615 | manifest = hex(mf), | |
611 | tags = tagentries, |
|
616 | tags = tagentries, | |
612 |
shortlog = changelist |
|
617 | shortlog = changelist, | |
|
618 | archives=self.archivelist("tip")) | |||
613 |
|
619 | |||
614 | def filediff(self, file, changeset): |
|
620 | def filediff(self, file, changeset): | |
615 | cl = self.repo.changelog |
|
621 | cl = self.repo.changelog | |
@@ -689,6 +695,7 b' class hgweb(object):' | |||||
689 | def expand_form(form): |
|
695 | def expand_form(form): | |
690 | shortcuts = { |
|
696 | shortcuts = { | |
691 | 'cl': [('cmd', ['changelog']), ('rev', None)], |
|
697 | 'cl': [('cmd', ['changelog']), ('rev', None)], | |
|
698 | 'sl': [('cmd', ['shortlog']), ('rev', None)], | |||
692 | 'cs': [('cmd', ['changeset']), ('node', None)], |
|
699 | 'cs': [('cmd', ['changeset']), ('node', None)], | |
693 | 'f': [('cmd', ['file']), ('filenode', None)], |
|
700 | 'f': [('cmd', ['file']), ('filenode', None)], | |
694 | 'fl': [('cmd', ['filelog']), ('filenode', None)], |
|
701 | 'fl': [('cmd', ['filelog']), ('filenode', None)], | |
@@ -752,6 +759,13 b' class hgweb(object):' | |||||
752 | else: |
|
759 | else: | |
753 | req.write(self.t("error")) |
|
760 | req.write(self.t("error")) | |
754 |
|
761 | |||
|
762 | def stripes(self, parity): | |||
|
763 | "make horizontal stripes for easier reading" | |||
|
764 | if self.stripecount: | |||
|
765 | return (1 + parity / self.stripecount) & 1 | |||
|
766 | else: | |||
|
767 | return 0 | |||
|
768 | ||||
755 | def do_changelog(self, req): |
|
769 | def do_changelog(self, req): | |
756 | hi = self.repo.changelog.count() - 1 |
|
770 | hi = self.repo.changelog.count() - 1 | |
757 | if req.form.has_key('rev'): |
|
771 | if req.form.has_key('rev'): | |
@@ -764,6 +778,18 b' class hgweb(object):' | |||||
764 |
|
778 | |||
765 | req.write(self.changelog(hi)) |
|
779 | req.write(self.changelog(hi)) | |
766 |
|
780 | |||
|
781 | def do_shortlog(self, req): | |||
|
782 | hi = self.repo.changelog.count() - 1 | |||
|
783 | if req.form.has_key('rev'): | |||
|
784 | hi = req.form['rev'][0] | |||
|
785 | try: | |||
|
786 | hi = self.repo.changelog.rev(self.repo.lookup(hi)) | |||
|
787 | except hg.RepoError: | |||
|
788 | req.write(self.search(hi)) # XXX redirect to 404 page? | |||
|
789 | return | |||
|
790 | ||||
|
791 | req.write(self.changelog(hi, shortlog = True)) | |||
|
792 | ||||
767 | def do_changeset(self, req): |
|
793 | def do_changeset(self, req): | |
768 | req.write(self.changeset(req.form['node'][0])) |
|
794 | req.write(self.changeset(req.form['node'][0])) | |
769 |
|
795 | |||
@@ -895,9 +921,13 b' class hgweb(object):' | |||||
895 | # require ssl by default, auth info cannot be sniffed and |
|
921 | # require ssl by default, auth info cannot be sniffed and | |
896 | # replayed |
|
922 | # replayed | |
897 | ssl_req = self.repo.ui.configbool('web', 'push_ssl', True) |
|
923 | ssl_req = self.repo.ui.configbool('web', 'push_ssl', True) | |
898 | if ssl_req and not req.env.get('HTTPS'): |
|
924 | if ssl_req: | |
899 | bail(_('ssl required\n')) |
|
925 | if not req.env.get('HTTPS'): | |
900 | return |
|
926 | bail(_('ssl required\n')) | |
|
927 | return | |||
|
928 | proto = 'https' | |||
|
929 | else: | |||
|
930 | proto = 'http' | |||
901 |
|
931 | |||
902 | # do not allow push unless explicitly allowed |
|
932 | # do not allow push unless explicitly allowed | |
903 | if not self.check_perm(req, 'push', False): |
|
933 | if not self.check_perm(req, 'push', False): | |
@@ -943,7 +973,9 b' class hgweb(object):' | |||||
943 | sys.stdout = cStringIO.StringIO() |
|
973 | sys.stdout = cStringIO.StringIO() | |
944 |
|
974 | |||
945 | try: |
|
975 | try: | |
946 | ret = self.repo.addchangegroup(fp, 'serve') |
|
976 | url = 'remote:%s:%s' % (proto, | |
|
977 | req.env.get('REMOTE_HOST', '')) | |||
|
978 | ret = self.repo.addchangegroup(fp, 'serve', url) | |||
947 | finally: |
|
979 | finally: | |
948 | val = sys.stdout.getvalue() |
|
980 | val = sys.stdout.getvalue() | |
949 | sys.stdout = old_stdout |
|
981 | sys.stdout = old_stdout |
@@ -115,6 +115,7 b' else:' | |||||
115 |
|
115 | |||
116 | class httprepository(remoterepository): |
|
116 | class httprepository(remoterepository): | |
117 | def __init__(self, ui, path): |
|
117 | def __init__(self, ui, path): | |
|
118 | self.path = path | |||
118 | self.caps = None |
|
119 | self.caps = None | |
119 | scheme, netloc, urlpath, query, frag = urlparse.urlsplit(path) |
|
120 | scheme, netloc, urlpath, query, frag = urlparse.urlsplit(path) | |
120 | if query or frag: |
|
121 | if query or frag: | |
@@ -124,8 +125,8 b' class httprepository(remoterepository):' | |||||
124 | host, port, user, passwd = netlocsplit(netloc) |
|
125 | host, port, user, passwd = netlocsplit(netloc) | |
125 |
|
126 | |||
126 | # urllib cannot handle URLs with embedded user or passwd |
|
127 | # urllib cannot handle URLs with embedded user or passwd | |
127 | self.url = urlparse.urlunsplit((scheme, netlocunsplit(host, port), |
|
128 | self._url = urlparse.urlunsplit((scheme, netlocunsplit(host, port), | |
128 | urlpath, '', '')) |
|
129 | urlpath, '', '')) | |
129 | self.ui = ui |
|
130 | self.ui = ui | |
130 |
|
131 | |||
131 | proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy') |
|
132 | proxyurl = ui.config("http_proxy", "host") or os.getenv('http_proxy') | |
@@ -189,6 +190,9 b' class httprepository(remoterepository):' | |||||
189 | opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] |
|
190 | opener.addheaders = [('User-agent', 'mercurial/proto-1.0')] | |
190 | urllib2.install_opener(opener) |
|
191 | urllib2.install_opener(opener) | |
191 |
|
192 | |||
|
193 | def url(self): | |||
|
194 | return self.path | |||
|
195 | ||||
192 | # look up capabilities only when needed |
|
196 | # look up capabilities only when needed | |
193 |
|
197 | |||
194 | def get_caps(self): |
|
198 | def get_caps(self): | |
@@ -213,7 +217,7 b' class httprepository(remoterepository):' | |||||
213 | q = {"cmd": cmd} |
|
217 | q = {"cmd": cmd} | |
214 | q.update(args) |
|
218 | q.update(args) | |
215 | qs = urllib.urlencode(q) |
|
219 | qs = urllib.urlencode(q) | |
216 | cu = "%s?%s" % (self.url, qs) |
|
220 | cu = "%s?%s" % (self._url, qs) | |
217 | try: |
|
221 | try: | |
218 | resp = urllib2.urlopen(urllib2.Request(cu, data, headers)) |
|
222 | resp = urllib2.urlopen(urllib2.Request(cu, data, headers)) | |
219 | except urllib2.HTTPError, inst: |
|
223 | except urllib2.HTTPError, inst: | |
@@ -234,13 +238,13 b' class httprepository(remoterepository):' | |||||
234 | not proto.startswith('text/plain') and \ |
|
238 | not proto.startswith('text/plain') and \ | |
235 | not proto.startswith('application/hg-changegroup'): |
|
239 | not proto.startswith('application/hg-changegroup'): | |
236 | raise hg.RepoError(_("'%s' does not appear to be an hg repository") % |
|
240 | raise hg.RepoError(_("'%s' does not appear to be an hg repository") % | |
237 | self.url) |
|
241 | self._url) | |
238 |
|
242 | |||
239 | if proto.startswith('application/mercurial'): |
|
243 | if proto.startswith('application/mercurial'): | |
240 | version = proto[22:] |
|
244 | version = proto[22:] | |
241 | if float(version) > 0.1: |
|
245 | if float(version) > 0.1: | |
242 | raise hg.RepoError(_("'%s' uses newer protocol %s") % |
|
246 | raise hg.RepoError(_("'%s' uses newer protocol %s") % | |
243 | (self.url, version)) |
|
247 | (self._url, version)) | |
244 |
|
248 | |||
245 | return resp |
|
249 | return resp | |
246 |
|
250 |
@@ -83,6 +83,9 b' class localrepository(repo.repository):' | |||||
83 |
|
83 | |||
84 | self.dirstate = dirstate.dirstate(self.opener, self.ui, self.root) |
|
84 | self.dirstate = dirstate.dirstate(self.opener, self.ui, self.root) | |
85 |
|
85 | |||
|
86 | def url(self): | |||
|
87 | return 'file:' + self.root | |||
|
88 | ||||
86 | def hook(self, name, throw=False, **args): |
|
89 | def hook(self, name, throw=False, **args): | |
87 | def callhook(hname, funcname): |
|
90 | def callhook(hname, funcname): | |
88 | '''call python hook. hook is callable object, looked up as |
|
91 | '''call python hook. hook is callable object, looked up as | |
@@ -1185,7 +1188,7 b' class localrepository(repo.repository):' | |||||
1185 | cg = remote.changegroup(fetch, 'pull') |
|
1188 | cg = remote.changegroup(fetch, 'pull') | |
1186 | else: |
|
1189 | else: | |
1187 | cg = remote.changegroupsubset(fetch, heads, 'pull') |
|
1190 | cg = remote.changegroupsubset(fetch, heads, 'pull') | |
1188 | return self.addchangegroup(cg, 'pull') |
|
1191 | return self.addchangegroup(cg, 'pull', remote.url()) | |
1189 |
|
1192 | |||
1190 | def push(self, remote, force=False, revs=None): |
|
1193 | def push(self, remote, force=False, revs=None): | |
1191 | # there are two ways to push to remote repo: |
|
1194 | # there are two ways to push to remote repo: | |
@@ -1241,7 +1244,7 b' class localrepository(repo.repository):' | |||||
1241 | ret = self.prepush(remote, force, revs) |
|
1244 | ret = self.prepush(remote, force, revs) | |
1242 | if ret[0] is not None: |
|
1245 | if ret[0] is not None: | |
1243 | cg, remote_heads = ret |
|
1246 | cg, remote_heads = ret | |
1244 | return remote.addchangegroup(cg, 'push') |
|
1247 | return remote.addchangegroup(cg, 'push', self.url()) | |
1245 | return ret[1] |
|
1248 | return ret[1] | |
1246 |
|
1249 | |||
1247 | def push_unbundle(self, remote, force, revs): |
|
1250 | def push_unbundle(self, remote, force, revs): | |
@@ -1594,7 +1597,7 b' class localrepository(repo.repository):' | |||||
1594 |
|
1597 | |||
1595 | return util.chunkbuffer(gengroup()) |
|
1598 | return util.chunkbuffer(gengroup()) | |
1596 |
|
1599 | |||
1597 | def addchangegroup(self, source, srctype): |
|
1600 | def addchangegroup(self, source, srctype, url): | |
1598 | """add changegroup to repo. |
|
1601 | """add changegroup to repo. | |
1599 | returns number of heads modified or added + 1.""" |
|
1602 | returns number of heads modified or added + 1.""" | |
1600 |
|
1603 | |||
@@ -1608,7 +1611,7 b' class localrepository(repo.repository):' | |||||
1608 | if not source: |
|
1611 | if not source: | |
1609 | return 0 |
|
1612 | return 0 | |
1610 |
|
1613 | |||
1611 | self.hook('prechangegroup', throw=True, source=srctype) |
|
1614 | self.hook('prechangegroup', throw=True, source=srctype, url=url) | |
1612 |
|
1615 | |||
1613 | changesets = files = revisions = 0 |
|
1616 | changesets = files = revisions = 0 | |
1614 |
|
1617 | |||
@@ -1675,17 +1678,18 b' class localrepository(repo.repository):' | |||||
1675 |
|
1678 | |||
1676 | if changesets > 0: |
|
1679 | if changesets > 0: | |
1677 | self.hook('pretxnchangegroup', throw=True, |
|
1680 | self.hook('pretxnchangegroup', throw=True, | |
1678 |
node=hex(self.changelog.node(cor+1)), source=srctype |
|
1681 | node=hex(self.changelog.node(cor+1)), source=srctype, | |
|
1682 | url=url) | |||
1679 |
|
1683 | |||
1680 | tr.close() |
|
1684 | tr.close() | |
1681 |
|
1685 | |||
1682 | if changesets > 0: |
|
1686 | if changesets > 0: | |
1683 | self.hook("changegroup", node=hex(self.changelog.node(cor+1)), |
|
1687 | self.hook("changegroup", node=hex(self.changelog.node(cor+1)), | |
1684 | source=srctype) |
|
1688 | source=srctype, url=url) | |
1685 |
|
1689 | |||
1686 | for i in range(cor + 1, cnr + 1): |
|
1690 | for i in range(cor + 1, cnr + 1): | |
1687 | self.hook("incoming", node=hex(self.changelog.node(i)), |
|
1691 | self.hook("incoming", node=hex(self.changelog.node(i)), | |
1688 | source=srctype) |
|
1692 | source=srctype, url=url) | |
1689 |
|
1693 | |||
1690 | return newheads - oldheads + 1 |
|
1694 | return newheads - oldheads + 1 | |
1691 |
|
1695 |
@@ -13,7 +13,7 b' demandload(globals(), "hg os re stat uti' | |||||
13 |
|
13 | |||
14 | class sshrepository(remoterepository): |
|
14 | class sshrepository(remoterepository): | |
15 | def __init__(self, ui, path, create=0): |
|
15 | def __init__(self, ui, path, create=0): | |
16 | self.url = path |
|
16 | self._url = path | |
17 | self.ui = ui |
|
17 | self.ui = ui | |
18 |
|
18 | |||
19 | m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) |
|
19 | m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) | |
@@ -48,6 +48,9 b' class sshrepository(remoterepository):' | |||||
48 |
|
48 | |||
49 | self.validate_repo(ui, sshcmd, args, remotecmd) |
|
49 | self.validate_repo(ui, sshcmd, args, remotecmd) | |
50 |
|
50 | |||
|
51 | def url(self): | |||
|
52 | return self._url | |||
|
53 | ||||
51 | def validate_repo(self, ui, sshcmd, args, remotecmd): |
|
54 | def validate_repo(self, ui, sshcmd, args, remotecmd): | |
52 | cmd = '%s %s "%s -R %s serve --stdio"' |
|
55 | cmd = '%s %s "%s -R %s serve --stdio"' | |
53 | cmd = cmd % (sshcmd, args, remotecmd, self.path) |
|
56 | cmd = cmd % (sshcmd, args, remotecmd, self.path) | |
@@ -180,7 +183,7 b' class sshrepository(remoterepository):' | |||||
180 | return 1 |
|
183 | return 1 | |
181 | return int(r) |
|
184 | return int(r) | |
182 |
|
185 | |||
183 | def addchangegroup(self, cg, source): |
|
186 | def addchangegroup(self, cg, source, url): | |
184 | d = self.call("addchangegroup") |
|
187 | d = self.call("addchangegroup") | |
185 | if d: |
|
188 | if d: | |
186 | raise hg.RepoError(_("push refused: %s") % d) |
|
189 | raise hg.RepoError(_("push refused: %s") % d) |
@@ -117,9 +117,13 b' class sshserver(object):' | |||||
117 | return |
|
117 | return | |
118 |
|
118 | |||
119 | self.respond("") |
|
119 | self.respond("") | |
120 | r = self.repo.addchangegroup(self.fin, 'serve') |
|
120 | r = self.repo.addchangegroup(self.fin, 'serve', self.client_url()) | |
121 | self.respond(str(r)) |
|
121 | self.respond(str(r)) | |
122 |
|
122 | |||
|
123 | def client_url(self): | |||
|
124 | client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0] | |||
|
125 | return 'remote:ssh:' + client | |||
|
126 | ||||
123 | def do_unbundle(self): |
|
127 | def do_unbundle(self): | |
124 | their_heads = self.getarg()[1].split() |
|
128 | their_heads = self.getarg()[1].split() | |
125 |
|
129 | |||
@@ -159,7 +163,7 b' class sshserver(object):' | |||||
159 | # push can proceed |
|
163 | # push can proceed | |
160 |
|
164 | |||
161 | fp.seek(0) |
|
165 | fp.seek(0) | |
162 | r = self.repo.addchangegroup(fp, 'serve') |
|
166 | r = self.repo.addchangegroup(fp, 'serve', self.client_url()) | |
163 | self.respond(str(r)) |
|
167 | self.respond(str(r)) | |
164 | finally: |
|
168 | finally: | |
165 | if not was_locked: |
|
169 | if not was_locked: |
@@ -30,6 +30,7 b' def opener(base):' | |||||
30 |
|
30 | |||
31 | class statichttprepository(localrepo.localrepository): |
|
31 | class statichttprepository(localrepo.localrepository): | |
32 | def __init__(self, ui, path): |
|
32 | def __init__(self, ui, path): | |
|
33 | self._url = path | |||
33 | self.path = (path + "/.hg") |
|
34 | self.path = (path + "/.hg") | |
34 | self.ui = ui |
|
35 | self.ui = ui | |
35 | self.revlogversion = 0 |
|
36 | self.revlogversion = 0 | |
@@ -41,6 +42,9 b' class statichttprepository(localrepo.loc' | |||||
41 | self.encodepats = None |
|
42 | self.encodepats = None | |
42 | self.decodepats = None |
|
43 | self.decodepats = None | |
43 |
|
44 | |||
|
45 | def url(self): | |||
|
46 | return 'static-' + self._url | |||
|
47 | ||||
44 | def dev(self): |
|
48 | def dev(self): | |
45 | return -1 |
|
49 | return -1 | |
46 |
|
50 |
@@ -20,7 +20,7 b'' | |||||
20 | </div> |
|
20 | </div> | |
21 |
|
21 | |||
22 | <div class="page_nav"> |
|
22 | <div class="page_nav"> | |
23 | <a href="?cmd=summary;style=gitweb">summary</a> | changelog | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/> |
|
23 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;rev=#rev#;style=gitweb">shortlog</a> | changelog | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>#archives%archiveentry#<br/> | |
24 | <br/> |
|
24 | <br/> | |
25 | #changenav%naventry#<br/> |
|
25 | #changenav%naventry#<br/> | |
26 | </div> |
|
26 | </div> |
@@ -6,6 +6,7 b'' | |||||
6 | <body> |
|
6 | <body> | |
7 |
|
7 | |||
8 | <div class="buttons"> |
|
8 | <div class="buttons"> | |
|
9 | <a href="?sl=#rev#">shortlog</a> | |||
9 | <a href="?cmd=tags">tags</a> |
|
10 | <a href="?cmd=tags">tags</a> | |
10 | <a href="?mf=#manifest|short#;path=/">manifest</a> |
|
11 | <a href="?mf=#manifest|short#;path=/">manifest</a> | |
11 | #archives%archiveentry# |
|
12 | #archives%archiveentry# |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> | changeset | <a href="?cmd=changeset;node=#node#;style=raw">raw</a> #archives%archiveentry#<br/> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;rev=#rev#;style=gitweb">shortlog</a> | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> | changeset | <a href="?cmd=changeset;node=#node#;style=raw">raw</a> #archives%archiveentry#<br/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div> |
|
16 | <div> |
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | <div class="buttons"> |
|
6 | <div class="buttons"> | |
7 | <a href="?cl=#rev#">changelog</a> |
|
7 | <a href="?cl=#rev#">changelog</a> | |
|
8 | <a href="?sl=#rev#">shortlog</a> | |||
8 | <a href="?cmd=tags">tags</a> |
|
9 | <a href="?cmd=tags">tags</a> | |
9 | <a href="?mf=#manifest|short#;path=/">manifest</a> |
|
10 | <a href="?mf=#manifest|short#;path=/">manifest</a> | |
10 | <a href="?cs=#node|short#;style=raw">raw</a> |
|
11 | <a href="?cs=#node|short#;style=raw">raw</a> |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div> |
|
16 | <div> |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | annotate | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | annotate | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div class="title">#file|escape#</div> |
|
16 | <div class="title">#file|escape#</div> |
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | <div class="buttons"> |
|
6 | <div class="buttons"> | |
7 | <a href="?cl=#rev#">changelog</a> |
|
7 | <a href="?cl=#rev#">changelog</a> | |
|
8 | <a href="?sl=#rev#">shortlog</a> | |||
8 | <a href="?tags=">tags</a> |
|
9 | <a href="?tags=">tags</a> | |
9 | <a href="?cs=#node|short#">changeset</a> |
|
10 | <a href="?cs=#node|short#">changeset</a> | |
10 | <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a> |
|
11 | <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a> |
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | <div class="buttons"> |
|
6 | <div class="buttons"> | |
7 | <a href="?cl=#rev#">changelog</a> |
|
7 | <a href="?cl=#rev#">changelog</a> | |
|
8 | <a href="?sl=#rev#">shortlog</a> | |||
8 | <a href="?tags=">tags</a> |
|
9 | <a href="?tags=">tags</a> | |
9 | <a href="?cs=#node|short#">changeset</a> |
|
10 | <a href="?cs=#node|short#">changeset</a> | |
10 | <a href="?f=#filenode|short#;file=#file|urlescape#">file</a> |
|
11 | <a href="?f=#filenode|short#;file=#file|urlescape#">file</a> |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | revisions | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?fl=#filenode|short#;file=#file|urlescape#;style=rss">rss</a><br/> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | revisions | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?fl=#filenode|short#;file=#file|urlescape#;style=rss">rss</a><br/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div class="title" >#file|urlescape#</div> |
|
16 | <div class="title" >#file|urlescape#</div> |
@@ -8,6 +8,7 b'' | |||||
8 |
|
8 | |||
9 | <div class="buttons"> |
|
9 | <div class="buttons"> | |
10 | <a href="?cl=tip">changelog</a> |
|
10 | <a href="?cl=tip">changelog</a> | |
|
11 | <a href="?sl=tip">shortlog</a> | |||
11 | <a href="?tags=">tags</a> |
|
12 | <a href="?tags=">tags</a> | |
12 | <a href="?f=#filenode|short#;file=#file|urlescape#">file</a> |
|
13 | <a href="?f=#filenode|short#;file=#file|urlescape#">file</a> | |
13 | <a href="?fa=#filenode|short#;file=#file|urlescape#">annotate</a> |
|
14 | <a href="?fa=#filenode|short#;file=#file|urlescape#">annotate</a> |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?mf=#manifest|short#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | file | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?mf=#manifest|short#;path=#path|urlescape#;style=gitweb">manifest</a> | <a href="?cmd=changeset;node=#node#;style=gitweb">changeset</a> | file | <a href="?cmd=filelog;file=#file|urlescape#;filenode=#filenode#;style=gitweb">revisions</a> | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=raw">raw</a><br/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div class="title">#file|escape#</div> |
|
16 | <div class="title">#file|escape#</div> |
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | <div class="buttons"> |
|
6 | <div class="buttons"> | |
7 | <a href="?cl=#rev#">changelog</a> |
|
7 | <a href="?cl=#rev#">changelog</a> | |
|
8 | <a href="?sl=#rev#">shortlog</a> | |||
8 | <a href="?tags=">tags</a> |
|
9 | <a href="?tags=">tags</a> | |
9 | <a href="?cs=#node|short#">changeset</a> |
|
10 | <a href="?cs=#node|short#">changeset</a> | |
10 | <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a> |
|
11 | <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a> |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | manifest | <a href="?cs=#node|short#;style=gitweb">changeset</a> #archives%archiveentry#<br/> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | manifest | <a href="?cs=#node|short#;style=gitweb">changeset</a> #archives%archiveentry#<br/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div class="title" >#path|escape#</div> |
|
16 | <div class="title" >#path|escape#</div> |
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | <div class="buttons"> |
|
6 | <div class="buttons"> | |
7 | <a href="?cl=#rev#">changelog</a> |
|
7 | <a href="?cl=#rev#">changelog</a> | |
|
8 | <a href="?sl=#rev#">shortlog</a> | |||
8 | <a href="?tags=">tags</a> |
|
9 | <a href="?tags=">tags</a> | |
9 | <a href="?cs=#node|short#">changeset</a> |
|
10 | <a href="?cs=#node|short#">changeset</a> | |
10 | #archives%archiveentry# |
|
11 | #archives%archiveentry# |
@@ -3,7 +3,10 b' header = header.tmpl' | |||||
3 | footer = footer.tmpl |
|
3 | footer = footer.tmpl | |
4 | search = search.tmpl |
|
4 | search = search.tmpl | |
5 | changelog = changelog.tmpl |
|
5 | changelog = changelog.tmpl | |
|
6 | shortlog = shortlog.tmpl | |||
|
7 | shortlogentry = shortlogentry.tmpl | |||
6 | naventry = '<a href="?cl=#rev#">#label|escape#</a> ' |
|
8 | naventry = '<a href="?cl=#rev#">#label|escape#</a> ' | |
|
9 | navshortentry = '<a href="?sl=#rev#">#label|escape#</a> ' | |||
7 | filedifflink = '<a href="?fd=#node|short#;file=#file|urlescape#">#file|escape#</a> ' |
|
10 | filedifflink = '<a href="?fd=#node|short#;file=#file|urlescape#">#file|escape#</a> ' | |
8 | filenodelink = '<a href="?f=#filenode|short#;file=#file|urlescape#">#file|escape#</a> ' |
|
11 | filenodelink = '<a href="?f=#filenode|short#;file=#file|urlescape#">#file|escape#</a> ' | |
9 | fileellipses = '...' |
|
12 | fileellipses = '...' |
@@ -1,6 +1,6 b'' | |||||
1 | #header# |
|
1 | #header# | |
2 | <div class="page_nav"> |
|
2 | <div class="page_nav"> | |
3 | <a href="?cmd=summary;style=gitweb">summary</a> | log | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/> |
|
3 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/> | |
4 | </div> |
|
4 | </div> | |
5 |
|
5 | |||
6 | <h2>searching for #query|escape#</h2> |
|
6 | <h2>searching for #query|escape#</h2> |
@@ -5,6 +5,7 b'' | |||||
5 |
|
5 | |||
6 | <div class="buttons"> |
|
6 | <div class="buttons"> | |
7 | <a href="?cl=tip">changelog</a> |
|
7 | <a href="?cl=tip">changelog</a> | |
|
8 | <a href="?sl=tip">shortlog</a> | |||
8 | <a href="?tags=">tags</a> |
|
9 | <a href="?tags=">tags</a> | |
9 | <a href="?mf=#manifest|short#;path=/">manifest</a> |
|
10 | <a href="?mf=#manifest|short#;path=/">manifest</a> | |
10 | </div> |
|
11 | </div> |
@@ -1,13 +1,32 b'' | |||||
1 | #header# |
|
1 | #header# | |
|
2 | <title>#repo|escape#: Shortlog</title> | |||
|
3 | <link rel="alternate" type="application/rss+xml" | |||
|
4 | href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#"> | |||
|
5 | </head> | |||
|
6 | <body> | |||
2 |
|
7 | |||
|
8 | <div class="page_header"> | |||
|
9 | <a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / shortlog | |||
|
10 | </div> | |||
|
11 | ||||
|
12 | <form action="#"> | |||
|
13 | <div class="search"> | |||
|
14 | <input type="hidden" name="repo" value="#repo|escape#" /> | |||
|
15 | <input type="hidden" name="style" value="gitweb" /> | |||
|
16 | <input type="hidden" name="cmd" value="changelog" /> | |||
|
17 | <input type="text" name="rev" /> | |||
|
18 | </div> | |||
|
19 | </form> | |||
|
20 | </div> | |||
3 | <div class="page_nav"> |
|
21 | <div class="page_nav"> | |
4 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">log</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a><br/> |
|
22 | <a href="?cmd=summary;style=gitweb">summary</a> | shortlog | <a href="?cmd=changelog;rev=#rev#;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>#archives%archiveentry#<br/> | |
|
23 | <br/> | |||
5 |
|
24 | |||
6 | #changenav%naventry#<br/> |
|
25 | #changenav%navshortentry#<br/> | |
7 | </div> |
|
26 | </div> | |
8 |
|
27 | |||
9 | <table cellspacing="0"> |
|
28 | <table cellspacing="0"> | |
10 | #entries# |
|
29 | #entries%shortlogentry# | |
11 | </table> |
|
30 | </table> | |
12 |
|
31 | |||
13 | #footer# |
|
32 | #footer# |
@@ -57,6 +57,12 b' pre { margin: 0; }' | |||||
57 | .logEntry th.age, .logEntry th.firstline { font-weight: bold; } |
|
57 | .logEntry th.age, .logEntry th.firstline { font-weight: bold; } | |
58 | .logEntry th.firstline { text-align: left; width: inherit; } |
|
58 | .logEntry th.firstline { text-align: left; width: inherit; } | |
59 |
|
59 | |||
|
60 | /* Shortlog entries */ | |||
|
61 | .slogEntry { width: 100%; font-size: smaller; } | |||
|
62 | .slogEntry .age { width: 7%; } | |||
|
63 | .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; } | |||
|
64 | .slogEntry td.author { width: 35%; } | |||
|
65 | ||||
60 | /* Tag entries */ |
|
66 | /* Tag entries */ | |
61 | #tagEntries { list-style: none; margin: 0; padding: 0; } |
|
67 | #tagEntries { list-style: none; margin: 0; padding: 0; } | |
62 | #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; } |
|
68 | #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; } |
@@ -9,7 +9,8 b'' | |||||
9 | <a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / summary |
|
9 | <a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / summary | |
10 | </div> |
|
10 | </div> | |
11 | <div class="page_nav"> |
|
11 | <div class="page_nav"> | |
12 |
summary | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> |
|
12 | summary | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a>#archives%archiveentry# | |
|
13 | <br/> | |||
13 | </div> |
|
14 | </div> | |
14 |
|
15 | |||
15 | <div class="title"> </div> |
|
16 | <div class="title"> </div> |
@@ -10,7 +10,7 b'' | |||||
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | <div class="page_nav"> |
|
12 | <div class="page_nav"> | |
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> |
|
13 | <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=shortlog;style=gitweb">shortlog</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | tags | <a href="?cmd=manifest;manifest=#manifest#;path=/;style=gitweb">manifest</a> | |
14 | <br/> |
|
14 | <br/> | |
15 | </div> |
|
15 | </div> | |
16 |
|
16 |
@@ -7,6 +7,7 b'' | |||||
7 |
|
7 | |||
8 | <div class="buttons"> |
|
8 | <div class="buttons"> | |
9 | <a href="?cl=tip">changelog</a> |
|
9 | <a href="?cl=tip">changelog</a> | |
|
10 | <a href="?sl=tip">shortlog</a> | |||
10 | <a href="?mf=#manifest|short#;path=/">manifest</a> |
|
11 | <a href="?mf=#manifest|short#;path=/">manifest</a> | |
11 | <a type="application/rss+xml" href="?cmd=tags;style=rss">rss</a> |
|
12 | <a type="application/rss+xml" href="?cmd=tags;style=rss">rss</a> | |
12 | </div> |
|
13 | </div> |
@@ -25,7 +25,7 b' parser = optparse.OptionParser("%prog [o' | |||||
25 | parser.add_option("-v", "--verbose", action="store_true", |
|
25 | parser.add_option("-v", "--verbose", action="store_true", | |
26 | help="output verbose messages") |
|
26 | help="output verbose messages") | |
27 | parser.add_option("-t", "--timeout", type="int", |
|
27 | parser.add_option("-t", "--timeout", type="int", | |
28 | help="output verbose messages") |
|
28 | help="kill errant tests after TIMEOUT seconds") | |
29 | parser.add_option("-c", "--cover", action="store_true", |
|
29 | parser.add_option("-c", "--cover", action="store_true", | |
30 | help="print a test coverage report") |
|
30 | help="print a test coverage report") | |
31 | parser.add_option("-s", "--cover_stdlib", action="store_true", |
|
31 | parser.add_option("-s", "--cover_stdlib", action="store_true", |
@@ -38,6 +38,8 b' rm -rf empty' | |||||
38 | hg init empty |
|
38 | hg init empty | |
39 | cd empty |
|
39 | cd empty | |
40 | hg -R bundle://../full.hg log |
|
40 | hg -R bundle://../full.hg log | |
|
41 | echo '[hooks]' >> .hg/hgrc | |||
|
42 | echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc | |||
41 | #doesn't work (yet ?) |
|
43 | #doesn't work (yet ?) | |
42 | #hg -R bundle://../full.hg verify |
|
44 | #hg -R bundle://../full.hg verify | |
43 | hg pull bundle://../full.hg |
|
45 | hg pull bundle://../full.hg |
@@ -81,6 +81,7 b' user: test' | |||||
81 | date: Mon Jan 12 13:46:40 1970 +0000 |
|
81 | date: Mon Jan 12 13:46:40 1970 +0000 | |
82 | summary: 0.0 |
|
82 | summary: 0.0 | |
83 |
|
83 | |||
|
84 | changegroup: u=bundle:../full.hg | |||
84 | pulling from bundle://../full.hg |
|
85 | pulling from bundle://../full.hg | |
85 | requesting all changes |
|
86 | requesting all changes | |
86 | adding changesets |
|
87 | adding changesets |
@@ -17,9 +17,9 b' cd ../b' | |||||
17 |
|
17 | |||
18 | # changegroup hooks can see env vars |
|
18 | # changegroup hooks can see env vars | |
19 | echo '[hooks]' > .hg/hgrc |
|
19 | echo '[hooks]' > .hg/hgrc | |
20 | echo 'prechangegroup = echo prechangegroup hook' >> .hg/hgrc |
|
20 | echo 'prechangegroup = echo prechangegroup hook: u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc | |
21 | echo 'changegroup = echo changegroup hook: n=$HG_NODE' >> .hg/hgrc |
|
21 | echo 'changegroup = echo changegroup hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc | |
22 | echo 'incoming = echo incoming hook: n=$HG_NODE' >> .hg/hgrc |
|
22 | echo 'incoming = echo incoming hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc | |
23 |
|
23 | |||
24 | # pretxncommit and commit hooks can see both parents of merge |
|
24 | # pretxncommit and commit hooks can see both parents of merge | |
25 | cd ../a |
|
25 | cd ../a |
@@ -22,11 +22,11 b' pretxncommit hook: n=4c52fb2e402287dd5dc' | |||||
22 | 3:4c52fb2e4022 |
|
22 | 3:4c52fb2e4022 | |
23 | commit hook: n=4c52fb2e402287dd5dc052090682536c8406c321 p1=1324a5531bac09b329c3845d35ae6a7526874edb p2=b702efe9688826e3a91283852b328b84dbf37bc2 |
|
23 | commit hook: n=4c52fb2e402287dd5dc052090682536c8406c321 p1=1324a5531bac09b329c3845d35ae6a7526874edb p2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
24 | commit hook b |
|
24 | commit hook b | |
25 | prechangegroup hook |
|
25 | prechangegroup hook: u=file: | |
26 | changegroup hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 |
|
26 | changegroup hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 u=file: | |
27 | incoming hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 |
|
27 | incoming hook: n=b702efe9688826e3a91283852b328b84dbf37bc2 u=file: | |
28 | incoming hook: n=1324a5531bac09b329c3845d35ae6a7526874edb |
|
28 | incoming hook: n=1324a5531bac09b329c3845d35ae6a7526874edb u=file: | |
29 | incoming hook: n=4c52fb2e402287dd5dc052090682536c8406c321 |
|
29 | incoming hook: n=4c52fb2e402287dd5dc052090682536c8406c321 u=file: | |
30 | pulling from ../a |
|
30 | pulling from ../a | |
31 | searching for changes |
|
31 | searching for changes | |
32 | adding changesets |
|
32 | adding changesets |
@@ -4,22 +4,31 b' hg init test' | |||||
4 | cd test |
|
4 | cd test | |
5 | echo foo>foo |
|
5 | echo foo>foo | |
6 | hg commit -A -d '0 0' -m 1 |
|
6 | hg commit -A -d '0 0' -m 1 | |
7 | hg --config server.uncompressed=True serve -p 20059 -d --pid-file=hg1.pid |
|
7 | hg --config server.uncompressed=True serve -p 20059 -d --pid-file=../hg1.pid | |
8 | cat hg1.pid >> $DAEMON_PIDS |
|
8 | hg serve -p 20060 -d --pid-file=../hg2.pid | |
9 | hg serve -p 20060 -d --pid-file=hg2.pid |
|
|||
10 | cat hg2.pid >> $DAEMON_PIDS |
|
|||
11 | cd .. |
|
9 | cd .. | |
|
10 | cat hg1.pid hg2.pid >> $DAEMON_PIDS | |||
12 |
|
11 | |||
13 | echo % clone via stream |
|
12 | echo % clone via stream | |
14 | http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \ |
|
13 | http_proxy= hg clone --uncompressed http://localhost:20059/ copy 2>&1 | \ | |
15 | sed -e 's/[0-9][0-9.]*/XXX/g' |
|
14 | sed -e 's/[0-9][0-9.]*/XXX/g' | |
16 | cd copy |
|
15 | hg verify -R copy | |
17 | hg verify |
|
|||
18 |
|
16 | |||
19 | echo % try to clone via stream, should use pull instead |
|
17 | echo % try to clone via stream, should use pull instead | |
20 | http_proxy= hg clone --uncompressed http://localhost:20060/ copy2 |
|
18 | http_proxy= hg clone --uncompressed http://localhost:20060/ copy2 | |
21 |
|
19 | |||
22 | echo % clone via pull |
|
20 | echo % clone via pull | |
23 | http_proxy= hg clone http://localhost:20059/ copy-pull |
|
21 | http_proxy= hg clone http://localhost:20059/ copy-pull | |
|
22 | hg verify -R copy-pull | |||
|
23 | ||||
|
24 | cd test | |||
|
25 | echo bar > bar | |||
|
26 | hg commit -A -d '1 0' -m 2 | |||
|
27 | cd .. | |||
|
28 | ||||
|
29 | echo % pull | |||
24 | cd copy-pull |
|
30 | cd copy-pull | |
25 | hg verify |
|
31 | echo '[hooks]' >> .hg/hgrc | |
|
32 | echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc | |||
|
33 | hg pull | |||
|
34 | cd .. |
@@ -28,3 +28,13 b' checking manifests' | |||||
28 | crosschecking files in changesets and manifests |
|
28 | crosschecking files in changesets and manifests | |
29 | checking files |
|
29 | checking files | |
30 | 1 files, 1 changesets, 1 total revisions |
|
30 | 1 files, 1 changesets, 1 total revisions | |
|
31 | adding bar | |||
|
32 | % pull | |||
|
33 | changegroup: u=http://localhost:20059/ | |||
|
34 | pulling from http://localhost:20059/ | |||
|
35 | searching for changes | |||
|
36 | adding changesets | |||
|
37 | adding manifests | |||
|
38 | adding file changes | |||
|
39 | added 1 changesets with 1 changes to 1 files | |||
|
40 | (run 'hg update' to get a working copy) |
@@ -36,13 +36,19 b' kill `cat hg.pid`' | |||||
36 |
|
36 | |||
37 | echo % expect success |
|
37 | echo % expect success | |
38 | echo 'allow_push = *' >> .hg/hgrc |
|
38 | echo 'allow_push = *' >> .hg/hgrc | |
|
39 | echo '[hooks]' >> .hg/hgrc | |||
|
40 | echo 'changegroup = echo changegroup: u=$HG_URL >> $HGTMP/urls' >> .hg/hgrc | |||
39 | hg serve -p 20059 -d --pid-file=hg.pid |
|
41 | hg serve -p 20059 -d --pid-file=hg.pid | |
40 | cat hg.pid >> $DAEMON_PIDS |
|
42 | cat hg.pid >> $DAEMON_PIDS | |
41 | hg --cwd ../test2 push http://localhost:20059/ |
|
43 | hg --cwd ../test2 push http://localhost:20059/ | |
42 | kill `cat hg.pid` |
|
44 | kill `cat hg.pid` | |
43 | hg rollback |
|
45 | hg rollback | |
44 |
|
46 | |||
|
47 | sed 's/\(remote:http.*\):.*/\1/' $HGTMP/urls | |||
|
48 | ||||
45 | echo % expect authorization error: all users denied |
|
49 | echo % expect authorization error: all users denied | |
|
50 | echo '[web]' > .hg/hgrc | |||
|
51 | echo 'push_ssl = false' >> .hg/hgrc | |||
46 | echo 'deny_push = *' >> .hg/hgrc |
|
52 | echo 'deny_push = *' >> .hg/hgrc | |
47 | hg serve -p 20059 -d --pid-file=hg.pid |
|
53 | hg serve -p 20059 -d --pid-file=hg.pid | |
48 | cat hg.pid >> $DAEMON_PIDS |
|
54 | cat hg.pid >> $DAEMON_PIDS |
@@ -20,6 +20,7 b' adding manifests' | |||||
20 | adding file changes |
|
20 | adding file changes | |
21 | added 1 changesets with 1 changes to 1 files |
|
21 | added 1 changesets with 1 changes to 1 files | |
22 | rolling back last transaction |
|
22 | rolling back last transaction | |
|
23 | changegroup: u=remote:http | |||
23 | % expect authorization error: all users denied |
|
24 | % expect authorization error: all users denied | |
24 | pushing to http://localhost:20059/ |
|
25 | pushing to http://localhost:20059/ | |
25 | searching for changes |
|
26 | searching for changes |
@@ -17,6 +17,8 b' if [ ! -x dummyssh ] ; then' | |||||
17 | exit -1 |
|
17 | exit -1 | |
18 | fi |
|
18 | fi | |
19 |
|
19 | |||
|
20 | SSH_CLIENT='127.0.0.1 1 2' | |||
|
21 | export SSH_CLIENT | |||
20 | echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog |
|
22 | echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog | |
21 | $2 |
|
23 | $2 | |
22 | EOF |
|
24 | EOF | |
@@ -29,6 +31,8 b' echo this > foo' | |||||
29 | hg ci -A -m "init" -d "1000000 0" foo |
|
31 | hg ci -A -m "init" -d "1000000 0" foo | |
30 | echo '[server]' > .hg/hgrc |
|
32 | echo '[server]' > .hg/hgrc | |
31 | echo 'uncompressed = True' >> .hg/hgrc |
|
33 | echo 'uncompressed = True' >> .hg/hgrc | |
|
34 | echo '[hooks]' >> .hg/hgrc | |||
|
35 | echo 'changegroup = echo changegroup in remote: u=$HG_URL >> ../dummylog' >> .hg/hgrc | |||
32 |
|
36 | |||
33 | cd .. |
|
37 | cd .. | |
34 |
|
38 | |||
@@ -46,6 +50,9 b' echo "# verify"' | |||||
46 | cd local |
|
50 | cd local | |
47 | hg verify |
|
51 | hg verify | |
48 |
|
52 | |||
|
53 | echo '[hooks]' >> .hg/hgrc | |||
|
54 | echo 'changegroup = echo changegroup in local: u=$HG_URL >> ../dummylog' >> .hg/hgrc | |||
|
55 | ||||
49 | echo "# empty default pull" |
|
56 | echo "# empty default pull" | |
50 | hg paths |
|
57 | hg paths | |
51 | hg pull -e ../dummyssh |
|
58 | hg pull -e ../dummyssh |
@@ -83,5 +83,7 b' Got arguments 1:user@dummy 2:hg -R remot' | |||||
83 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
83 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
84 | Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5: |
|
84 | Got arguments 1:user@dummy 2:hg -R local serve --stdio 3: 4: 5: | |
85 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
85 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
|
86 | changegroup in remote: u=remote:ssh:127.0.0.1 | |||
86 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
87 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
87 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: |
|
88 | Got arguments 1:user@dummy 2:hg -R remote serve --stdio 3: 4: 5: | |
|
89 | changegroup in remote: u=remote:ssh:127.0.0.1 |
@@ -37,6 +37,14 b' http_proxy= hg clone static-http://local' | |||||
37 | cd local |
|
37 | cd local | |
38 | hg verify |
|
38 | hg verify | |
39 | cat bar |
|
39 | cat bar | |
|
40 | ||||
|
41 | cd ../remote | |||
|
42 | echo baz > quux | |||
|
43 | hg commit -A -mtest2 -d '100000000 0' | |||
|
44 | ||||
|
45 | cd ../local | |||
|
46 | echo '[hooks]' >> .hg/hgrc | |||
|
47 | echo 'changegroup = echo changegroup: u=$HG_URL' >> .hg/hgrc | |||
40 | http_proxy= hg pull |
|
48 | http_proxy= hg pull | |
41 |
|
49 | |||
42 | kill $! |
|
50 | kill $! |
@@ -19,6 +19,12 b' crosschecking files in changesets and ma' | |||||
19 | checking files |
|
19 | checking files | |
20 | 1 files, 1 changesets, 1 total revisions |
|
20 | 1 files, 1 changesets, 1 total revisions | |
21 | foo |
|
21 | foo | |
|
22 | adding quux | |||
|
23 | changegroup: u=static-http://localhost:20059/remote | |||
22 | pulling from static-http://localhost:20059/remote |
|
24 | pulling from static-http://localhost:20059/remote | |
23 | searching for changes |
|
25 | searching for changes | |
24 | no changes found |
|
26 | adding changesets | |
|
27 | adding manifests | |||
|
28 | adding file changes | |||
|
29 | added 1 changesets with 1 changes to 1 files | |||
|
30 | (run 'hg update' to get a working copy) |
General Comments 0
You need to be logged in to leave comments.
Login now