Show More
@@ -98,7 +98,7 b' i18n/hg.pot: $(PYTHON_FILES) mercurial/h' | |||||
98 | xgettext --package-name "Mercurial" \ |
|
98 | xgettext --package-name "Mercurial" \ | |
99 | --msgid-bugs-address "<mercurial-devel@selenic.com>" \ |
|
99 | --msgid-bugs-address "<mercurial-devel@selenic.com>" \ | |
100 | --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \ |
|
100 | --copyright-holder "Matt Mackall <mpm@selenic.com> and others" \ | |
101 | --from-code ISO-8859-1 --join --sort-by-file \ |
|
101 | --from-code ISO-8859-1 --join --sort-by-file --add-comments=i18n: \ | |
102 | -d hg -p i18n -o hg.pot |
|
102 | -d hg -p i18n -o hg.pot | |
103 | $(PYTHON) i18n/posplit i18n/hg.pot |
|
103 | $(PYTHON) i18n/posplit i18n/hg.pot | |
104 |
|
104 |
@@ -79,7 +79,7 b' def show_doc(ui):' | |||||
79 | # print options |
|
79 | # print options | |
80 | section(ui, _("Options")) |
|
80 | section(ui, _("Options")) | |
81 | for optstr, desc in get_opts(globalopts): |
|
81 | for optstr, desc in get_opts(globalopts): | |
82 | ui.write("%s\n%s\n\n" % (optstr, desc)) |
|
82 | ui.write("%s\n %s\n\n" % (optstr, desc)) | |
83 |
|
83 | |||
84 | # print cmds |
|
84 | # print cmds | |
85 | section(ui, _("Commands")) |
|
85 | section(ui, _("Commands")) | |
@@ -97,7 +97,7 b' def show_doc(ui):' | |||||
97 | ui.write("\n") |
|
97 | ui.write("\n") | |
98 |
|
98 | |||
99 | section(ui, _("Extensions")) |
|
99 | section(ui, _("Extensions")) | |
100 |
ui.write(_("This section contains help for extensions that |
|
100 | ui.write(_("This section contains help for extensions that are distributed " | |
101 | "together with Mercurial. Help for other extensions is available " |
|
101 | "together with Mercurial. Help for other extensions is available " | |
102 | "in the help system.")) |
|
102 | "in the help system.")) | |
103 | ui.write("\n\n" |
|
103 | ui.write("\n\n" | |
@@ -130,8 +130,13 b' def commandprinter(ui, cmdtable, section' | |||||
130 | d = get_cmd(h[f], cmdtable) |
|
130 | d = get_cmd(h[f], cmdtable) | |
131 | sectionfunc(ui, d['cmd']) |
|
131 | sectionfunc(ui, d['cmd']) | |
132 | # synopsis |
|
132 | # synopsis | |
133 | ui.write("``%s``\n" % d['synopsis'].replace("hg ","", 1)) |
|
133 | ui.write("::\n\n") | |
134 | ui.write("\n") |
|
134 | synopsislines = d['synopsis'].splitlines() | |
|
135 | for line in synopsislines: | |||
|
136 | # some commands (such as rebase) have a multi-line | |||
|
137 | # synopsis | |||
|
138 | ui.write(" %s\n" % line) | |||
|
139 | ui.write('\n') | |||
135 | # description |
|
140 | # description | |
136 | ui.write("%s\n\n" % d['desc'][1]) |
|
141 | ui.write("%s\n\n" % d['desc'][1]) | |
137 | # options |
|
142 | # options |
@@ -14,7 +14,8 b" libdir = '@LIBDIR@'" | |||||
14 |
|
14 | |||
15 | if libdir != '@' 'LIBDIR' '@': |
|
15 | if libdir != '@' 'LIBDIR' '@': | |
16 | if not os.path.isabs(libdir): |
|
16 | if not os.path.isabs(libdir): | |
17 |
libdir = os.path.join(os.path.dirname(__file__), |
|
17 | libdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), | |
|
18 | libdir) | |||
18 | libdir = os.path.abspath(libdir) |
|
19 | libdir = os.path.abspath(libdir) | |
19 | sys.path.insert(0, libdir) |
|
20 | sys.path.insert(0, libdir) | |
20 |
|
21 |
@@ -226,6 +226,8 b' def uisetup(ui):' | |||||
226 | def extsetup(ui): |
|
226 | def extsetup(ui): | |
227 | commands.globalopts.append( |
|
227 | commands.globalopts.append( | |
228 | ('', 'color', 'auto', |
|
228 | ('', 'color', 'auto', | |
|
229 | # i18n: 'always', 'auto', and 'never' are keywords and should | |||
|
230 | # not be translated | |||
229 | _("when to colorize (boolean, always, auto, or never)"), |
|
231 | _("when to colorize (boolean, always, auto, or never)"), | |
230 | _('TYPE'))) |
|
232 | _('TYPE'))) | |
231 |
|
233 |
@@ -51,7 +51,7 b' The extension uses an optional ``[eol]``' | |||||
51 | behavior. There are two settings: |
|
51 | behavior. There are two settings: | |
52 |
|
52 | |||
53 | - ``eol.native`` (default ``os.linesep``) can be set to ``LF`` or |
|
53 | - ``eol.native`` (default ``os.linesep``) can be set to ``LF`` or | |
54 | ``CRLF`` override the default interpretation of ``native`` for |
|
54 | ``CRLF`` to override the default interpretation of ``native`` for | |
55 | checkout. This can be used with :hg:`archive` on Unix, say, to |
|
55 | checkout. This can be used with :hg:`archive` on Unix, say, to | |
56 | generate an archive where files have line endings for Windows. |
|
56 | generate an archive where files have line endings for Windows. | |
57 |
|
57 |
@@ -278,7 +278,11 b' def backout(ui, repo, node=None, rev=Non' | |||||
278 | revert_opts['no_backup'] = None |
|
278 | revert_opts['no_backup'] = None | |
279 | revert(ui, repo, **revert_opts) |
|
279 | revert(ui, repo, **revert_opts) | |
280 | if not opts.get('merge') and op1 != node: |
|
280 | if not opts.get('merge') and op1 != node: | |
281 | return hg.update(repo, op1) |
|
281 | try: | |
|
282 | ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) | |||
|
283 | return hg.update(repo, op1) | |||
|
284 | finally: | |||
|
285 | ui.setconfig('ui', 'forcemerge', '') | |||
282 |
|
286 | |||
283 | commit_opts = opts.copy() |
|
287 | commit_opts = opts.copy() | |
284 | commit_opts['addremove'] = False |
|
288 | commit_opts['addremove'] = False | |
@@ -295,7 +299,11 b' def backout(ui, repo, node=None, rev=Non' | |||||
295 | hg.clean(repo, op1, show_stats=False) |
|
299 | hg.clean(repo, op1, show_stats=False) | |
296 | ui.status(_('merging with changeset %s\n') |
|
300 | ui.status(_('merging with changeset %s\n') | |
297 | % nice(repo.changelog.tip())) |
|
301 | % nice(repo.changelog.tip())) | |
298 | return hg.merge(repo, hex(repo.changelog.tip())) |
|
302 | try: | |
|
303 | ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) | |||
|
304 | return hg.merge(repo, hex(repo.changelog.tip())) | |||
|
305 | finally: | |||
|
306 | ui.setconfig('ui', 'forcemerge', '') | |||
299 | return 0 |
|
307 | return 0 | |
300 |
|
308 | |||
301 | def bisect(ui, repo, rev=None, extra=None, command=None, |
|
309 | def bisect(ui, repo, rev=None, extra=None, command=None, | |
@@ -2438,7 +2446,7 b' def log(ui, repo, *pats, **opts):' | |||||
2438 | ancestors or descendants of the starting revision. --follow-first |
|
2446 | ancestors or descendants of the starting revision. --follow-first | |
2439 | only follows the first parent of merge revisions. |
|
2447 | only follows the first parent of merge revisions. | |
2440 |
|
2448 | |||
2441 | If no revision range is specified, the default is tip:0 unless |
|
2449 | If no revision range is specified, the default is ``tip:0`` unless | |
2442 | --follow is set, in which case the working directory parent is |
|
2450 | --follow is set, in which case the working directory parent is | |
2443 | used as the starting revision. You can specify a revision set for |
|
2451 | used as the starting revision. You can specify a revision set for | |
2444 | log, see :hg:`help revsets` for more information. |
|
2452 | log, see :hg:`help revsets` for more information. | |
@@ -2943,7 +2951,7 b' def resolve(ui, repo, *pats, **opts):' | |||||
2943 |
|
2951 | |||
2944 | The resolve command can be used in the following ways: |
|
2952 | The resolve command can be used in the following ways: | |
2945 |
|
2953 | |||
2946 | - :hg:`resolve [--tool] FILE...`: attempt to re-merge the specified |
|
2954 | - :hg:`resolve [--tool TOOL] FILE...`: attempt to re-merge the specified | |
2947 | files, discarding any previous merge attempts. Re-merging is not |
|
2955 | files, discarding any previous merge attempts. Re-merging is not | |
2948 | performed for files already marked as resolved. Use ``--all/-a`` |
|
2956 | performed for files already marked as resolved. Use ``--all/-a`` | |
2949 | to selects all unresolved files. ``--tool`` can be used to specify |
|
2957 | to selects all unresolved files. ``--tool`` can be used to specify | |
@@ -4005,6 +4013,8 b' table = {' | |||||
4005 | _('merge with old dirstate parent after backout')), |
|
4013 | _('merge with old dirstate parent after backout')), | |
4006 | ('', 'parent', '', |
|
4014 | ('', 'parent', '', | |
4007 | _('parent to choose when backing out merge'), _('REV')), |
|
4015 | _('parent to choose when backing out merge'), _('REV')), | |
|
4016 | ('t', 'tool', '', | |||
|
4017 | _('specify merge tool')), | |||
4008 | ('r', 'rev', '', |
|
4018 | ('r', 'rev', '', | |
4009 | _('revision to backout'), _('REV')), |
|
4019 | _('revision to backout'), _('REV')), | |
4010 | ] + walkopts + commitopts + commitopts2, |
|
4020 | ] + walkopts + commitopts + commitopts2, |
@@ -45,7 +45,7 b' class _demandmod(object):' | |||||
45 | if not self._module: |
|
45 | if not self._module: | |
46 | head, globals, locals, after, level = self._data |
|
46 | head, globals, locals, after, level = self._data | |
47 | if level is not None: |
|
47 | if level is not None: | |
48 |
mod = _origimport(head, globals, locals, level |
|
48 | mod = _origimport(head, globals, locals, level) | |
49 | else: |
|
49 | else: | |
50 | mod = _origimport(head, globals, locals) |
|
50 | mod = _origimport(head, globals, locals) | |
51 | # load submodules |
|
51 | # load submodules |
@@ -24,7 +24,7 b' def dispatch(args):' | |||||
24 | except util.Abort, inst: |
|
24 | except util.Abort, inst: | |
25 | sys.stderr.write(_("abort: %s\n") % inst) |
|
25 | sys.stderr.write(_("abort: %s\n") % inst) | |
26 | if inst.hint: |
|
26 | if inst.hint: | |
27 | sys.stderr.write("(%s)\n" % inst.hint) |
|
27 | sys.stderr.write(_("(%s)\n") % inst.hint) | |
28 | return -1 |
|
28 | return -1 | |
29 | except error.ParseError, inst: |
|
29 | except error.ParseError, inst: | |
30 | if len(inst.args) > 1: |
|
30 | if len(inst.args) > 1: |
@@ -5,23 +5,38 b' file. Merge tools are given the two file' | |||||
5 | ancestor of the two file versions, so they can determine the changes |
|
5 | ancestor of the two file versions, so they can determine the changes | |
6 | made on both branches. |
|
6 | made on both branches. | |
7 |
|
7 | |||
8 |
|
|
8 | Merge tools are used both for :hg:`resolve`, :hg:`merge`, :hg:`update`, | |
|
9 | :hg:`backout` and in several extensions. | |||
9 |
|
10 | |||
10 |
Usually, the merge tool tries to automatically |
|
11 | Usually, the merge tool tries to automatically reconcile the files by | |
11 |
non-overlapping changes that occurred separately in |
|
12 | combining all non-overlapping changes that occurred separately in | |
12 | evolutions of the same initial base file. Furthermore, some |
|
13 | the two different evolutions of the same initial base file. Furthermore, some | |
13 | interactive merge programs make it easier to manually resolve |
|
14 | interactive merge programs make it easier to manually resolve | |
14 | conflicting merges, either in a graphical way, or by inserting some |
|
15 | conflicting merges, either in a graphical way, or by inserting some | |
15 | conflict markers. Mercurial does not include any interactive merge |
|
16 | conflict markers. Mercurial does not include any interactive merge | |
16 |
programs but relies on external tools for that. |
|
17 | programs but relies on external tools for that. | |
17 | and their properties and usage is configured in merge-tools section - |
|
18 | ||
18 | see hgrc(5). |
|
19 | Available merge tools | |
|
20 | """"""""""""""""""""" | |||
|
21 | ||||
|
22 | External merge tools and their properties and usage is configured in the | |||
|
23 | merge-tools configuration section - see hgrc(5) - but they can often also just | |||
|
24 | be named by their executable. | |||
|
25 | ||||
|
26 | A merge tool is generally usable if its executable can be found on the | |||
|
27 | system and if it can handle the merge. The executable can be found on the | |||
|
28 | system if it either is an absolute or relative executable path or the name of | |||
|
29 | an application in the executable search path. The tool is assumed to be able | |||
|
30 | to handle the merge if it can handle symlinks if the file is a symlink, if it | |||
|
31 | can handle binary files if the file is binary, and if a GUI is available if the | |||
|
32 | tool requires a GUI. | |||
19 |
|
33 | |||
20 | There are a some internal merge tools which can be used. The internal |
|
34 | There are a some internal merge tools which can be used. The internal | |
21 | merge tools are: |
|
35 | merge tools are: | |
22 |
|
36 | |||
23 | ``internal:merge`` |
|
37 | ``internal:merge`` | |
24 |
Uses the internal non-interactive merge |
|
38 | Uses the internal non-interactive simple merge algorithm for merging files. | |
|
39 | It will fail if there are any conflicts. | |||
25 |
|
40 | |||
26 | ``internal:fail`` |
|
41 | ``internal:fail`` | |
27 | Rather than attempting to merge files that were modified on both |
|
42 | Rather than attempting to merge files that were modified on both | |
@@ -32,7 +47,7 b' merge tools are:' | |||||
32 | Uses the local version of files as the merged version. |
|
47 | Uses the local version of files as the merged version. | |
33 |
|
48 | |||
34 | ``internal:other`` |
|
49 | ``internal:other`` | |
35 |
Uses the |
|
50 | Uses the other version of files as the merged version. | |
36 |
|
51 | |||
37 | ``internal:prompt`` |
|
52 | ``internal:prompt`` | |
38 | Asks the user which of the local or the other version to keep as |
|
53 | Asks the user which of the local or the other version to keep as | |
@@ -41,45 +56,54 b' merge tools are:' | |||||
41 | ``internal:dump`` |
|
56 | ``internal:dump`` | |
42 | Creates three versions of the files to merge, containing the |
|
57 | Creates three versions of the files to merge, containing the | |
43 | contents of local, other and base. These files can then be used to |
|
58 | contents of local, other and base. These files can then be used to | |
44 |
perform a merge manually. If the file merged is name |
|
59 | perform a merge manually. If the file to be merged is named | |
45 | these files will accordingly be named ``a.txt.local``, |
|
60 | ``a.txt``, these files will accordingly be named ``a.txt.local``, | |
46 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the |
|
61 | ``a.txt.other`` and ``a.txt.base`` and they will be placed in the | |
47 |
same directory as |
|
62 | same directory as ``a.txt``. | |
|
63 | ||||
|
64 | Internal tools are always available and do not require a GUI but will by default | |||
|
65 | not handle symlinks or binary files. | |||
48 |
|
66 | |||
49 | How Mercurial decides which merge program to use |
|
67 | Choosing a merge tool | |
|
68 | """"""""""""""""""""" | |||
|
69 | ||||
|
70 | Mercurial uses these rules when decing which merge tool to use: | |||
50 |
|
71 | |||
51 | 1. If the ``HGMERGE`` environment variable is present, it is used. If |
|
72 | 0. If a tool has been specified with the --tool option to merge or resolve, it | |
52 | specified it must be either an executable path or the name of an |
|
73 | is used. If it is the name of a tool in the merge-tools configuration, its | |
53 | application in your executable search path. |
|
74 | configuration is used. Otherwise the specified tool must be executable by | |
|
75 | the shell. | |||
54 |
|
76 | |||
55 | 2. If the filename of the file to be merged matches any of the |
|
77 | 1. If the ``HGMERGE`` environment variable is present, its value is used and | |
56 | patterns in the merge-patterns configuration section, then the |
|
78 | must be executable by the shell. | |
57 | corresponding merge tool is used, unless the file to be merged is a |
|
79 | ||
58 | symlink. Here binary capabilities of the merge tool are not |
|
80 | 2. If the filename of the file to be merged matches any of the patterns in the | |
59 | considered. |
|
81 | merge-patterns configuration section, the first usable merge tool | |
|
82 | corresponding to a matching pattern is used. Here, binary capabilities of the | |||
|
83 | merge tool are not considered. | |||
60 |
|
84 | |||
61 | 3. If ui.merge is set, it is used. |
|
85 | 3. If ui.merge is set it will be considered next. If the value is not the name | |
|
86 | of a configured tool, the specified value is used and must be executable by | |||
|
87 | the shell. Otherwise the named tool is used if it is usable. | |||
62 |
|
88 | |||
63 | 4. If any merge tools are present in the merge-tools configuration |
|
89 | 4. If any usable merge tools are present in the merge-tools configuration | |
64 | section, and any of the tools can be found on the system, the |
|
90 | section, the one with the higest priority is used. | |
65 | priority settings are used to determine which one to use. Binary, |
|
|||
66 | symlink and GUI capabilities do also have to match. |
|
|||
67 |
|
91 | |||
68 |
5. If a program named ``hgmerge`` |
|
92 | 5. If a program named ``hgmerge`` can be found on the system, it is used - but | |
|
93 | it will by default not be used for symlinks and binary files. | |||
69 |
|
94 | |||
70 | 6. If the file to be merged is not binary and is not a symlink, then |
|
95 | 6. If the file to be merged is not binary and is not a symlink, then | |
71 | ``internal:merge`` is used. |
|
96 | ``internal:merge`` is used. | |
72 |
|
97 | |||
73 | 7. The merge fails. |
|
98 | 7. The merge of the file fails and must be resolved before commit. | |
74 |
|
99 | |||
75 | .. note:: |
|
100 | .. note:: | |
76 | After selecting a merge program, Mercurial will by default attempt |
|
101 | After selecting a merge program, Mercurial will by default attempt | |
77 |
to merge the files using a simple merge algorithm first |
|
102 | to merge the files using a simple merge algorithm first. Only if it doesn't | |
78 | they can be merged without conflicts. Only if there are conflicting |
|
103 | succeed because of conflicting changes Mercurial will actually execute the | |
79 | changes Mercurial will actually execute the merge program. Whether |
|
104 | merge program. Whether to use the simple merge algorithm first can be | |
80 | to use the simple merge algorithm first can be controlled be the |
|
105 | controlled by the premerge setting of the merge tool. Premerge is enabled by | |
81 | premerge setting of the merge tool, which is enabled by default |
|
106 | default unless the file is binary or a symlink. | |
82 | unless the file is binary or symlink. |
|
|||
83 |
|
107 | |||
84 | See the merge-tools and ui sections of hgrc(5) for details on |
|
108 | See the merge-tools and ui sections of hgrc(5) for details on the | |
85 | configuration of merge tools. |
|
109 | configuration of merge tools. |
@@ -178,26 +178,26 b' Some sample queries:' | |||||
178 |
|
178 | |||
179 | - Changesets on the default branch:: |
|
179 | - Changesets on the default branch:: | |
180 |
|
180 | |||
181 |
hg log -r |
|
181 | hg log -r "branch(default)" | |
182 |
|
182 | |||
183 | - Changesets on the default branch since tag 1.5 (excluding merges):: |
|
183 | - Changesets on the default branch since tag 1.5 (excluding merges):: | |
184 |
|
184 | |||
185 |
hg log -r |
|
185 | hg log -r "branch(default) and 1.5:: and not merge()" | |
186 |
|
186 | |||
187 | - Open branch heads:: |
|
187 | - Open branch heads:: | |
188 |
|
188 | |||
189 |
hg log -r |
|
189 | hg log -r "head() and not closed()" | |
190 |
|
190 | |||
191 | - Changesets between tags 1.3 and 1.5 mentioning "bug" that affect |
|
191 | - Changesets between tags 1.3 and 1.5 mentioning "bug" that affect | |
192 | ``hgext/*``:: |
|
192 | ``hgext/*``:: | |
193 |
|
193 | |||
194 |
hg log -r |
|
194 | hg log -r "1.3::1.5 and keyword(bug) and file('hgext/*')" | |
195 |
|
195 | |||
196 | - Changesets in committed May 2008, sorted by user:: |
|
196 | - Changesets in committed May 2008, sorted by user:: | |
197 |
|
197 | |||
198 |
hg log -r |
|
198 | hg log -r "sort(date('May 2008'), user)" | |
199 |
|
199 | |||
200 | - Changesets mentioning "bug" or "issue" that are not in a tagged |
|
200 | - Changesets mentioning "bug" or "issue" that are not in a tagged | |
201 | release:: |
|
201 | release:: | |
202 |
|
202 | |||
203 |
hg log -r |
|
203 | hg log -r "(keyword(bug) or keyword(issue)) and not ancestors(tagged())" |
@@ -490,7 +490,7 b' class svnsubrepo(abstractsubrepo):' | |||||
490 | doc = xml.dom.minidom.parseString(output) |
|
490 | doc = xml.dom.minidom.parseString(output) | |
491 | entries = doc.getElementsByTagName('entry') |
|
491 | entries = doc.getElementsByTagName('entry') | |
492 | if not entries: |
|
492 | if not entries: | |
493 | return 0 |
|
493 | return '0' | |
494 | return str(entries[0].getAttribute('revision')) or '0' |
|
494 | return str(entries[0].getAttribute('revision')) or '0' | |
495 |
|
495 | |||
496 | def _wcchanged(self): |
|
496 | def _wcchanged(self): |
@@ -1,5 +1,3 b'' | |||||
1 | $ HGMERGE=true; export HGMERGE |
|
|||
2 |
|
||||
3 |
|
|
1 | $ hg init basic | |
4 | $ cd basic |
|
2 | $ cd basic | |
5 |
|
3 | |||
@@ -20,7 +18,7 b' basic operation' | |||||
20 | $ echo b >> a |
|
18 | $ echo b >> a | |
21 | $ hg commit -d '1 0' -m b |
|
19 | $ hg commit -d '1 0' -m b | |
22 |
|
20 | |||
23 | $ hg backout -d '2 0' tip |
|
21 | $ hg backout -d '2 0' tip --tool=true | |
24 | reverting a |
|
22 | reverting a | |
25 | changeset 2:2929462c3dff backs out changeset 1:a820f4f40a57 |
|
23 | changeset 2:2929462c3dff backs out changeset 1:a820f4f40a57 | |
26 | $ cat a |
|
24 | $ cat a | |
@@ -39,7 +37,7 b' file that was removed is recreated' | |||||
39 | $ hg rm a |
|
37 | $ hg rm a | |
40 | $ hg commit -d '1 0' -m b |
|
38 | $ hg commit -d '1 0' -m b | |
41 |
|
39 | |||
42 | $ hg backout -d '2 0' tip |
|
40 | $ hg backout -d '2 0' tip --tool=true | |
43 | adding a |
|
41 | adding a | |
44 | changeset 2:de31bdc76c0d backs out changeset 1:76862dcce372 |
|
42 | changeset 2:de31bdc76c0d backs out changeset 1:76862dcce372 | |
45 | $ cat a |
|
43 | $ cat a | |
@@ -47,7 +45,7 b' file that was removed is recreated' | |||||
47 |
|
45 | |||
48 | backout of backout is as if nothing happened |
|
46 | backout of backout is as if nothing happened | |
49 |
|
47 | |||
50 | $ hg backout -d '3 0' --merge tip |
|
48 | $ hg backout -d '3 0' --merge tip --tool=true | |
51 | removing a |
|
49 | removing a | |
52 | changeset 3:7f6d0f120113 backs out changeset 2:de31bdc76c0d |
|
50 | changeset 3:7f6d0f120113 backs out changeset 2:de31bdc76c0d | |
53 | $ cat a 2>/dev/null || echo cat: a: No such file or directory |
|
51 | $ cat a 2>/dev/null || echo cat: a: No such file or directory | |
@@ -102,7 +100,7 b' remove line 1' | |||||
102 | $ echo line 3 >> a |
|
100 | $ echo line 3 >> a | |
103 | $ hg commit -d '2 0' -m c |
|
101 | $ hg commit -d '2 0' -m c | |
104 |
|
102 | |||
105 | $ hg backout --merge -d '3 0' 1 |
|
103 | $ hg backout --merge -d '3 0' 1 --tool=true | |
106 | reverting a |
|
104 | reverting a | |
107 | created new head |
|
105 | created new head | |
108 | changeset 3:26b8ccb9ad91 backs out changeset 1:5a50a024c182 |
|
106 | changeset 3:26b8ccb9ad91 backs out changeset 1:5a50a024c182 | |
@@ -133,7 +131,7 b' backout should not back out subsequent c' | |||||
133 | adding b |
|
131 | adding b | |
134 |
|
132 | |||
135 | without --merge |
|
133 | without --merge | |
136 | $ hg backout -d '3 0' 1 |
|
134 | $ hg backout -d '3 0' 1 --tool=true | |
137 | reverting a |
|
135 | reverting a | |
138 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
136 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
139 | $ hg locate b |
|
137 | $ hg locate b | |
@@ -144,7 +142,7 b' without --merge' | |||||
144 | b |
|
142 | b | |
145 |
|
143 | |||
146 | with --merge |
|
144 | with --merge | |
147 | $ hg backout --merge -d '3 0' 1 |
|
145 | $ hg backout --merge -d '3 0' 1 --tool=true | |
148 | reverting a |
|
146 | reverting a | |
149 | created new head |
|
147 | created new head | |
150 | changeset 3:3202beb76721 backs out changeset 1:22bca4c721e5 |
|
148 | changeset 3:3202beb76721 backs out changeset 1:22bca4c721e5 | |
@@ -201,7 +199,7 b' backout of non-merge with parent should ' | |||||
201 |
|
199 | |||
202 | backout with valid parent should be ok |
|
200 | backout with valid parent should be ok | |
203 |
|
201 | |||
204 | $ hg backout -d '5 0' --parent 2 4 |
|
202 | $ hg backout -d '5 0' --parent 2 4 --tool=true | |
205 | removing d |
|
203 | removing d | |
206 | changeset 5:10e5328c8435 backs out changeset 4:b2f3bb92043e |
|
204 | changeset 5:10e5328c8435 backs out changeset 4:b2f3bb92043e | |
207 |
|
205 | |||
@@ -210,7 +208,7 b' backout with valid parent should be ok' | |||||
210 | $ hg update -C |
|
208 | $ hg update -C | |
211 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
209 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
212 |
|
210 | |||
213 | $ hg backout -d '6 0' --parent 3 4 |
|
211 | $ hg backout -d '6 0' --parent 3 4 --tool=true | |
214 | removing c |
|
212 | removing c | |
215 | changeset 5:033590168430 backs out changeset 4:b2f3bb92043e |
|
213 | changeset 5:033590168430 backs out changeset 4:b2f3bb92043e | |
216 |
|
214 | |||
@@ -236,7 +234,7 b' named branches' | |||||
236 | adding file2 |
|
234 | adding file2 | |
237 |
|
235 | |||
238 | without --merge |
|
236 | without --merge | |
239 | $ hg backout -r 1 |
|
237 | $ hg backout -r 1 --tool=true | |
240 | removing file1 |
|
238 | removing file1 | |
241 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
239 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
242 | $ hg branch |
|
240 | $ hg branch | |
@@ -248,7 +246,7 b' without --merge' | |||||
248 |
|
246 | |||
249 | with --merge |
|
247 | with --merge | |
250 | $ hg update -qC |
|
248 | $ hg update -qC | |
251 | $ hg backout --merge -d '3 0' -r 1 -m 'backout on branch1' |
|
249 | $ hg backout --merge -d '3 0' -r 1 -m 'backout on branch1' --tool=true | |
252 | removing file1 |
|
250 | removing file1 | |
253 | created new head |
|
251 | created new head | |
254 | changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3 |
|
252 | changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3 |
@@ -196,7 +196,7 b' Show all commands + options' | |||||
196 | update: clean, check, date, rev |
|
196 | update: clean, check, date, rev | |
197 | addremove: similarity, include, exclude, dry-run |
|
197 | addremove: similarity, include, exclude, dry-run | |
198 | archive: no-decode, prefix, rev, type, subrepos, include, exclude |
|
198 | archive: no-decode, prefix, rev, type, subrepos, include, exclude | |
199 | backout: merge, parent, rev, include, exclude, message, logfile, date, user |
|
199 | backout: merge, parent, tool, rev, include, exclude, message, logfile, date, user | |
200 | bisect: reset, good, bad, skip, command, noupdate |
|
200 | bisect: reset, good, bad, skip, command, noupdate | |
201 | branch: force, clean |
|
201 | branch: force, clean | |
202 | branches: active, closed |
|
202 | branches: active, closed |
@@ -59,6 +59,15 b' rebase b onto r1' | |||||
59 | 1 r2 |
|
59 | 1 r2 | |
60 | 0 r1 |
|
60 | 0 r1 | |
61 |
|
61 | |||
|
62 | test transplanted revset | |||
|
63 | ||||
|
64 | $ hg log -r 'transplanted()' --template '{rev} {parents} {desc}\n' | |||
|
65 | 5 1:d11e3596cc1a b1 | |||
|
66 | 6 b2 | |||
|
67 | 7 b3 | |||
|
68 | $ hg help revsets | grep transplanted | |||
|
69 | "transplanted(set)" | |||
|
70 | ||||
62 | $ hg clone ../t ../prune |
|
71 | $ hg clone ../t ../prune | |
63 | updating to branch default |
|
72 | updating to branch default | |
64 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
73 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now