Show More
@@ -0,0 +1,38 b'' | |||||
|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |||
|
5 | <meta http-equiv="Content-Style-Type" content="text/css"> | |||
|
6 | <title></title> | |||
|
7 | <style type="text/css"> | |||
|
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} | |||
|
10 | p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} | |||
|
11 | p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000fed} | |||
|
12 | span.s1 {text-decoration: underline} | |||
|
13 | span.s2 {font: 12.0px Courier} | |||
|
14 | </style> | |||
|
15 | </head> | |||
|
16 | <body> | |||
|
17 | <p class="p1"><b>Before you install</b></p> | |||
|
18 | <p class="p2"><br></p> | |||
|
19 | <p class="p3">This is <i>not</i> a stand-alone version of Mercurial.</p> | |||
|
20 | <p class="p2"><br></p> | |||
|
21 | <p class="p3">To use it, you must have the βofficial unofficialβ MacPython 2.4.1 installed.</p> | |||
|
22 | <p class="p2"><br></p> | |||
|
23 | <p class="p3">You can download MacPython 2.4.1 from here:</p> | |||
|
24 | <p class="p4"><span class="s1"><a href="http://python.org/ftp/python/2.4.1/MacPython-OSX-2.4.1-1.dmg">http://python.org/ftp/python/2.4.1/MacPython-OSX-2.4.1-1.dmg</a></span></p> | |||
|
25 | <p class="p2"><br></p> | |||
|
26 | <p class="p3">For more information on MacPython, go here:</p> | |||
|
27 | <p class="p4"><span class="s1"><a href="http://undefined.org/python/">http://undefined.org/python</a></span></p> | |||
|
28 | <p class="p2"><br></p> | |||
|
29 | <p class="p1"><b>After you install</b></p> | |||
|
30 | <p class="p2"><br></p> | |||
|
31 | <p class="p3">This package installs the <span class="s2">hg</span> executable in <span class="s2">/usr/local/bin</span>. This directory may not be in your shell's search path. Don't forget to check.</p> | |||
|
32 | <p class="p2"><br></p> | |||
|
33 | <p class="p1"><b>Reporting problems</b></p> | |||
|
34 | <p class="p2"><br></p> | |||
|
35 | <p class="p3">If you run into any problems, please file a bug online:</p> | |||
|
36 | <p class="p3"><a href="http://www.selenic.com/mercurial/bts">http://www.selenic.com/mercurial/bts</a></p> | |||
|
37 | </body> | |||
|
38 | </html> |
@@ -0,0 +1,17 b'' | |||||
|
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |||
|
2 | <html> | |||
|
3 | <head> | |||
|
4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |||
|
5 | <meta http-equiv="Content-Style-Type" content="text/css"> | |||
|
6 | <title></title> | |||
|
7 | <style type="text/css"> | |||
|
8 | p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} | |||
|
9 | p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} | |||
|
10 | </style> | |||
|
11 | </head> | |||
|
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> | |||
|
14 | <p class="p2"><br></p> | |||
|
15 | <p class="p1">It is based on Mercurial 0.8.</p> | |||
|
16 | </body> | |||
|
17 | </html> |
@@ -0,0 +1,11 b'' | |||||
|
1 | to build a new macosx binary package: | |||
|
2 | ||||
|
3 | install macpython from http://undefined.org/python/ | |||
|
4 | ||||
|
5 | install py2app from http://pythonmac.org/packages/ | |||
|
6 | ||||
|
7 | make sure /usr/local/bin is in your path | |||
|
8 | ||||
|
9 | run bdist_mpkg in top-level hg directory | |||
|
10 | ||||
|
11 | find packaged stuff in dist directory |
@@ -2,36 +2,36 b' shopt -s extglob' | |||||
2 |
|
2 | |||
3 | _hg_command_list() |
|
3 | _hg_command_list() | |
4 | { |
|
4 | { | |
5 | hg --debug help 2>/dev/null | \ |
|
5 | "$hg" --debug help 2>/dev/null | \ | |
6 | awk 'function command_line(line) { |
|
6 | awk 'function command_line(line) { | |
7 |
|
|
7 | gsub(/,/, "", line) | |
8 |
|
|
8 | gsub(/:.*/, "", line) | |
9 |
|
|
9 | split(line, aliases) | |
10 |
|
|
10 | command = aliases[1] | |
11 |
|
|
11 | delete aliases[1] | |
12 |
|
|
12 | print command | |
13 |
|
|
13 | for (i in aliases) | |
14 |
|
|
14 | if (index(command, aliases[i]) != 1) | |
15 |
|
|
15 | print aliases[i] | |
16 |
|
|
16 | } | |
17 |
|
|
17 | /^list of commands:/ {commands=1} | |
18 |
|
|
18 | commands && /^ debug/ {a[i++] = $0; next;} | |
19 |
|
|
19 | commands && /^ [^ ]/ {command_line($0)} | |
20 |
|
|
20 | /^global options:/ {exit 0} | |
21 |
|
|
21 | END {for (i in a) command_line(a[i])}' | |
22 |
|
22 | |||
23 | } |
|
23 | } | |
24 |
|
24 | |||
25 | _hg_option_list() |
|
25 | _hg_option_list() | |
26 | { |
|
26 | { | |
27 |
hg -v help $1 2> |
|
27 | "$hg" -v help $1 2>/dev/null | \ | |
28 |
|
|
28 | awk '/^ *-/ { | |
29 |
|
|
29 | for (i = 1; i <= NF; i ++) { | |
30 | if (index($i, "-") != 1) |
|
30 | if (index($i, "-") != 1) | |
31 |
|
|
31 | break; | |
32 | print $i; |
|
32 | print $i; | |
33 |
|
|
33 | } | |
34 |
|
|
34 | }' | |
35 | } |
|
35 | } | |
36 |
|
36 | |||
37 |
|
37 | |||
@@ -56,29 +56,29 b' shopt -s extglob' | |||||
56 |
|
56 | |||
57 | _hg_paths() |
|
57 | _hg_paths() | |
58 | { |
|
58 | { | |
59 |
local paths="$(hg paths 2> |
|
59 | local paths="$("$hg" paths 2>/dev/null | sed -e 's/ = .*$//')" | |
60 |
COMPREPLY=(${COMPREPLY[@]:-} $( |
|
60 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$paths' -- "$cur")) | |
61 | } |
|
61 | } | |
62 |
|
62 | |||
63 | _hg_repos() |
|
63 | _hg_repos() | |
64 | { |
|
64 | { | |
65 | local i |
|
65 | local i | |
66 |
for i in $( |
|
66 | for i in $(compgen -d -- "$cur"); do | |
67 |
|
|
67 | test ! -d "$i"/.hg || COMPREPLY=(${COMPREPLY[@]:-} "$i") | |
68 | done |
|
68 | done | |
69 | } |
|
69 | } | |
70 |
|
70 | |||
71 | _hg_status() |
|
71 | _hg_status() | |
72 | { |
|
72 | { | |
73 |
local files="$( |
|
73 | local files="$("$hg" status -n$1 . 2>/dev/null)" | |
74 |
COMPREPLY=(${COMPREPLY[@]:-} $( |
|
74 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) | |
75 | } |
|
75 | } | |
76 |
|
76 | |||
77 | _hg_tags() |
|
77 | _hg_tags() | |
78 | { |
|
78 | { | |
79 |
local tags="$(hg tags 2> |
|
79 | local tags="$("$hg" tags 2>/dev/null | | |
80 |
|
|
80 | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//')" | |
81 |
COMPREPLY=( |
|
81 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$tags' -- "$cur")) | |
82 | } |
|
82 | } | |
83 |
|
83 | |||
84 | # this is "kind of" ugly... |
|
84 | # this is "kind of" ugly... | |
@@ -87,7 +87,7 b' shopt -s extglob' | |||||
87 | local i count=0 |
|
87 | local i count=0 | |
88 | local filters="$1" |
|
88 | local filters="$1" | |
89 |
|
89 | |||
90 |
for (( |
|
90 | for ((i=1; $i<=$COMP_CWORD; i++)); do | |
91 | if [[ "${COMP_WORDS[i]}" != -* ]]; then |
|
91 | if [[ "${COMP_WORDS[i]}" != -* ]]; then | |
92 | if [[ ${COMP_WORDS[i-1]} == @($filters|$global_args) ]]; then |
|
92 | if [[ ${COMP_WORDS[i-1]} == @($filters|$global_args) ]]; then | |
93 | continue |
|
93 | continue | |
@@ -104,6 +104,7 b' shopt -s extglob' | |||||
104 | local cur prev cmd opts i |
|
104 | local cur prev cmd opts i | |
105 | # global options that receive an argument |
|
105 | # global options that receive an argument | |
106 | local global_args='--cwd|-R|--repository' |
|
106 | local global_args='--cwd|-R|--repository' | |
|
107 | local hg="$1" | |||
107 |
|
108 | |||
108 | COMPREPLY=() |
|
109 | COMPREPLY=() | |
109 | cur="$2" |
|
110 | cur="$2" | |
@@ -112,7 +113,7 b' shopt -s extglob' | |||||
112 | # searching for the command |
|
113 | # searching for the command | |
113 | # (first non-option argument that doesn't follow a global option that |
|
114 | # (first non-option argument that doesn't follow a global option that | |
114 | # receives an argument) |
|
115 | # receives an argument) | |
115 |
for (( |
|
116 | for ((i=1; $i<=$COMP_CWORD; i++)); do | |
116 | if [[ ${COMP_WORDS[i]} != -* ]]; then |
|
117 | if [[ ${COMP_WORDS[i]} != -* ]]; then | |
117 | if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then |
|
118 | if [[ ${COMP_WORDS[i-1]} != @($global_args) ]]; then | |
118 | cmd="${COMP_WORDS[i]}" |
|
119 | cmd="${COMP_WORDS[i]}" | |
@@ -124,7 +125,7 b' shopt -s extglob' | |||||
124 | if [[ "$cur" == -* ]]; then |
|
125 | if [[ "$cur" == -* ]]; then | |
125 | opts=$(_hg_option_list $cmd) |
|
126 | opts=$(_hg_option_list $cmd) | |
126 |
|
127 | |||
127 |
COMPREPLY=( |
|
128 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$opts' -- "$cur")) | |
128 | return |
|
129 | return | |
129 | fi |
|
130 | fi | |
130 |
|
131 | |||
@@ -146,7 +147,7 b' shopt -s extglob' | |||||
146 | fi |
|
147 | fi | |
147 |
|
148 | |||
148 | # canonicalize command name |
|
149 | # canonicalize command name | |
149 |
cmd=$(hg -q help "$cmd" 2> |
|
150 | cmd=$("$hg" -q help "$cmd" 2>/dev/null | sed -e 's/^hg //; s/ .*//; 1q') | |
150 |
|
151 | |||
151 | if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" = --rev ]; then |
|
152 | if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" = --rev ]; then | |
152 | _hg_tags |
|
153 | _hg_tags | |
@@ -190,17 +191,17 b' shopt -s extglob' | |||||
190 | if [ $count = 1 ]; then |
|
191 | if [ $count = 1 ]; then | |
191 | _hg_paths |
|
192 | _hg_paths | |
192 | fi |
|
193 | fi | |
193 |
|
|
194 | _hg_repos | |
194 | ;; |
|
195 | ;; | |
195 | debugindex|debugindexdot) |
|
196 | debugindex|debugindexdot) | |
196 |
COMPREPLY=(${COMPREPLY[@]:-} $( |
|
197 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -f -X "!*.i" -- "$cur")) | |
197 | ;; |
|
198 | ;; | |
198 | debugdata) |
|
199 | debugdata) | |
199 |
COMPREPLY=(${COMPREPLY[@]:-} $( |
|
200 | COMPREPLY=(${COMPREPLY[@]:-} $(compgen -f -X "!*.d" -- "$cur")) | |
200 | ;; |
|
201 | ;; | |
201 | esac |
|
202 | esac | |
202 |
|
203 | |||
203 | } |
|
204 | } | |
204 |
|
205 | |||
205 |
complete -o bashdefault -o default -F _hg hg 2> |
|
206 | complete -o bashdefault -o default -F _hg hg 2>/dev/null \ | |
206 | || complete -o default -F _hg hg |
|
207 | || complete -o default -F _hg hg |
@@ -5,7 +5,7 b'' | |||||
5 | </head> |
|
5 | </head> | |
6 |
|
6 | |||
7 | <body> |
|
7 | <body> | |
8 |
<h1>Mercurial version 0. |
|
8 | <h1>Mercurial version 0.8 for Windows</h1> | |
9 |
|
9 | |||
10 | <p>Welcome to Mercurial for Windows!</p> |
|
10 | <p>Welcome to Mercurial for Windows!</p> | |
11 |
|
11 |
@@ -4,7 +4,7 b'' | |||||
4 | [Setup] |
|
4 | [Setup] | |
5 | AppCopyright=Copyright 2005 Matt Mackall and others |
|
5 | AppCopyright=Copyright 2005 Matt Mackall and others | |
6 | AppName=Mercurial |
|
6 | AppName=Mercurial | |
7 |
AppVerName=Mercurial version 0. |
|
7 | AppVerName=Mercurial version 0.8 | |
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. |
|
17 | OutputBaseFilename=Mercurial-0.8 | |
18 | DefaultDirName={sd}\Mercurial |
|
18 | DefaultDirName={sd}\Mercurial | |
19 | SourceDir=C:\hg\hg-release |
|
19 | SourceDir=C:\hg\hg-release | |
20 |
VersionInfoVersion=0. |
|
20 | VersionInfoVersion=0.8 | |
21 | VersionInfoDescription=Mercurial distributed SCM |
|
21 | VersionInfoDescription=Mercurial distributed SCM | |
22 | VersionInfoCopyright=Copyright 2005 Matt Mackall and others |
|
22 | VersionInfoCopyright=Copyright 2005 Matt Mackall and others | |
23 | VersionInfoCompany=Matt Mackall and others |
|
23 | VersionInfoCompany=Matt Mackall and others |
@@ -8,6 +8,27 b' file that comes with this package.' | |||||
8 | Release Notes |
|
8 | Release Notes | |
9 | ------------- |
|
9 | ------------- | |
10 |
|
10 | |||
|
11 | 2006-01-29 v0.8 | |||
|
12 | ||||
|
13 | * Upgrade notes: | |||
|
14 | ||||
|
15 | - diff and status command are now repo-wide by default | |||
|
16 | (use 'hg diff .' for the old behavior) | |||
|
17 | - GPG signing is now done with the gpg extension | |||
|
18 | - the --text option for commit, rawcommit, and tag has been removed | |||
|
19 | - the copy/rename --parents option has been removed | |||
|
20 | ||||
|
21 | * Major changes from 0.7 to 0.8: | |||
|
22 | ||||
|
23 | - faster status, diff, and commit | |||
|
24 | - reduced memory usage for push and pull | |||
|
25 | - improved extension API | |||
|
26 | - new bisect, gpg, hgk, and win32text extensions | |||
|
27 | - short URLs, binary file handling, and optional gitweb skin for hgweb | |||
|
28 | - numerous new command options including log --keyword and pull --rev | |||
|
29 | - improved hooks and file filtering | |||
|
30 | ||||
|
31 | ||||
11 | 2005-09-21 v0.7 with modifications |
|
32 | 2005-09-21 v0.7 with modifications | |
12 |
|
33 | |||
13 | * New INI files have been added to control Mercurial's behaviour: |
|
34 | * New INI files have been added to control Mercurial's behaviour: |
@@ -15,7 +15,7 b' html: $(HTML)' | |||||
15 | asciidoc -d manpage -b docbook $*.txt |
|
15 | asciidoc -d manpage -b docbook $*.txt | |
16 |
|
16 | |||
17 | %.html: %.txt |
|
17 | %.html: %.txt | |
18 | asciidoc -b html4 $*.txt |
|
18 | asciidoc -b html4 $*.txt || asciidoc -b html $*.txt | |
19 |
|
19 | |||
20 | clean: |
|
20 | clean: | |
21 | $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) |
|
21 | $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) |
@@ -1,6 +1,14 b'' | |||||
1 | import os, tempfile, binascii, errno |
|
1 | # GnuPG signing extension for Mercurial | |
|
2 | # | |||
|
3 | # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org> | |||
|
4 | # | |||
|
5 | # This software may be used and distributed according to the terms | |||
|
6 | # of the GNU General Public License, incorporated herein by reference. | |||
|
7 | ||||
|
8 | import os, tempfile, binascii | |||
2 | from mercurial import util |
|
9 | from mercurial import util | |
3 | from mercurial import node as hgnode |
|
10 | from mercurial import node as hgnode | |
|
11 | from mercurial.i18n import gettext as _ | |||
4 |
|
12 | |||
5 | class gpg: |
|
13 | class gpg: | |
6 | def __init__(self, path, key=None): |
|
14 | def __init__(self, path, key=None): | |
@@ -14,6 +22,7 b' class gpg:' | |||||
14 | def verify(self, data, sig): |
|
22 | def verify(self, data, sig): | |
15 | """ returns of the good and bad signatures""" |
|
23 | """ returns of the good and bad signatures""" | |
16 | try: |
|
24 | try: | |
|
25 | # create temporary files | |||
17 | fd, sigfile = tempfile.mkstemp(prefix="hggpgsig") |
|
26 | fd, sigfile = tempfile.mkstemp(prefix="hggpgsig") | |
18 | fp = os.fdopen(fd, 'wb') |
|
27 | fp = os.fdopen(fd, 'wb') | |
19 | fp.write(sig) |
|
28 | fp.write(sig) | |
@@ -22,8 +31,8 b' class gpg:' | |||||
22 | fp = os.fdopen(fd, 'wb') |
|
31 | fp = os.fdopen(fd, 'wb') | |
23 | fp.write(data) |
|
32 | fp.write(data) | |
24 | fp.close() |
|
33 | fp.close() | |
25 |
gpgcmd = "%s --logger-fd 1 --status-fd 1 --verify |
|
34 | gpgcmd = ("%s --logger-fd 1 --status-fd 1 --verify " | |
26 |
|
|
35 | "\"%s\" \"%s\"" % (self.path, sigfile, datafile)) | |
27 | ret = util.filter("", gpgcmd) |
|
36 | ret = util.filter("", gpgcmd) | |
28 | except: |
|
37 | except: | |
29 | for f in (sigfile, datafile): |
|
38 | for f in (sigfile, datafile): | |
@@ -41,7 +50,7 b' class gpg:' | |||||
41 | continue |
|
50 | continue | |
42 | l = l[9:] |
|
51 | l = l[9:] | |
43 | if l.startswith("ERRSIG"): |
|
52 | if l.startswith("ERRSIG"): | |
44 | err = "error while verifying signature" |
|
53 | err = _("error while verifying signature") | |
45 | break |
|
54 | break | |
46 | elif l.startswith("VALIDSIG"): |
|
55 | elif l.startswith("VALIDSIG"): | |
47 | # fingerprint of the primary key |
|
56 | # fingerprint of the primary key | |
@@ -61,12 +70,97 b' class gpg:' | |||||
61 | return err, keys |
|
70 | return err, keys | |
62 |
|
71 | |||
63 | def newgpg(ui, **opts): |
|
72 | def newgpg(ui, **opts): | |
|
73 | """create a new gpg instance""" | |||
64 | gpgpath = ui.config("gpg", "cmd", "gpg") |
|
74 | gpgpath = ui.config("gpg", "cmd", "gpg") | |
65 | gpgkey = opts.get('key') |
|
75 | gpgkey = opts.get('key') | |
66 | if not gpgkey: |
|
76 | if not gpgkey: | |
67 | gpgkey = ui.config("gpg", "key", None) |
|
77 | gpgkey = ui.config("gpg", "key", None) | |
68 | return gpg(gpgpath, gpgkey) |
|
78 | return gpg(gpgpath, gpgkey) | |
69 |
|
79 | |||
|
80 | def sigwalk(repo): | |||
|
81 | """ | |||
|
82 | walk over every sigs, yields a couple | |||
|
83 | ((node, version, sig), (filename, linenumber)) | |||
|
84 | """ | |||
|
85 | def parsefile(fileiter, context): | |||
|
86 | ln = 1 | |||
|
87 | for l in fileiter: | |||
|
88 | if not l: | |||
|
89 | continue | |||
|
90 | yield (l.split(" ", 2), (context, ln)) | |||
|
91 | ln +=1 | |||
|
92 | ||||
|
93 | fl = repo.file(".hgsigs") | |||
|
94 | h = fl.heads() | |||
|
95 | h.reverse() | |||
|
96 | # read the heads | |||
|
97 | for r in h: | |||
|
98 | fn = ".hgsigs|%s" % hgnode.short(r) | |||
|
99 | for item in parsefile(fl.read(r).splitlines(), fn): | |||
|
100 | yield item | |||
|
101 | try: | |||
|
102 | # read local signatures | |||
|
103 | fn = "localsigs" | |||
|
104 | for item in parsefile(repo.opener(fn), fn): | |||
|
105 | yield item | |||
|
106 | except IOError: | |||
|
107 | pass | |||
|
108 | ||||
|
109 | def getkeys(ui, repo, mygpg, sigdata, context): | |||
|
110 | """get the keys who signed a data""" | |||
|
111 | fn, ln = context | |||
|
112 | node, version, sig = sigdata | |||
|
113 | prefix = "%s:%d" % (fn, ln) | |||
|
114 | node = hgnode.bin(node) | |||
|
115 | ||||
|
116 | data = node2txt(repo, node, version) | |||
|
117 | sig = binascii.a2b_base64(sig) | |||
|
118 | err, keys = mygpg.verify(data, sig) | |||
|
119 | if err: | |||
|
120 | ui.warn("%s:%d %s\n" % (fn, ln , err)) | |||
|
121 | return None | |||
|
122 | ||||
|
123 | validkeys = [] | |||
|
124 | # warn for expired key and/or sigs | |||
|
125 | for key in keys: | |||
|
126 | if key[0] == "BADSIG": | |||
|
127 | ui.write(_("%s Bad signature from \"%s\"\n") % (prefix, key[2])) | |||
|
128 | continue | |||
|
129 | if key[0] == "EXPSIG": | |||
|
130 | ui.write(_("%s Note: Signature has expired" | |||
|
131 | " (signed by: \"%s\")\n") % (prefix, key[2])) | |||
|
132 | elif key[0] == "EXPKEYSIG": | |||
|
133 | ui.write(_("%s Note: This key has expired" | |||
|
134 | " (signed by: \"%s\")\n") % (prefix, key[2])) | |||
|
135 | validkeys.append((key[1], key[2], key[3])) | |||
|
136 | return validkeys | |||
|
137 | ||||
|
138 | def sigs(ui, repo): | |||
|
139 | """list signed changesets""" | |||
|
140 | mygpg = newgpg(ui) | |||
|
141 | revs = {} | |||
|
142 | ||||
|
143 | for data, context in sigwalk(repo): | |||
|
144 | node, version, sig = data | |||
|
145 | fn, ln = context | |||
|
146 | try: | |||
|
147 | n = repo.lookup(node) | |||
|
148 | except KeyError: | |||
|
149 | ui.warn(_("%s:%d node does not exist\n") % (fn, ln)) | |||
|
150 | continue | |||
|
151 | r = repo.changelog.rev(n) | |||
|
152 | keys = getkeys(ui, repo, mygpg, data, context) | |||
|
153 | if not keys: | |||
|
154 | continue | |||
|
155 | revs.setdefault(r, []) | |||
|
156 | revs[r].extend(keys) | |||
|
157 | nodes = list(revs) | |||
|
158 | nodes.reverse() | |||
|
159 | for rev in nodes: | |||
|
160 | for k in revs[rev]: | |||
|
161 | r = "%5d:%s" % (rev, hgnode.hex(repo.changelog.node(rev))) | |||
|
162 | ui.write("%-30s %s\n" % (keystr(ui, k), r)) | |||
|
163 | ||||
70 | def check(ui, repo, rev): |
|
164 | def check(ui, repo, rev): | |
71 | """verify all the signatures there may be for a particular revision""" |
|
165 | """verify all the signatures there may be for a particular revision""" | |
72 | mygpg = newgpg(ui) |
|
166 | mygpg = newgpg(ui) | |
@@ -74,63 +168,30 b' def check(ui, repo, rev):' | |||||
74 | hexrev = hgnode.hex(rev) |
|
168 | hexrev = hgnode.hex(rev) | |
75 | keys = [] |
|
169 | keys = [] | |
76 |
|
170 | |||
77 | def addsig(fn, ln, l): |
|
171 | for data, context in sigwalk(repo): | |
78 | if not l: return |
|
172 | node, version, sig = data | |
79 | n, v, sig = l.split(" ", 2) |
|
173 | if node == hexrev: | |
80 | if n == hexrev: |
|
174 | k = getkeys(ui, repo, mygpg, data, context) | |
81 | data = node2txt(repo, rev, v) |
|
175 | if k: | |
82 | sig = binascii.a2b_base64(sig) |
|
176 | keys.extend(k) | |
83 | err, k = mygpg.verify(data, sig) |
|
|||
84 | if not err: |
|
|||
85 | keys.append((k, fn, ln)) |
|
|||
86 | else: |
|
|||
87 | ui.warn("%s:%d %s\n" % (fn, ln , err)) |
|
|||
88 |
|
||||
89 | fl = repo.file(".hgsigs") |
|
|||
90 | h = fl.heads() |
|
|||
91 | h.reverse() |
|
|||
92 | # read the heads |
|
|||
93 | for r in h: |
|
|||
94 | ln = 1 |
|
|||
95 | for l in fl.read(r).splitlines(): |
|
|||
96 | addsig(".hgsigs|%s" % hgnode.short(r), ln, l) |
|
|||
97 | ln +=1 |
|
|||
98 | try: |
|
|||
99 | # read local signatures |
|
|||
100 | ln = 1 |
|
|||
101 | f = repo.opener("localsigs") |
|
|||
102 | for l in f: |
|
|||
103 | addsig("localsigs", ln, l) |
|
|||
104 | ln +=1 |
|
|||
105 | except IOError: |
|
|||
106 | pass |
|
|||
107 |
|
177 | |||
108 | if not keys: |
|
178 | if not keys: | |
109 |
ui.write("%s |
|
179 | ui.write(_("No valid signature for %s\n") % hgnode.short(rev)) | |
110 | return |
|
180 | return | |
111 | valid = [] |
|
181 | ||
112 | # warn for expired key and/or sigs |
|
|||
113 | for k, fn, ln in keys: |
|
|||
114 | prefix = "%s:%d" % (fn, ln) |
|
|||
115 | for key in k: |
|
|||
116 | if key[0] == "BADSIG": |
|
|||
117 | ui.write("%s Bad signature from \"%s\"\n" % (prefix, key[2])) |
|
|||
118 | continue |
|
|||
119 | if key[0] == "EXPSIG": |
|
|||
120 | ui.write("%s Note: Signature has expired" |
|
|||
121 | " (signed by: \"%s\")\n" % (prefix, key[2])) |
|
|||
122 | elif key[0] == "EXPKEYSIG": |
|
|||
123 | ui.write("%s Note: This key has expired" |
|
|||
124 | " (signed by: \"%s\")\n" % (prefix, key[2])) |
|
|||
125 | valid.append((key[1], key[2], key[3])) |
|
|||
126 | # print summary |
|
182 | # print summary | |
127 | ui.write("%s is signed by:\n" % hgnode.short(rev)) |
|
183 | ui.write("%s is signed by:\n" % hgnode.short(rev)) | |
128 | for keyid, user, fingerprint in valid: |
|
184 | for key in keys: | |
129 | role = getrole(ui, fingerprint) |
|
185 | ui.write(" %s\n" % keystr(ui, key)) | |
130 | ui.write(" %s (%s)\n" % (user, role)) |
|
|||
131 |
|
186 | |||
132 |
def |
|
187 | def keystr(ui, key): | |
133 | return ui.config("gpg", fingerprint, "no role defined") |
|
188 | """associate a string to a key (username, comment)""" | |
|
189 | keyid, user, fingerprint = key | |||
|
190 | comment = ui.config("gpg", fingerprint, None) | |||
|
191 | if comment: | |||
|
192 | return "%s (%s)" % (user, comment) | |||
|
193 | else: | |||
|
194 | return user | |||
134 |
|
195 | |||
135 | def sign(ui, repo, *revs, **opts): |
|
196 | def sign(ui, repo, *revs, **opts): | |
136 | """add a signature for the current tip or a given revision""" |
|
197 | """add a signature for the current tip or a given revision""" | |
@@ -150,7 +211,7 b' def sign(ui, repo, *revs, **opts):' | |||||
150 | data = node2txt(repo, n, sigver) |
|
211 | data = node2txt(repo, n, sigver) | |
151 | sig = mygpg.sign(data) |
|
212 | sig = mygpg.sign(data) | |
152 | if not sig: |
|
213 | if not sig: | |
153 | raise util.Abort("Error while signing") |
|
214 | raise util.Abort(_("Error while signing")) | |
154 | sig = binascii.b2a_base64(sig) |
|
215 | sig = binascii.b2a_base64(sig) | |
155 | sig = sig.replace("\n", "") |
|
216 | sig = sig.replace("\n", "") | |
156 | sigmessage += "%s %s %s\n" % (hexnode, sigver, sig) |
|
217 | sigmessage += "%s %s %s\n" % (hexnode, sigver, sig) | |
@@ -162,9 +223,9 b' def sign(ui, repo, *revs, **opts):' | |||||
162 |
|
223 | |||
163 | for x in repo.changes(): |
|
224 | for x in repo.changes(): | |
164 | if ".hgsigs" in x and not opts["force"]: |
|
225 | if ".hgsigs" in x and not opts["force"]: | |
165 | raise util.Abort("working copy of .hgsigs is changed " |
|
226 | raise util.Abort(_("working copy of .hgsigs is changed " | |
166 | "(please commit .hgsigs manually" |
|
227 | "(please commit .hgsigs manually " | |
167 | "or use --force)") |
|
228 | "or use --force)")) | |
168 |
|
229 | |||
169 | repo.wfile(".hgsigs", "ab").write(sigmessage) |
|
230 | repo.wfile(".hgsigs", "ab").write(sigmessage) | |
170 |
|
231 | |||
@@ -176,7 +237,8 b' def sign(ui, repo, *revs, **opts):' | |||||
176 |
|
237 | |||
177 | message = opts['message'] |
|
238 | message = opts['message'] | |
178 | if not message: |
|
239 | if not message: | |
179 |
message = "\n".join(["Added signature for changeset %s" |
|
240 | message = "\n".join([_("Added signature for changeset %s") | |
|
241 | % hgnode.hex(n) | |||
180 | for n in nodes]) |
|
242 | for n in nodes]) | |
181 | try: |
|
243 | try: | |
182 | repo.commit([".hgsigs"], message, opts['user'], opts['date']) |
|
244 | repo.commit([".hgsigs"], message, opts['user'], opts['date']) | |
@@ -188,19 +250,20 b' def node2txt(repo, node, ver):' | |||||
188 | if ver == "0": |
|
250 | if ver == "0": | |
189 | return "%s\n" % hgnode.hex(node) |
|
251 | return "%s\n" % hgnode.hex(node) | |
190 | else: |
|
252 | else: | |
191 | util.Abort("unknown signature version") |
|
253 | raise util.Abort(_("unknown signature version")) | |
192 |
|
254 | |||
193 | cmdtable = { |
|
255 | cmdtable = { | |
194 | "sign": |
|
256 | "sign": | |
195 | (sign, |
|
257 | (sign, | |
196 | [('l', 'local', None, "make the signature local"), |
|
258 | [('l', 'local', None, _("make the signature local")), | |
197 | ('f', 'force', None, "sign even if the sigfile is modified"), |
|
259 | ('f', 'force', None, _("sign even if the sigfile is modified")), | |
198 | ('', 'no-commit', None, "do not commit the sigfile after signing"), |
|
260 | ('', 'no-commit', None, _("do not commit the sigfile after signing")), | |
199 | ('m', 'message', "", "commit message"), |
|
261 | ('m', 'message', "", _("commit message")), | |
200 | ('d', 'date', "", "date code"), |
|
262 | ('d', 'date', "", _("date code")), | |
201 | ('u', 'user', "", "user"), |
|
263 | ('u', 'user', "", _("user")), | |
202 | ('k', 'key', "", "the key id to sign with")], |
|
264 | ('k', 'key', "", _("the key id to sign with"))], | |
203 |
"hg sign [OPTION]... REVISION |
|
265 | _("hg sign [OPTION]... [REVISION]...")), | |
204 | "sigcheck": (check, [], 'hg sigcheck REVISION') |
|
266 | "sigcheck": (check, [], _('hg sigcheck REVISION')), | |
|
267 | "sigs": (sigs, [], _('hg sigs')), | |||
205 | } |
|
268 | } | |
206 |
|
269 |
@@ -1,7 +1,5 b'' | |||||
1 | #!/usr/bin/python |
|
1 | # Command for sending a collection of Mercurial changesets as a series | |
2 | # |
|
2 | # of patch emails. | |
3 | # Interactive script for sending a collection of Mercurial changesets |
|
|||
4 | # as a series of patch emails. |
|
|||
5 | # |
|
3 | # | |
6 | # The series is started off with a "[PATCH 0 of N]" introduction, |
|
4 | # The series is started off with a "[PATCH 0 of N]" introduction, | |
7 | # which describes the series as a whole. |
|
5 | # which describes the series as a whole. | |
@@ -50,9 +48,9 b'' | |||||
50 | from email.MIMEMultipart import MIMEMultipart |
|
48 | from email.MIMEMultipart import MIMEMultipart | |
51 | from email.MIMEText import MIMEText |
|
49 | from email.MIMEText import MIMEText | |
52 | from mercurial import commands |
|
50 | from mercurial import commands | |
53 | from mercurial import fancyopts |
|
|||
54 | from mercurial import hg |
|
51 | from mercurial import hg | |
55 | from mercurial import ui |
|
52 | from mercurial import ui | |
|
53 | from mercurial.i18n import gettext as _ | |||
56 | import os |
|
54 | import os | |
57 | import popen2 |
|
55 | import popen2 | |
58 | import smtplib |
|
56 | import smtplib | |
@@ -89,6 +87,17 b' def diffstat(patch):' | |||||
89 | except: pass |
|
87 | except: pass | |
90 |
|
88 | |||
91 | def patchbomb(ui, repo, *revs, **opts): |
|
89 | def patchbomb(ui, repo, *revs, **opts): | |
|
90 | '''send changesets as a series of patch emails | |||
|
91 | ||||
|
92 | The series starts with a "[PATCH 0 of N]" introduction, which | |||
|
93 | describes the series as a whole. | |||
|
94 | ||||
|
95 | Each patch email has a Subject line of "[PATCH M of N] ...", using | |||
|
96 | the first line of the changeset description as the subject text. | |||
|
97 | The message contains two or three body parts. First, the rest of | |||
|
98 | the changeset description. Next, (optionally) if the diffstat | |||
|
99 | program is installed, the result of running diffstat on the patch. | |||
|
100 | Finally, the patch itself, as generated by "hg export".''' | |||
92 | def prompt(prompt, default = None, rest = ': ', empty_ok = False): |
|
101 | def prompt(prompt, default = None, rest = ': ', empty_ok = False): | |
93 | if default: prompt += ' [%s]' % default |
|
102 | if default: prompt += ' [%s]' % default | |
94 | prompt += rest |
|
103 | prompt += rest | |
@@ -97,7 +106,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
97 | if r: return r |
|
106 | if r: return r | |
98 | if default is not None: return default |
|
107 | if default is not None: return default | |
99 | if empty_ok: return r |
|
108 | if empty_ok: return r | |
100 | ui.warn('Please enter a valid value.\n') |
|
109 | ui.warn(_('Please enter a valid value.\n')) | |
101 |
|
110 | |||
102 | def confirm(s): |
|
111 | def confirm(s): | |
103 | if not prompt(s, default = 'y', rest = '? ').lower().startswith('y'): |
|
112 | if not prompt(s, default = 'y', rest = '? ').lower().startswith('y'): | |
@@ -109,7 +118,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
109 | if summary: |
|
118 | if summary: | |
110 | ui.write(summary, '\n') |
|
119 | ui.write(summary, '\n') | |
111 | ui.write(s, '\n') |
|
120 | ui.write(s, '\n') | |
112 | confirm('Does the diffstat above look okay') |
|
121 | confirm(_('Does the diffstat above look okay')) | |
113 | return s |
|
122 | return s | |
114 |
|
123 | |||
115 | def makepatch(patch, idx, total): |
|
124 | def makepatch(patch, idx, total): | |
@@ -162,20 +171,20 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
162 | self.container.append(''.join(self.lines).split('\n')) |
|
171 | self.container.append(''.join(self.lines).split('\n')) | |
163 | self.lines = [] |
|
172 | self.lines = [] | |
164 |
|
173 | |||
165 |
commands.export(ui, repo, * |
|
174 | commands.export(ui, repo, *revs, **{'output': exportee(patches), | |
166 | 'switch_parent': False, |
|
175 | 'switch_parent': False, | |
167 | 'text': None}) |
|
176 | 'text': None}) | |
168 |
|
177 | |||
169 | jumbo = [] |
|
178 | jumbo = [] | |
170 | msgs = [] |
|
179 | msgs = [] | |
171 |
|
180 | |||
172 | ui.write('This patch series consists of %d patches.\n\n' % len(patches)) |
|
181 | ui.write(_('This patch series consists of %d patches.\n\n') % len(patches)) | |
173 |
|
182 | |||
174 | for p, i in zip(patches, range(len(patches))): |
|
183 | for p, i in zip(patches, range(len(patches))): | |
175 | jumbo.extend(p) |
|
184 | jumbo.extend(p) | |
176 | msgs.append(makepatch(p, i + 1, len(patches))) |
|
185 | msgs.append(makepatch(p, i + 1, len(patches))) | |
177 |
|
186 | |||
178 | ui.write('\nWrite the introductory message for the patch series.\n\n') |
|
187 | ui.write(_('\nWrite the introductory message for the patch series.\n\n')) | |
179 |
|
188 | |||
180 | sender = (opts['from'] or ui.config('patchbomb', 'from') or |
|
189 | sender = (opts['from'] or ui.config('patchbomb', 'from') or | |
181 | prompt('From', ui.username())) |
|
190 | prompt('From', ui.username())) | |
@@ -193,7 +202,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
193 | to = getaddrs('to', 'To') |
|
202 | to = getaddrs('to', 'To') | |
194 | cc = getaddrs('cc', 'Cc', '') |
|
203 | cc = getaddrs('cc', 'Cc', '') | |
195 |
|
204 | |||
196 | ui.write('Finish with ^D or a dot on a line by itself.\n\n') |
|
205 | ui.write(_('Finish with ^D or a dot on a line by itself.\n\n')) | |
197 |
|
206 | |||
198 | body = [] |
|
207 | body = [] | |
199 |
|
208 | |||
@@ -208,7 +217,7 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
208 | ui.write('\n') |
|
217 | ui.write('\n') | |
209 |
|
218 | |||
210 | if opts['diffstat']: |
|
219 | if opts['diffstat']: | |
211 | d = cdiffstat('Final summary:\n', jumbo) |
|
220 | d = cdiffstat(_('Final summary:\n'), jumbo) | |
212 | if d: msg.attach(MIMEText(d)) |
|
221 | if d: msg.attach(MIMEText(d)) | |
213 |
|
222 | |||
214 | msgs.insert(0, msg) |
|
223 | msgs.insert(0, msg) | |
@@ -252,25 +261,15 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
252 | if not opts['test']: |
|
261 | if not opts['test']: | |
253 | s.close() |
|
262 | s.close() | |
254 |
|
263 | |||
255 | if __name__ == '__main__': |
|
264 | cmdtable = { | |
256 | optspec = [('c', 'cc', [], 'email addresses of copy recipients'), |
|
265 | 'email': | |
257 | ('d', 'diffstat', None, 'add diffstat output to messages'), |
|
266 | (patchbomb, | |
258 |
|
|
267 | [('c', 'cc', [], 'email addresses of copy recipients'), | |
259 | ('', 'plain', None, 'omit hg patch header'), |
|
268 | ('d', 'diffstat', None, 'add diffstat output to messages'), | |
260 | ('n', 'test', None, 'print messages that would be sent'), |
|
269 | ('f', 'from', '', 'email address of sender'), | |
261 | ('s', 'subject', '', 'subject of introductory message'), |
|
270 | ('', 'plain', None, 'omit hg patch header'), | |
262 | ('t', 'to', [], 'email addresses of recipients')] |
|
271 | ('n', 'test', None, 'print messages that would be sent'), | |
263 | options = {} |
|
272 | ('s', 'subject', '', 'subject of introductory message'), | |
264 | try: |
|
273 | ('t', 'to', [], 'email addresses of recipients')], | |
265 | args = fancyopts.fancyopts(sys.argv[1:], commands.globalopts + optspec, |
|
274 | "hg email [OPTION]... [REV]...") | |
266 | options) |
|
275 | } | |
267 | except fancyopts.getopt.GetoptError, inst: |
|
|||
268 | u = ui.ui() |
|
|||
269 | u.warn('error: %s' % inst) |
|
|||
270 | sys.exit(1) |
|
|||
271 |
|
||||
272 | u = ui.ui(options["verbose"], options["debug"], options["quiet"], |
|
|||
273 | not options["noninteractive"]) |
|
|||
274 | repo = hg.repository(ui = u) |
|
|||
275 |
|
||||
276 | patchbomb(u, repo, *args, **options) |
|
@@ -1399,6 +1399,13 b' class localrepository(object):' | |||||
1399 |
|
1399 | |||
1400 | modified, added, removed, deleted, unknown = self.changes() |
|
1400 | modified, added, removed, deleted, unknown = self.changes() | |
1401 |
|
1401 | |||
|
1402 | # is this a jump, or a merge? i.e. is there a linear path | |||
|
1403 | # from p1 to p2? | |||
|
1404 | linear_path = (pa == p1 or pa == p2) | |||
|
1405 | ||||
|
1406 | if allow and linear_path: | |||
|
1407 | raise util.Abort(_("there is nothing to merge, " | |||
|
1408 | "just use 'hg update'")) | |||
1402 | if allow and not forcemerge: |
|
1409 | if allow and not forcemerge: | |
1403 | if modified or added or removed: |
|
1410 | if modified or added or removed: | |
1404 | raise util.Abort(_("outstanding uncommited changes")) |
|
1411 | raise util.Abort(_("outstanding uncommited changes")) | |
@@ -1411,10 +1418,6 b' class localrepository(object):' | |||||
1411 | raise util.Abort(_("'%s' already exists in the working" |
|
1418 | raise util.Abort(_("'%s' already exists in the working" | |
1412 | " dir and differs from remote") % f) |
|
1419 | " dir and differs from remote") % f) | |
1413 |
|
1420 | |||
1414 | # is this a jump, or a merge? i.e. is there a linear path |
|
|||
1415 | # from p1 to p2? |
|
|||
1416 | linear_path = (pa == p1 or pa == p2) |
|
|||
1417 |
|
||||
1418 | # resolve the manifest to determine which files |
|
1421 | # resolve the manifest to determine which files | |
1419 | # we care about merging |
|
1422 | # we care about merging | |
1420 | self.ui.note(_("resolving manifests\n")) |
|
1423 | self.ui.note(_("resolving manifests\n")) |
@@ -81,7 +81,7 b' try:' | |||||
81 | author='Matt Mackall', |
|
81 | author='Matt Mackall', | |
82 | author_email='mpm@selenic.com', |
|
82 | author_email='mpm@selenic.com', | |
83 | url='http://selenic.com/mercurial', |
|
83 | url='http://selenic.com/mercurial', | |
84 |
description=' |
|
84 | description='Scalable distributed SCM', | |
85 | license='GNU GPL', |
|
85 | license='GNU GPL', | |
86 | packages=['mercurial', 'hgext'], |
|
86 | packages=['mercurial', 'hgext'], | |
87 | ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), |
|
87 | ext_modules=[Extension('mercurial.mpatch', ['mercurial/mpatch.c']), | |
@@ -92,6 +92,10 b' try:' | |||||
92 | glob.glob('templates/*.tmpl'))], |
|
92 | glob.glob('templates/*.tmpl'))], | |
93 | cmdclass=cmdclass, |
|
93 | cmdclass=cmdclass, | |
94 | scripts=['hg', 'hgmerge'], |
|
94 | scripts=['hg', 'hgmerge'], | |
|
95 | options=dict(bdist_mpkg=dict(zipdist=True, | |||
|
96 | license='COPYING', | |||
|
97 | readme='contrib/macosx/Readme.html', | |||
|
98 | welcome='contrib/macosx/Welcome.html')), | |||
95 | **py2exe_opts) |
|
99 | **py2exe_opts) | |
96 | finally: |
|
100 | finally: | |
97 | mercurial.version.forget_version() |
|
101 | mercurial.version.forget_version() |
@@ -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<br/> |
|
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/> | |
14 | </div> |
|
14 | </div> | |
15 |
|
15 | |||
16 | <div class="title">#file|escape#</div> |
|
16 | <div class="title">#file|escape#</div> |
@@ -10,6 +10,7 b'' | |||||
10 | <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a> |
|
10 | <a href="?mf=#manifest|short#;path=#path|urlescape#">manifest</a> | |
11 | <a href="?f=#filenode|short#;file=#file|urlescape#">file</a> |
|
11 | <a href="?f=#filenode|short#;file=#file|urlescape#">file</a> | |
12 | <a href="?fl=#filenode|short#;file=#file|urlescape#">revisions</a> |
|
12 | <a href="?fl=#filenode|short#;file=#file|urlescape#">revisions</a> | |
|
13 | <a href="?fa=#filenode|short#;file=#file|urlescape#;style=raw">raw</a> | |||
13 | </div> |
|
14 | </div> | |
14 |
|
15 | |||
15 | <h2>Annotate #file|escape#</h2> |
|
16 | <h2>Annotate #file|escape#</h2> |
@@ -43,7 +43,7 b' filediffparent = "<tr><th class="parent"' | |||||
43 | filelogparent = "<tr><td align="right">parent #rev#: </td><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>" |
|
43 | filelogparent = "<tr><td align="right">parent #rev#: </td><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>" | |
44 | filediffchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>" |
|
44 | filediffchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>" | |
45 | filelogchild = "<tr><td align="right">child #rev#: </td><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>" |
|
45 | filelogchild = "<tr><td align="right">child #rev#: </td><td><a href="?f=#node|short#;file=#file|urlescape#">#node|short#</a></td></tr>" | |
46 |
indexentry = "<tr class="parity#parity#"><td><a href="#url#">#name|escape#</a></td><td>#shortdesc |
|
46 | indexentry = "<tr class="parity#parity#"><td><a href="#url#">#name|escape#</a></td><td>#shortdesc#</td><td>#contact|obfuscate#</td><td>#lastupdate|age# ago</td><td><a href="#url#?cl=tip;style=rss">RSS</a></td></tr>" | |
47 | index = index.tmpl |
|
47 | index = index.tmpl | |
48 | archiveentry = "<a href="?ca=#node|short#;type=#type|urlescape#">#type|escape#</a> " |
|
48 | archiveentry = "<a href="?ca=#node|short#;type=#type|urlescape#">#type|escape#</a> " | |
49 | notfound = notfound.tmpl |
|
49 | notfound = notfound.tmpl |
@@ -1,15 +1,16 b'' | |||||
1 | header = header-raw.tmpl |
|
1 | header = header-raw.tmpl | |
2 | footer = "" |
|
2 | footer = "" | |
3 | changeset = changeset-raw.tmpl |
|
3 | changeset = changeset-raw.tmpl | |
4 | annotateline = "<tr class="parity#parity#"><td class="annotate"><a href="?cmd=changeset;node=#node#">#author#@#rev#</a></td><td><pre>#line|escape#</pre></td></tr>" |
|
4 | difflineplus = "#line#" | |
5 |
diffline |
|
5 | difflineminus = "#line#" | |
6 |
diffline |
|
6 | difflineat = "#line#" | |
7 |
diffline |
|
7 | diffline = "#line#" | |
8 | diffline = "#line|escape#" |
|
|||
9 | changesetparent = "# parent: #node#" |
|
8 | changesetparent = "# parent: #node#" | |
10 | changesetchild = "# child: #node#" |
|
9 | changesetchild = "# child: #node#" | |
11 |
filenodelink = " |
|
10 | filenodelink = "" | |
12 | filerevision = filerevision-raw.tmpl |
|
11 | filerevision = filerevision-raw.tmpl | |
13 |
fileline = "#line |
|
12 | fileline = "#line#" | |
14 | diffblock = "#lines#" |
|
13 | diffblock = "#lines#" | |
15 | filediff = filediff-raw.tmpl |
|
14 | filediff = filediff-raw.tmpl | |
|
15 | fileannotate = fileannotate-raw.tmpl | |||
|
16 | annotateline = "#author#@#rev#: #line#" |
@@ -24,11 +24,34 b' hg commit -m "2" -d "0 0"' | |||||
24 | cd ../r2 |
|
24 | cd ../r2 | |
25 | hg -q pull ../r1 |
|
25 | hg -q pull ../r1 | |
26 | hg status |
|
26 | hg status | |
|
27 | hg parents | |||
27 | hg --debug up |
|
28 | hg --debug up | |
|
29 | hg parents | |||
|
30 | hg --debug up 0 | |||
|
31 | hg parents | |||
28 | hg --debug up -m || echo failed |
|
32 | hg --debug up -m || echo failed | |
29 | hg --debug up -f -m |
|
33 | hg parents | |
|
34 | hg --debug up | |||
30 | hg parents |
|
35 | hg parents | |
31 | hg -v history |
|
36 | hg -v history | |
32 | hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
37 | hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |
33 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
|
38 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |
34 |
|
39 | |||
|
40 | # create a second head | |||
|
41 | cd ../r1 | |||
|
42 | hg up 0 | |||
|
43 | echo b2 > b | |||
|
44 | echo a3 > a | |||
|
45 | hg addremove | |||
|
46 | hg commit -m "3" -d "0 0" | |||
|
47 | ||||
|
48 | cd ../r2 | |||
|
49 | hg -q pull ../r1 | |||
|
50 | hg status | |||
|
51 | hg parents | |||
|
52 | hg --debug up || echo failed | |||
|
53 | hg --debug up -m || echo failed | |||
|
54 | hg --debug up -f -m | |||
|
55 | hg parents | |||
|
56 | hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
57 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
@@ -7,6 +7,11 b' diff -r c19d34741b0a a' | |||||
7 | +abc |
|
7 | +abc | |
8 | adding b |
|
8 | adding b | |
9 | M a |
|
9 | M a | |
|
10 | changeset: 0:c19d34741b0a | |||
|
11 | user: test | |||
|
12 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
13 | summary: 1 | |||
|
14 | ||||
10 | resolving manifests |
|
15 | resolving manifests | |
11 | force None allow None moddirstate True linear True |
|
16 | force None allow None moddirstate True linear True | |
12 | ancestor a0c8bcbbb45c local a0c8bcbbb45c remote 1165e8bd193e |
|
17 | ancestor a0c8bcbbb45c local a0c8bcbbb45c remote 1165e8bd193e | |
@@ -16,11 +21,38 b' getting b' | |||||
16 | merging a |
|
21 | merging a | |
17 | resolving a |
|
22 | resolving a | |
18 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 |
|
23 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 | |
19 | abort: outstanding uncommited changes |
|
24 | changeset: 1:1e71731e6fbb | |
20 | failed |
|
25 | tag: tip | |
|
26 | user: test | |||
|
27 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
28 | summary: 2 | |||
|
29 | ||||
21 | resolving manifests |
|
30 | resolving manifests | |
22 |
force None allow |
|
31 | force None allow None moddirstate True linear True | |
23 |
ancestor |
|
32 | ancestor a0c8bcbbb45c local 1165e8bd193e remote a0c8bcbbb45c | |
|
33 | remote deleted b | |||
|
34 | removing b | |||
|
35 | changeset: 0:c19d34741b0a | |||
|
36 | user: test | |||
|
37 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
38 | summary: 1 | |||
|
39 | ||||
|
40 | abort: there is nothing to merge, just use 'hg update' | |||
|
41 | failed | |||
|
42 | changeset: 0:c19d34741b0a | |||
|
43 | user: test | |||
|
44 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
45 | summary: 1 | |||
|
46 | ||||
|
47 | resolving manifests | |||
|
48 | force None allow None moddirstate True linear True | |||
|
49 | ancestor a0c8bcbbb45c local a0c8bcbbb45c remote 1165e8bd193e | |||
|
50 | a versions differ, resolve | |||
|
51 | remote created b | |||
|
52 | getting b | |||
|
53 | merging a | |||
|
54 | resolving a | |||
|
55 | file a: my b789fdd96dc2 other d730145abbf9 ancestor b789fdd96dc2 | |||
24 | changeset: 1:1e71731e6fbb |
|
56 | changeset: 1:1e71731e6fbb | |
25 | tag: tip |
|
57 | tag: tip | |
26 | user: test |
|
58 | user: test | |
@@ -50,3 +82,52 b' diff -r 1e71731e6fbb a' | |||||
50 | @@ -1,1 +1,1 @@ a2 |
|
82 | @@ -1,1 +1,1 @@ a2 | |
51 | -a2 |
|
83 | -a2 | |
52 | +abc |
|
84 | +abc | |
|
85 | adding b | |||
|
86 | M a | |||
|
87 | changeset: 1:1e71731e6fbb | |||
|
88 | user: test | |||
|
89 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
90 | summary: 2 | |||
|
91 | ||||
|
92 | resolving manifests | |||
|
93 | force None allow None moddirstate True linear False | |||
|
94 | ancestor a0c8bcbbb45c local 1165e8bd193e remote 4096f2872392 | |||
|
95 | a versions differ, resolve | |||
|
96 | b versions differ, resolve | |||
|
97 | this update spans a branch affecting the following files: | |||
|
98 | a (resolve) | |||
|
99 | b (resolve) | |||
|
100 | aborting update spanning branches! | |||
|
101 | (use update -m to merge across branches or -C to lose changes) | |||
|
102 | failed | |||
|
103 | abort: outstanding uncommited changes | |||
|
104 | failed | |||
|
105 | resolving manifests | |||
|
106 | force None allow 1 moddirstate True linear False | |||
|
107 | ancestor a0c8bcbbb45c local 1165e8bd193e remote 4096f2872392 | |||
|
108 | a versions differ, resolve | |||
|
109 | b versions differ, resolve | |||
|
110 | merging a | |||
|
111 | resolving a | |||
|
112 | file a: my d730145abbf9 other 13e0d5f949fa ancestor b789fdd96dc2 | |||
|
113 | merging b | |||
|
114 | resolving b | |||
|
115 | file b: my 1e88685f5dde other 61de8c7723ca ancestor 000000000000 | |||
|
116 | changeset: 1:1e71731e6fbb | |||
|
117 | user: test | |||
|
118 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
119 | summary: 2 | |||
|
120 | ||||
|
121 | changeset: 2:83c51d0caff4 | |||
|
122 | tag: tip | |||
|
123 | parent: 0:c19d34741b0a | |||
|
124 | user: test | |||
|
125 | date: Thu Jan 1 00:00:00 1970 +0000 | |||
|
126 | summary: 3 | |||
|
127 | ||||
|
128 | diff -r 1e71731e6fbb a | |||
|
129 | --- a/a | |||
|
130 | +++ b/a | |||
|
131 | @@ -1,1 +1,1 @@ a2 | |||
|
132 | -a2 | |||
|
133 | +abc |
General Comments 0
You need to be logged in to leave comments.
Login now