##// END OF EJS Templates
Merge with main
Martin Geisler -
r9805:a40ec117 merge default
parent child Browse files
Show More
@@ -0,0 +1,37 b''
1 Mercurial reads configuration data from several files, if they exist.
2 Below we list the most specific file first.
3
4 On Windows, these configuration files are read:
5
6 - ``<repo>\.hg\hgrc``
7 - ``%USERPROFILE%\.hgrc``
8 - ``%USERPROFILE%\Mercurial.ini``
9 - ``%HOME%\.hgrc``
10 - ``%HOME%\Mercurial.ini``
11 - ``C:\Mercurial\Mercurial.ini``
12 - ``HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial``
13 - ``<install-dir>\Mercurial.ini``
14
15 On Unix, these files are read:
16
17 - ``<repo>/.hg/hgrc``
18 - ``$HOME/.hgrc``
19 - ``/etc/mercurial/hgrc``
20 - ``/etc/mercurial/hgrc.d/*.rc``
21 - ``<install-root>/etc/mercurial/hgrc``
22 - ``<install-root>/etc/mercurial/hgrc.d/*.rc``
23
24 The configuration files for Mercurial use a simple ini-file format. A
25 configuration file consists of sections, led by a ``[section]`` header
26 and followed by ``name = value`` entries::
27
28 [ui]
29 username = Firstname Lastname <firstname.lastname@example.net>
30 verbose = True
31
32 This above entries will be referred to as ``ui.username`` and
33 ``ui.verbose``, respectively. Please see the hgrc man page for a full
34 description of the possible configuration values:
35
36 - on Unix-like systems: ``man hgrc``
37 - online: http://www.selenic.com/mercurial/hgrc.5.html
@@ -61,12 +61,12 b' def show_doc(ui):'
61 ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s)))
61 ui.write("%s\n%s\n\n" % (s, '"' * encoding.colwidth(s)))
62
62
63 # print options
63 # print options
64 section(_("OPTIONS"))
64 section(_("Options"))
65 for optstr, desc in get_opts(globalopts):
65 for optstr, desc in get_opts(globalopts):
66 ui.write("%s\n %s\n\n" % (optstr, desc))
66 ui.write("%s\n %s\n\n" % (optstr, desc))
67
67
68 # print cmds
68 # print cmds
69 section(_("COMMANDS"))
69 section(_("Commands"))
70 h = {}
70 h = {}
71 for c, attr in table.items():
71 for c, attr in table.items():
72 f = c.split("|")[0]
72 f = c.split("|")[0]
@@ -104,7 +104,7 b' def show_doc(ui):'
104 for name in names:
104 for name in names:
105 ui.write(".. _%s:\n" % name)
105 ui.write(".. _%s:\n" % name)
106 ui.write("\n")
106 ui.write("\n")
107 section(sec.upper())
107 section(sec)
108 if callable(doc):
108 if callable(doc):
109 doc = doc()
109 doc = doc()
110 ui.write(doc)
110 ui.write(doc)
@@ -16,16 +16,16 b' Mercurial source code management system'
16 :class: htmlonly
16 :class: htmlonly
17
17
18
18
19 SYNOPSIS
19 Synopsis
20 --------
20 --------
21 **hg** *command* [*option*]... [*argument*]...
21 **hg** *command* [*option*]... [*argument*]...
22
22
23 DESCRIPTION
23 Description
24 -----------
24 -----------
25 The **hg** command provides a command line interface to the Mercurial
25 The **hg** command provides a command line interface to the Mercurial
26 system.
26 system.
27
27
28 COMMAND ELEMENTS
28 Command Elements
29 ----------------
29 ----------------
30
30
31 files...
31 files...
@@ -46,7 +46,7 b' repository path'
46
46
47 .. include:: hg.1.gendoc.txt
47 .. include:: hg.1.gendoc.txt
48
48
49 FILES
49 Files
50 -----
50 -----
51
51
52 ``.hgignore``
52 ``.hgignore``
@@ -70,20 +70,20 b' Some commands (e.g. revert) produce back'
70 if the ``.orig`` file already exists and is not tracked by Mercurial,
70 if the ``.orig`` file already exists and is not tracked by Mercurial,
71 it will be overwritten.
71 it will be overwritten.
72
72
73 BUGS
73 Bugs
74 ----
74 ----
75 Probably lots, please post them to the mailing list (see Resources_
75 Probably lots, please post them to the mailing list (see Resources_
76 below) when you find them.
76 below) when you find them.
77
77
78 SEE ALSO
78 See Also
79 --------
79 --------
80 |hgignore(5)|_, |hgrc(5)|_
80 |hgignore(5)|_, |hgrc(5)|_
81
81
82 AUTHOR
82 Author
83 ------
83 ------
84 Written by Matt Mackall <mpm@selenic.com>
84 Written by Matt Mackall <mpm@selenic.com>
85
85
86 RESOURCES
86 Resources
87 ---------
87 ---------
88 Main Web Site: http://mercurial.selenic.com/
88 Main Web Site: http://mercurial.selenic.com/
89
89
@@ -91,7 +91,7 b' Source code repository: http://selenic.c'
91
91
92 Mailing list: http://selenic.com/mailman/listinfo/mercurial
92 Mailing list: http://selenic.com/mailman/listinfo/mercurial
93
93
94 COPYING
94 Copying
95 -------
95 -------
96 Copyright (C) 2005-2009 Matt Mackall.
96 Copyright (C) 2005-2009 Matt Mackall.
97 Free use of this software is granted under the terms of the GNU General
97 Free use of this software is granted under the terms of the GNU General
@@ -11,14 +11,14 b' syntax for Mercurial ignore files'
11 :Manual section: 5
11 :Manual section: 5
12 :Manual group: Mercurial Manual
12 :Manual group: Mercurial Manual
13
13
14 SYNOPSIS
14 Synopsis
15 --------
15 --------
16
16
17 The Mercurial system uses a file called ``.hgignore`` in the root
17 The Mercurial system uses a file called ``.hgignore`` in the root
18 directory of a repository to control its behavior when it searches
18 directory of a repository to control its behavior when it searches
19 for files that it is not currently tracking.
19 for files that it is not currently tracking.
20
20
21 DESCRIPTION
21 Description
22 -----------
22 -----------
23
23
24 The working directory of a Mercurial repository will often contain
24 The working directory of a Mercurial repository will often contain
@@ -45,7 +45,7 b' of how to configure these files. Look fo'
45 To control Mercurial's handling of files that it manages, see the
45 To control Mercurial's handling of files that it manages, see the
46 |hg(1)|_ man page. Look for the ``-I`` and ``-X`` options.
46 |hg(1)|_ man page. Look for the ``-I`` and ``-X`` options.
47
47
48 SYNTAX
48 Syntax
49 ------
49 ------
50
50
51 An ignore file is a plain text file consisting of a list of patterns,
51 An ignore file is a plain text file consisting of a list of patterns,
@@ -75,7 +75,7 b' the form ``*.c`` will match a file endin'
75 and a regexp pattern of the form ``\.c$`` will do the same. To root a
75 and a regexp pattern of the form ``\.c$`` will do the same. To root a
76 regexp pattern, start it with ``^``.
76 regexp pattern, start it with ``^``.
77
77
78 EXAMPLE
78 Example
79 -------
79 -------
80
80
81 Here is an example ignore file. ::
81 Here is an example ignore file. ::
@@ -91,17 +91,17 b' Here is an example ignore file. ::'
91 syntax: regexp
91 syntax: regexp
92 ^\.pc/
92 ^\.pc/
93
93
94 AUTHOR
94 Author
95 ------
95 ------
96 Vadim Gelfer <vadim.gelfer@gmail.com>
96 Vadim Gelfer <vadim.gelfer@gmail.com>
97
97
98 Mercurial was written by Matt Mackall <mpm@selenic.com>.
98 Mercurial was written by Matt Mackall <mpm@selenic.com>.
99
99
100 SEE ALSO
100 See Also
101 --------
101 --------
102 |hg(1)|_, |hgrc(5)|_
102 |hg(1)|_, |hgrc(5)|_
103
103
104 COPYING
104 Copying
105 -------
105 -------
106 This manual page is copyright 2006 Vadim Gelfer.
106 This manual page is copyright 2006 Vadim Gelfer.
107 Mercurial is copyright 2005-2009 Matt Mackall.
107 Mercurial is copyright 2005-2009 Matt Mackall.
@@ -16,13 +16,13 b' configuration files for Mercurial'
16 :class: htmlonly
16 :class: htmlonly
17
17
18
18
19 SYNOPSIS
19 Synopsis
20 --------
20 --------
21
21
22 The Mercurial system uses a set of configuration files to control
22 The Mercurial system uses a set of configuration files to control
23 aspects of its behavior.
23 aspects of its behavior.
24
24
25 FILES
25 Files
26 -----
26 -----
27
27
28 Mercurial reads configuration data from several files, if they exist.
28 Mercurial reads configuration data from several files, if they exist.
@@ -83,13 +83,11 b' ones.'
83 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
83 a ``Mercurial.ini`` file or be a directory where ``*.rc`` files will
84 be read.
84 be read.
85
85
86 SYNTAX
86 Syntax
87 ------
87 ------
88
88
89 A configuration file consists of sections, led by a ``[section]`` header
89 A configuration file consists of sections, led by a ``[section]`` header
90 and followed by ``name: value`` entries; ``name=value`` is also accepted.
90 and followed by ``name = value`` entries::
91
92 ::
93
91
94 [spam]
92 [spam]
95 eggs=ham
93 eggs=ham
@@ -110,7 +108,7 b' A line with ``%unset name`` will remove '
110 section, if it has been set previously.
108 section, if it has been set previously.
111
109
112
110
113 SECTIONS
111 Sections
114 --------
112 --------
115
113
116 This section describes the different sections that may appear in a
114 This section describes the different sections that may appear in a
@@ -935,17 +933,17 b' Web interface configuration.'
935 Where to find the HTML templates. Default is install path.
933 Where to find the HTML templates. Default is install path.
936
934
937
935
938 AUTHOR
936 Author
939 ------
937 ------
940 Bryan O'Sullivan <bos@serpentine.com>.
938 Bryan O'Sullivan <bos@serpentine.com>.
941
939
942 Mercurial was written by Matt Mackall <mpm@selenic.com>.
940 Mercurial was written by Matt Mackall <mpm@selenic.com>.
943
941
944 SEE ALSO
942 See Also
945 --------
943 --------
946 |hg(1)|_, |hgignore(5)|_
944 |hg(1)|_, |hgignore(5)|_
947
945
948 COPYING
946 Copying
949 -------
947 -------
950 This manual page is copyright 2005 Bryan O'Sullivan.
948 This manual page is copyright 2005 Bryan O'Sullivan.
951 Mercurial is copyright 2005-2009 Matt Mackall.
949 Mercurial is copyright 2005-2009 Matt Mackall.
@@ -1048,6 +1048,8 b' class Translator(nodes.NodeVisitor):'
1048 raise nodes.SkipNode
1048 raise nodes.SkipNode
1049 elif self.section_level == 1:
1049 elif self.section_level == 1:
1050 self.body.append('.SH ')
1050 self.body.append('.SH ')
1051 for n in node.traverse(nodes.Text):
1052 n.parent.replace(n, nodes.Text(n.astext().upper()))
1051 else:
1053 else:
1052 self.body.append('.SS ')
1054 self.body.append('.SS ')
1053
1055
@@ -1,32 +1,94 b''
1 /*
2 * Styles for man pages, which suit with http://mercurial.selenic.com/
3 *
4 * Color scheme & layout are borrowed from
5 * http://mercurial.selenic.com/css/styles.css
6 *
7 * Some styles are from html4css1.css from Docutils, which is in the
8 * public domain.
9 */
1
10
2 body {
11 body {
12 margin: 0;
13 padding: 0;
3 font-family: sans-serif;
14 font-family: sans-serif;
4 /* adjustment for tt padding */
15 color: #111;
5 line-height: 140%;
6 }
16 }
7
17
8 tt, pre {
18 .document {
9 background-color: #EEE;
19 position: relative; /* be a top of absolute positioning */
10 border: thin solid #CCC;
20 margin: 1.5em 1.8em;
11 padding: 1px;
21 padding: 0;
22 line-height: 1.3;
23 }
24
25 /* layout: toc to right */
26 #contents {
27 position: absolute;
28 right: 0;
29 top: 0;
30 width: 26%;
12 }
31 }
13
32
14 pre {
33 /* layout: others to left */
15 padding: 0.25em;
34 h1.title, h2.subtitle, .section { width: 72%; }
35 .section .section { width: auto; }
36 table.docinfo { max-width: 72%; }
37
38 /* headings */
39 h1, h2, .topic-title, .admonition-title {
40 font-family: "MgOpen Cosmetica", "Lucida Sans Unicode", sans-serif;
41 font-weight: normal;
42 }
43 h1, h2, .topic-title, .admonition-title {
44 margin: 1em 0 0.5em;
45 }
46 h1.title { font-size: 300%; }
47 h2.subtitle, h1 { font-size: 200%; }
48 h2, .topic-title, .admonition-title { font-size: 140%; }
49
50 /* subtitle starts with lowercase in man pages, but not in HTML */
51 h2.subtitle:first-letter { text-transform: uppercase; }
52
53 /* override first/last margin */
54 .first, h1.title, h2.subtitle { margin-top: 0 !important; }
55 .last, .with-subtitle { margin-bottom: 0 !important; }
56
57 blockquote, pre, dd .option-list, .field-list {
58 margin: 0.2em 0 1em 2em;
16 }
59 }
17
60
18 #contents tt, h2 tt {
61 kbd, tt, pre { font-family: monospace; }
19 background-color: inherit;
62
20 border: inherit;
63 dt { font-weight: bold; }
64 dd { margin-bottom: 0.5em; }
65
66 th, td { padding: 0.1em 0.2em; border: 0 none; }
67 th { font-weight: bold; text-align: left; }
68
69 a:link, a:visited { text-decoration: underline; }
70 a:hover, a:focus { text-decoration: none; }
71 a:link { color: #00b5f1; }
72 a:visited { color: #5c9caf; }
73 a:link.toc-backref, a:visited.toc-backref {
74 text-decoration: none;
75 color: #111; /* `inherit' not supported by IE6 */
21 }
76 }
22
77
23 /* styles taken from html4css1.css from Docutils, which is in the
78 div.admonition, div.attention, div.caution,
24 public domain */
79 div.danger, div.error, div.hint, div.important,
80 div.note, div.tip, div.warning {
81 border-top: 1px #ccc solid;
82 border-bottom: 1px #ccc solid;
83 padding: 0.3em 1em;
84 margin: 1em;
85 }
25
86
26 /* used to remove borders from tables and images */
87
27 .borderless, table.borderless td, table.borderless th {
88 /*
28 border: 0;
89 * The following styles are from docutils'.
29 }
90 * Please refine if necessary.
91 */
30
92
31 table.borderless td, table.borderless th {
93 table.borderless td, table.borderless th {
32 /* Override padding for "table.docutils td" with "! important".
94 /* Override padding for "table.docutils td" with "! important".
@@ -34,91 +96,24 b' table.borderless td, table.borderless th'
34 padding: 0 0.5em 0 0 ! important;
96 padding: 0 0.5em 0 0 ! important;
35 }
97 }
36
98
37 .first {
38 /* Override more specific margin styles with "! important". */
39 margin-top: 0 ! important;
40 }
41
42 .last, .with-subtitle {
43 margin-bottom: 0 ! important;
44 }
45
46 .hidden {
99 .hidden {
47 display: none;
100 display: none;
48 }
101 }
49
102
50 a.toc-backref {
51 text-decoration: none;
52 color: black;
53 }
54
55 blockquote.epigraph {
103 blockquote.epigraph {
56 margin: 2em 5em;;
104 margin: 2em 5em;
57 }
105 }
58
106
59 dl.docutils dd {
60 margin-bottom: 0.5em;
61 }
62
63 /* Uncomment (and remove this text!) to get bold-faced definition list terms
64 dl.docutils dt {
65 font-weight: bold;
66 }
67 */
68
69 div.abstract {
107 div.abstract {
70 margin: 2em 5em;
108 margin: 2em 5em;
71 }
109 }
72
110
73 div.abstract p.topic-title {
74 font-weight: bold;
75 text-align: center;
76 }
77
78 div.admonition, div.attention, div.caution, div.danger, div.error,
79 div.hint, div.important, div.note, div.tip, div.warning {
80 margin: 2em;
81 border: medium outset;
82 padding: 1em;
83 }
84
85 div.admonition p.admonition-title, div.hint p.admonition-title,
86 div.important p.admonition-title, div.note p.admonition-title,
87 div.tip p.admonition-title {
88 font-weight: bold;
89 font-family: sans-serif;
90 }
91
92 div.attention p.admonition-title, div.caution p.admonition-title,
93 div.danger p.admonition-title, div.error p.admonition-title,
94 div.warning p.admonition-title {
95 color: red;
96 font-weight: bold;
97 font-family: sans-serif;
98 }
99
100 /* Uncomment (and remove this text!) to get reduced vertical space in
101 compound paragraphs.
102 div.compound .compound-first, div.compound .compound-middle {
103 margin-bottom: 0.5em;
104 }
105
106 div.compound .compound-last, div.compound .compound-middle {
107 margin-top: 0.5em;
108 }
109 */
110
111 div.dedication {
111 div.dedication {
112 margin: 2em 5em;
112 margin: 2em 5em;
113 text-align: center;
113 text-align: center;
114 font-style: italic;
114 font-style: italic;
115 }
115 }
116
116
117 div.dedication p.topic-title {
118 font-weight: bold;
119 font-style: normal;
120 }
121
122 div.figure {
117 div.figure {
123 margin-left: 2em;
118 margin-left: 2em;
124 margin-right: 2em;
119 margin-right: 2em;
@@ -174,23 +169,11 b' div.system-message p.system-message-titl'
174 font-weight: bold;
169 font-weight: bold;
175 }
170 }
176
171
177 div.topic {
178 margin: 2em;
179 }
180
181 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
172 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
182 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
173 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
183 margin-top: 0.4em;
174 margin-top: 0.4em;
184 }
175 }
185
176
186 h1.title {
187 text-align: center;
188 }
189
190 h2.subtitle {
191 text-align: center;
192 }
193
194 hr.docutils {
177 hr.docutils {
195 width: 75%;
178 width: 75%;
196 }
179 }
@@ -252,21 +235,6 b' p.rubric {'
252 text-align: center;
235 text-align: center;
253 }
236 }
254
237
255 p.sidebar-title {
256 font-family: sans-serif;
257 font-weight: bold;
258 font-size: larger;
259 }
260
261 p.sidebar-subtitle {
262 font-family: sans-serif;
263 font-weight: bold;
264 }
265
266 p.topic-title {
267 font-weight: bold;
268 }
269
270 pre.address {
238 pre.address {
271 margin-bottom: 0;
239 margin-bottom: 0;
272 margin-top: 0;
240 margin-top: 0;
@@ -315,34 +283,11 b' table.citation {'
315 margin-left: 1px;
283 margin-left: 1px;
316 }
284 }
317
285
318 table.docinfo {
319 margin: 2em 4em;
320 }
321
322 table.docutils {
323 margin-top: 0.5em;
324 margin-bottom: 0.5em;
325 }
326
327 table.footnote {
286 table.footnote {
328 border-left: solid 1px black;
287 border-left: solid 1px black;
329 margin-left: 1px;
288 margin-left: 1px;
330 }
289 }
331
290
332 table.docutils td, table.docutils th,
333 table.docinfo td, table.docinfo th {
334 padding-left: 0.5em;
335 padding-right: 0.5em;
336 vertical-align: top;
337 }
338
339 table.docutils th.field-name, table.docinfo th.docinfo-name {
340 font-weight: bold;
341 text-align: left;
342 white-space: nowrap;
343 padding-left: 0;
344 }
345
346 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
291 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
347 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
292 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
348 font-size: 100%;
293 font-size: 100%;
@@ -135,7 +135,7 b' def do_relink(src, dst, files, ui):'
135 relinked += 1
135 relinked += 1
136 savedbytes += sz
136 savedbytes += sz
137 except OSError, inst:
137 except OSError, inst:
138 ui.warn(_('%s: %s\n') % (tgt, str(inst)))
138 ui.warn('%s: %s\n' % (tgt, str(inst)))
139
139
140 ui.status(_('relinked %d files (%d bytes reclaimed)\n') %
140 ui.status(_('relinked %d files (%d bytes reclaimed)\n') %
141 (relinked, savedbytes))
141 (relinked, savedbytes))
@@ -80,6 +80,7 b' def loaddoc(topic):'
80 return loader
80 return loader
81
81
82 helptable = (
82 helptable = (
83 (["config"], _("Configuration Files"), loaddoc('config')),
83 (["dates"], _("Date Formats"), loaddoc('dates')),
84 (["dates"], _("Date Formats"), loaddoc('dates')),
84 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
85 (["patterns"], _("File Name Patterns"), loaddoc('patterns')),
85 (['environment', 'env'], _('Environment Variables'), loaddoc('environment')),
86 (['environment', 'env'], _('Environment Variables'), loaddoc('environment')),
@@ -9,7 +9,7 b''
9 from i18n import _
9 from i18n import _
10 from lock import release
10 from lock import release
11 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
11 import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
12 import lock, util, extensions, error
12 import lock, util, extensions, error, encoding
13 import merge as _merge
13 import merge as _merge
14 import verify as _verify
14 import verify as _verify
15 import errno, os, shutil
15 import errno, os, shutil
@@ -320,7 +320,8 b' def clone(ui, source, dest=None, pull=Fa'
320 except error.RepoLookupError:
320 except error.RepoLookupError:
321 continue
321 continue
322 bn = dest_repo[uprev].branch()
322 bn = dest_repo[uprev].branch()
323 dest_repo.ui.status(_("updating to branch %s\n") % bn)
323 dest_repo.ui.status(_("updating to branch %s\n")
324 % encoding.tolocal(bn))
324 _update(dest_repo, uprev)
325 _update(dest_repo, uprev)
325
326
326 return src_repo, dest_repo
327 return src_repo, dest_repo
@@ -167,6 +167,13 b' def manifestmerge(repo, p1, p2, pa, over'
167 m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest()
167 m1, m2, ma = p1.manifest(), p2.manifest(), pa.manifest()
168 copied = set(copy.values())
168 copied = set(copy.values())
169
169
170 if not overwrite and '.hgsubstate' in m1:
171 # check whether sub state is modified
172 for s in p1.substate:
173 if p1.sub(s).dirty():
174 m1['.hgsubstate'] += "+"
175 break
176
170 # Compare manifests
177 # Compare manifests
171 for f, n in m1.iteritems():
178 for f, n in m1.iteritems():
172 if partial and not partial(f):
179 if partial and not partial(f):
@@ -52,7 +52,16 b' def submerge(repo, wctx, mctx, actx):'
52 sa = actx.substate
52 sa = actx.substate
53 sm = {}
53 sm = {}
54
54
55 repo.ui.debug("subrepo merge %s %s %s\n" % (wctx, mctx, actx))
56
57 def debug(s, msg, r=""):
58 if r:
59 r = "%s:%s" % r
60 repo.ui.debug(" subrepo %s: %s %s\n" % (s, msg, r))
61
55 for s, l in s1.items():
62 for s, l in s1.items():
63 if wctx != actx and wctx.sub(s).dirty():
64 l = (l[0], l[1] + "+")
56 a = sa.get(s, nullstate)
65 a = sa.get(s, nullstate)
57 if s in s2:
66 if s in s2:
58 r = s2[s]
67 r = s2[s]
@@ -60,6 +69,7 b' def submerge(repo, wctx, mctx, actx):'
60 sm[s] = l
69 sm[s] = l
61 continue
70 continue
62 elif l == a: # other side changed
71 elif l == a: # other side changed
72 debug(s, "other changed, get", r)
63 wctx.sub(s).get(r)
73 wctx.sub(s).get(r)
64 sm[s] = r
74 sm[s] = r
65 elif l[0] != r[0]: # sources differ
75 elif l[0] != r[0]: # sources differ
@@ -68,27 +78,33 b' def submerge(repo, wctx, mctx, actx):'
68 'use (l)ocal source (%s) or (r)emote source (%s)?')
78 'use (l)ocal source (%s) or (r)emote source (%s)?')
69 % (s, l[0], r[0]),
79 % (s, l[0], r[0]),
70 (_('&Local'), _('&Remote')), 0):
80 (_('&Local'), _('&Remote')), 0):
81 debug(s, "prompt changed, get", r)
71 wctx.sub(s).get(r)
82 wctx.sub(s).get(r)
72 sm[s] = r
83 sm[s] = r
73 elif l[1] == a[1]: # local side is unchanged
84 elif l[1] == a[1]: # local side is unchanged
85 debug(s, "other side changed, get", r)
74 wctx.sub(s).get(r)
86 wctx.sub(s).get(r)
75 sm[s] = r
87 sm[s] = r
76 else:
88 else:
89 debug(s, "both sides changed, merge with", r)
77 wctx.sub(s).merge(r)
90 wctx.sub(s).merge(r)
78 sm[s] = l
91 sm[s] = l
79 elif l == a: # remote removed, local unchanged
92 elif l == a: # remote removed, local unchanged
93 debug(s, "remote removed, remove")
80 wctx.sub(s).remove()
94 wctx.sub(s).remove()
81 else:
95 else:
82 if repo.ui.promptchoice(
96 if repo.ui.promptchoice(
83 _(' local changed subrepository %s which remote removed\n'
97 _(' local changed subrepository %s which remote removed\n'
84 'use (c)hanged version or (d)elete?') % s,
98 'use (c)hanged version or (d)elete?') % s,
85 (_('&Changed'), _('&Delete')), 0):
99 (_('&Changed'), _('&Delete')), 0):
100 debug(s, "prompt remove")
86 wctx.sub(s).remove()
101 wctx.sub(s).remove()
87
102
88 for s, r in s2.items():
103 for s, r in s2.items():
89 if s in s1:
104 if s in s1:
90 continue
105 continue
91 elif s not in sa:
106 elif s not in sa:
107 debug(s, "remote added, get", r)
92 wctx.sub(s).get(r)
108 wctx.sub(s).get(r)
93 sm[s] = r
109 sm[s] = r
94 elif r != sa[s]:
110 elif r != sa[s]:
@@ -96,6 +112,7 b' def submerge(repo, wctx, mctx, actx):'
96 _(' remote changed subrepository %s which local removed\n'
112 _(' remote changed subrepository %s which local removed\n'
97 'use (c)hanged version or (d)elete?') % s,
113 'use (c)hanged version or (d)elete?') % s,
98 (_('&Changed'), _('&Delete')), 0) == 0:
114 (_('&Changed'), _('&Delete')), 0) == 0:
115 debug(s, "prompt recreate", r)
99 wctx.sub(s).get(r)
116 wctx.sub(s).get(r)
100 sm[s] = r
117 sm[s] = r
101
118
@@ -156,6 +173,7 b' class hgsubrepo(object):'
156 return w.dirty() # working directory changed
173 return w.dirty() # working directory changed
157
174
158 def commit(self, text, user, date):
175 def commit(self, text, user, date):
176 self._repo.ui.debug("committing subrepo %s\n" % self._path)
159 n = self._repo.commit(text, user, date)
177 n = self._repo.commit(text, user, date)
160 if not n:
178 if not n:
161 return self._repo['.'].hex() # different version checked out
179 return self._repo['.'].hex() # different version checked out
@@ -181,11 +199,19 b' class hgsubrepo(object):'
181 def get(self, state):
199 def get(self, state):
182 self._get(state)
200 self._get(state)
183 source, revision = state
201 source, revision = state
202 self._repo.ui.debug("getting subrepo %s\n" % self._path)
184 hg.clean(self._repo, revision, False)
203 hg.clean(self._repo, revision, False)
185
204
186 def merge(self, state):
205 def merge(self, state):
187 self._get(state)
206 self._get(state)
188 hg.merge(self._repo, state[1], remind=False)
207 cur = self._repo['.']
208 dst = self._repo[state[1]]
209 if dst.ancestor(cur) == cur:
210 self._repo.ui.debug("updating subrepo %s\n" % self._path)
211 hg.update(self._repo, state[1])
212 else:
213 self._repo.ui.debug("merging subrepo %s\n" % self._path)
214 hg.merge(self._repo, state[1], remind=False)
189
215
190 def push(self, force):
216 def push(self, force):
191 # push subrepos depth-first for coherent ordering
217 # push subrepos depth-first for coherent ordering
@@ -198,4 +224,3 b' class hgsubrepo(object):'
198 dsturl = _abssource(self._repo, True)
224 dsturl = _abssource(self._repo, True)
199 other = hg.repository(self._repo.ui, dsturl)
225 other = hg.repository(self._repo.ui, dsturl)
200 self._repo.push(other, force)
226 self._repo.push(other, force)
201
@@ -186,7 +186,7 b' class ui(object):'
186 except KeyError:
186 except KeyError:
187 pass
187 pass
188 if not user:
188 if not user:
189 raise util.Abort(_("Please specify a username."))
189 raise util.Abort(_('no username supplied (see "hg help config")'))
190 if "\n" in user:
190 if "\n" in user:
191 raise util.Abort(_("username %s contains a newline\n") % repr(user))
191 raise util.Abort(_("username %s contains a newline\n") % repr(user))
192 return user
192 return user
@@ -13,7 +13,7 b' echo foo > a/foo'
13 hg -R a ci -Am foo
13 hg -R a ci -Am foo
14
14
15 hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
15 hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
16 hg clone http://localhost:$HGPORT1 b
16 hg --encoding utf-8 clone http://localhost:$HGPORT1 b
17 hg --encoding utf-8 -R b log
17 hg --encoding utf-8 -R b log
18 echo bar >> b/foo
18 echo bar >> b/foo
19 hg -R b ci -m bar
19 hg -R b ci -m bar
@@ -6,7 +6,7 b' adding changesets'
6 adding manifests
6 adding manifests
7 adding file changes
7 adding file changes
8 added 1 changesets with 1 changes to 1 files
8 added 1 changesets with 1 changes to 1 files
9 updating working directory
9 updating to branch æ
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 changeset: 0:867c11ce77b8
11 changeset: 0:867c11ce77b8
12 branch: æ
12 branch: æ
@@ -22,7 +22,7 b' user: foo@bar.com'
22 date: Mon Jan 12 13:46:40 1970 +0000
22 date: Mon Jan 12 13:46:40 1970 +0000
23 summary: commit-1
23 summary: commit-1
24
24
25 abort: Please specify a username.
25 abort: no username supplied (see "hg help config")
26 No username found, using user@host instead
26 No username found, using user@host instead
27 transaction abort!
27 transaction abort!
28 rollback completed
28 rollback completed
@@ -2,7 +2,7 b''
2
2
3 hg init repo
3 hg init repo
4 cd repo
4 cd repo
5 i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=$(($i + 1)); done
5 i=0; while [ "$i" -lt 213 ]; do echo a >> a; i=`expr $i + 1`; done
6 hg add a
6 hg add a
7
7
8 echo '% wide diffstat'
8 echo '% wide diffstat'
@@ -87,7 +87,7 b" application = hgweb('.', 'test repo')"
87 wsgicgi.launch(application)
87 wsgicgi.launch(application)
88 EOF
88 EOF
89 SCRIPT_NAME='/' SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
89 SCRIPT_NAME='/' SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
90 | grep '^[[:digit:]]) [[:alnum:] ]*$' # ignores HTML output
90 | grep '^[0-9]) ' # ignores HTML output
91
91
92 echo 'foo = !' >> $HGRCPATH
92 echo 'foo = !' >> $HGRCPATH
93 echo 'bar = !' >> $HGRCPATH
93 echo 'bar = !' >> $HGRCPATH
@@ -202,6 +202,7 b' list of commands:'
202
202
203 additional help topics:
203 additional help topics:
204
204
205 config Configuration Files
205 dates Date Formats
206 dates Date Formats
206 patterns File Name Patterns
207 patterns File Name Patterns
207 environment Environment Variables
208 environment Environment Variables
@@ -270,6 +271,7 b' list of commands:'
270
271
271 additional help topics:
272 additional help topics:
272
273
274 config Configuration Files
273 dates Date Formats
275 dates Date Formats
274 patterns File Name Patterns
276 patterns File Name Patterns
275 environment Environment Variables
277 environment Environment Variables
@@ -95,6 +95,7 b' list of commands:'
95
95
96 additional help topics:
96 additional help topics:
97
97
98 config Configuration Files
98 dates Date Formats
99 dates Date Formats
99 patterns File Name Patterns
100 patterns File Name Patterns
100 environment Environment Variables
101 environment Environment Variables
@@ -159,6 +160,7 b' use "hg -v help" to show aliases and glo'
159
160
160 additional help topics:
161 additional help topics:
161
162
163 config Configuration Files
162 dates Date Formats
164 dates Date Formats
163 patterns File Name Patterns
165 patterns File Name Patterns
164 environment Environment Variables
166 environment Environment Variables
@@ -13,6 +13,6 b' Checking templates...'
13 Checking patch...
13 Checking patch...
14 Checking commit editor...
14 Checking commit editor...
15 Checking username...
15 Checking username...
16 Please specify a username.
16 no username supplied (see "hg help config")
17 (specify a username in your .hgrc file)
17 (specify a username in your .hgrc file)
18 1 problems detected, please check your install!
18 1 problems detected, please check your install!
@@ -173,7 +173,8 b" hg email --date '1970-1-1 0:1' -n --flag"
173
173
174 echo "% test multi-byte domain parsing"
174 echo "% test multi-byte domain parsing"
175 UUML=`printf '\374'`
175 UUML=`printf '\374'`
176 export HGENCODING=iso-8859-1
176 HGENCODING=iso-8859-1
177 export HGENCODING
177 hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" \
178 hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" \
178 -s test -r 0
179 -s test -r 0
179 cat tmp.mbox | fixheaders
180 cat tmp.mbox | fixheaders
@@ -56,6 +56,9 b' resolving manifests'
56 overwrite None partial False
56 overwrite None partial False
57 ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4
57 ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4
58 .hgsubstate: versions differ -> m
58 .hgsubstate: versions differ -> m
59 subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
60 subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad
61 getting subrepo t
59 resolving manifests
62 resolving manifests
60 overwrite True partial False
63 overwrite True partial False
61 ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a
64 ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a
@@ -75,6 +78,9 b' resolving manifests'
75 overwrite None partial False
78 overwrite None partial False
76 ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf
79 ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf
77 .hgsubstate: versions differ -> m
80 .hgsubstate: versions differ -> m
81 subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
82 subrepo t: both sides changed, merge with t:7af322bc1198a32402fe903e0b7ebcfc5c9bf8f4
83 merging subrepo t
78 searching for copies back to rev 2
84 searching for copies back to rev 2
79 resolving manifests
85 resolving manifests
80 overwrite None partial False
86 overwrite None partial False
General Comments 0
You need to be logged in to leave comments. Login now