2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2020-09-17 20:13:14 +03:00
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
2014-06-09 14:49:07 +04:00
|
|
|
$ cat << EOF > a
|
|
|
|
> Small Mathematical Series.
|
|
|
|
> One
|
|
|
|
> Two
|
|
|
|
> Three
|
|
|
|
> Four
|
|
|
|
> Five
|
|
|
|
> Hop we are done.
|
|
|
|
> EOF
|
2010-08-12 15:02:59 +04:00
|
|
|
$ hg add a
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m ancestor
|
2014-06-09 14:49:07 +04:00
|
|
|
$ cat << EOF > a
|
|
|
|
> Small Mathematical Series.
|
|
|
|
> 1
|
|
|
|
> 2
|
|
|
|
> 3
|
|
|
|
> 4
|
|
|
|
> 5
|
|
|
|
> Hop we are done.
|
|
|
|
> EOF
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m branch1
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg co 'desc(ancestor)'
|
2010-08-12 15:02:59 +04:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2014-06-09 14:49:07 +04:00
|
|
|
$ cat << EOF > a
|
|
|
|
> Small Mathematical Series.
|
|
|
|
> 1
|
|
|
|
> 2
|
|
|
|
> 3
|
|
|
|
> 6
|
|
|
|
> 8
|
|
|
|
> Hop we are done.
|
|
|
|
> EOF
|
2010-09-03 01:22:51 +04:00
|
|
|
$ hg commit -m branch2
|
2010-08-12 15:02:59 +04:00
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg merge 'desc(branch1)'
|
2010-08-12 15:02:59 +04:00
|
|
|
merging a
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2010-08-12 15:02:59 +04:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
2010-09-13 03:05:53 +04:00
|
|
|
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
|
2010-09-17 02:51:32 +04:00
|
|
|
[1]
|
2010-08-12 15:02:59 +04:00
|
|
|
|
|
|
|
$ hg id
|
2019-12-18 00:45:17 +03:00
|
|
|
618808747361+c0c68e4fe667+
|
2010-08-12 15:02:59 +04:00
|
|
|
|
2017-08-03 02:42:35 +03:00
|
|
|
$ echo "[commands]" >> $HGRCPATH
|
|
|
|
$ echo "status.verbose=true" >> $HGRCPATH
|
|
|
|
$ hg status
|
|
|
|
M a
|
|
|
|
? a.orig
|
|
|
|
# The repository is in an unfinished *merge* state.
|
|
|
|
|
|
|
|
# Unresolved merge conflicts:
|
|
|
|
#
|
|
|
|
# a
|
|
|
|
#
|
|
|
|
# To mark files as resolved: hg resolve --mark FILE
|
|
|
|
|
|
|
|
# To continue: hg commit
|
|
|
|
# To abort: hg update --clean . (warning: this will discard uncommitted changes)
|
|
|
|
|
|
|
|
|
2010-08-12 15:02:59 +04:00
|
|
|
$ cat a
|
2014-06-09 14:49:07 +04:00
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2016-10-07 18:51:50 +03:00
|
|
|
<<<<<<< working copy: 618808747361 - test: branch2
|
2014-06-09 14:49:07 +04:00
|
|
|
6
|
|
|
|
8
|
2010-08-12 15:02:59 +04:00
|
|
|
=======
|
2014-06-09 14:49:07 +04:00
|
|
|
4
|
|
|
|
5
|
2016-11-20 02:41:37 +03:00
|
|
|
>>>>>>> merge rev: c0c68e4fe667 - test: branch1
|
2014-06-09 14:49:07 +04:00
|
|
|
Hop we are done.
|
2010-08-12 15:02:59 +04:00
|
|
|
|
2017-08-03 02:42:35 +03:00
|
|
|
$ hg status --config commands.status.verbose=0
|
2010-08-12 15:02:59 +04:00
|
|
|
M a
|
|
|
|
? a.orig
|
2014-05-09 03:50:22 +04:00
|
|
|
|
|
|
|
Verify custom conflict markers
|
|
|
|
|
|
|
|
$ hg up -q --clean .
|
2017-02-25 13:36:02 +03:00
|
|
|
$ cat <<EOF >> .hg/hgrc
|
|
|
|
> [ui]
|
2020-10-08 06:58:22 +03:00
|
|
|
> mergemarkertemplate = '{author} {node}'
|
2017-02-25 13:36:02 +03:00
|
|
|
> EOF
|
2014-05-09 03:50:22 +04:00
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg merge 'desc(branch1)'
|
2014-05-09 03:50:22 +04:00
|
|
|
merging a
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2014-05-09 03:50:22 +04:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
|
|
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
|
|
|
|
[1]
|
|
|
|
|
|
|
|
$ cat a
|
2014-06-09 14:49:07 +04:00
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2020-10-08 06:58:22 +03:00
|
|
|
<<<<<<< working copy: test 6188087473610f9c9c11296d35620d7e0d35f796
|
2014-06-09 14:49:07 +04:00
|
|
|
6
|
|
|
|
8
|
2014-05-09 03:50:22 +04:00
|
|
|
=======
|
2014-06-09 14:49:07 +04:00
|
|
|
4
|
|
|
|
5
|
2020-10-08 06:58:22 +03:00
|
|
|
>>>>>>> merge rev: test c0c68e4fe667f80c031c0e5871bcb12fae657a57
|
2014-06-09 14:49:07 +04:00
|
|
|
Hop we are done.
|
2014-05-09 03:50:22 +04:00
|
|
|
|
2014-07-05 21:56:41 +04:00
|
|
|
Verify line splitting of custom conflict marker which causes multiple lines
|
|
|
|
|
|
|
|
$ hg up -q --clean .
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [ui]
|
2020-10-08 06:58:22 +03:00
|
|
|
> mergemarkertemplate={author} {node}\nfoo\nbar\nbaz
|
2014-07-05 21:56:41 +04:00
|
|
|
> EOF
|
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg -q merge 'desc(branch1)'
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2014-07-05 21:56:41 +04:00
|
|
|
[1]
|
|
|
|
|
|
|
|
$ cat a
|
2014-06-09 14:49:07 +04:00
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2020-10-08 06:58:22 +03:00
|
|
|
<<<<<<< working copy: test 6188087473610f9c9c11296d35620d7e0d35f796
|
2014-06-09 14:49:07 +04:00
|
|
|
6
|
|
|
|
8
|
2014-07-05 21:56:41 +04:00
|
|
|
=======
|
2014-06-09 14:49:07 +04:00
|
|
|
4
|
|
|
|
5
|
2020-10-08 06:58:22 +03:00
|
|
|
>>>>>>> merge rev: test c0c68e4fe667f80c031c0e5871bcb12fae657a57
|
2014-06-09 14:49:07 +04:00
|
|
|
Hop we are done.
|
2014-07-05 21:56:41 +04:00
|
|
|
|
2014-07-05 21:56:41 +04:00
|
|
|
Verify line trimming of custom conflict marker using multi-byte characters
|
2014-05-09 03:50:22 +04:00
|
|
|
|
|
|
|
$ hg up -q --clean .
|
2017-07-05 19:10:11 +03:00
|
|
|
$ $PYTHON <<EOF
|
2020-01-30 04:05:21 +03:00
|
|
|
> fp = open('logfile', 'wb')
|
|
|
|
> fp.write(b'12345678901234567890123456789012345678901234567890' +
|
|
|
|
> b'1234567890') # there are 5 more columns for 80 columns
|
2014-07-05 21:56:41 +04:00
|
|
|
>
|
|
|
|
> # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes
|
2020-01-30 04:05:21 +03:00
|
|
|
> fp.write(b'\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88')
|
2014-07-05 21:56:41 +04:00
|
|
|
>
|
|
|
|
> fp.close()
|
|
|
|
> EOF
|
|
|
|
$ hg add logfile
|
|
|
|
$ hg --encoding utf-8 commit --logfile logfile
|
|
|
|
|
|
|
|
$ cat >> .hg/hgrc <<EOF
|
|
|
|
> [ui]
|
|
|
|
> mergemarkertemplate={desc|firstline}
|
|
|
|
> EOF
|
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg -q --encoding utf-8 merge 'desc(branch1)'
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2014-07-05 21:56:41 +04:00
|
|
|
[1]
|
|
|
|
|
|
|
|
$ cat a
|
2014-06-09 14:49:07 +04:00
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2016-10-07 18:51:50 +03:00
|
|
|
<<<<<<< working copy: 1234567890123456789012345678901234567890123456789012345...
|
2014-06-09 14:49:07 +04:00
|
|
|
6
|
|
|
|
8
|
2014-07-05 21:56:41 +04:00
|
|
|
=======
|
2014-06-09 14:49:07 +04:00
|
|
|
4
|
|
|
|
5
|
2016-10-07 18:51:50 +03:00
|
|
|
>>>>>>> merge rev: branch1
|
2014-06-09 14:49:07 +04:00
|
|
|
Hop we are done.
|
2014-07-05 21:56:41 +04:00
|
|
|
|
|
|
|
Verify basic conflict markers
|
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg up -q --clean 'desc(branch2)'
|
2014-05-09 03:50:22 +04:00
|
|
|
$ printf "\n[ui]\nmergemarkers=basic\n" >> .hg/hgrc
|
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg merge 'desc(branch1)'
|
2014-05-09 03:50:22 +04:00
|
|
|
merging a
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2014-05-09 03:50:22 +04:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
|
|
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
|
|
|
|
[1]
|
|
|
|
|
|
|
|
$ cat a
|
2014-06-09 14:49:07 +04:00
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
2016-10-07 18:51:50 +03:00
|
|
|
<<<<<<< working copy
|
2014-06-09 14:49:07 +04:00
|
|
|
6
|
|
|
|
8
|
2014-05-09 03:50:22 +04:00
|
|
|
=======
|
2014-06-09 14:49:07 +04:00
|
|
|
4
|
|
|
|
5
|
2016-10-07 18:51:50 +03:00
|
|
|
>>>>>>> merge rev
|
2014-06-09 14:49:07 +04:00
|
|
|
Hop we are done.
|
2014-08-06 01:58:45 +04:00
|
|
|
|
|
|
|
internal:merge3
|
|
|
|
|
|
|
|
$ hg up -q --clean .
|
|
|
|
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg merge 'desc(branch1)' --tool internal:merge3
|
2014-08-06 01:58:45 +04:00
|
|
|
merging a
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2014-08-06 01:58:45 +04:00
|
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
|
|
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
|
|
|
|
[1]
|
|
|
|
$ cat a
|
|
|
|
Small Mathematical Series.
|
2016-10-07 18:51:50 +03:00
|
|
|
<<<<<<< working copy
|
2014-08-06 01:58:45 +04:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
6
|
|
|
|
8
|
|
|
|
||||||| base
|
|
|
|
One
|
|
|
|
Two
|
|
|
|
Three
|
|
|
|
Four
|
|
|
|
Five
|
|
|
|
=======
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
2016-10-07 18:51:50 +03:00
|
|
|
>>>>>>> merge rev
|
2014-08-06 01:58:45 +04:00
|
|
|
Hop we are done.
|
2015-09-10 16:41:11 +03:00
|
|
|
|
|
|
|
Add some unconflicting changes on each head, to make sure we really
|
|
|
|
are merging, unlike :local and :other
|
|
|
|
|
|
|
|
$ hg up -C
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
encoding: replace 'ascii' with 'utf-8' automatically
Summary:
`ascii` was used as the default / fallback, which is not a user-friendly choice.
Nowadays utf-8 dominates:
- Rust stdlib is utf-8.
- Ruby since 1.9 is utf-8 by default.
- Python 3 is unicode by default.
- Windows 10 adds utf-8 code page.
Given the fact that:
- Our CI sets HGENCODING to utf-8
- Nuclide passes `--encoding=utf-8` to every command.
- Some people have messed up with `LC_*` and complained about hg crashes.
- utf-8 is a super set of ascii, nobody complains that they want `ascii`
encoding and the `utf-8` encoding messed their setup up.
Let's just use `utf-8` as the default encoding. More aggressively, if someone
sets `ascii` as the encoding, it's almost always a mistake. Auto-correct that
to `utf-8` too.
This should also make future integration with Rust easier (where it's enforced
utf-8 and does not have an option to change the encoding). In the future we
might just drop the flexibility of choosing customized encoding, so this diff
autofixes `ascii` to `utf-8`, instead of allowing `ascii` to be set. We cannot
enforce `utf-8` yet, because of Windows.
Here is our encoding strategy vs the upstream's:
| item | upstream | | ours | ours |
| | current | ideal | current | ideal |
| CLI argv | bytes | bytes | utf-8 [1] | utf-8 |
| path | bytes | auto [3] | migrating [2] | utf-8 |
| commit message | utf-8 | utf-8 | utf-8 | utf-8 |
| bookmark name | utf-8 | utf-8 | utf-8 | utf-8 |
| file content | bytes | bytes | bytes | bytes |
[1]: Argv was accidentally enforced utf-8 for command-line arguments by a Rust
wrapper. But it simplified a lot of things and is kind of ok: everything that
can be passed as CLI arguments are utf-8: -M commit message, -b bookmark, paths,
etc. There is no "file content" passed via CLI arguments.
[2]: Path is controversial, because it's possible for systems to have non-utf8
paths. The upstream behavior is incorrect if a repo gets shared among different
encoding systems (ex. both Linux and Windows). We have to know the encoding of
paths to be able to convert them suitable for the local system. One way is to
enforce UTF-8 for paths. The other is to keep encoding information stored with
individual paths (like Ruby strings). The UTF-8 approach is much simpler with
the tradeoff that non-utf-8 paths become unsupported, which seems to be a
reasonable trade-off.
[3]: See https://www.mercurial-scm.org/wiki/WindowsUTF8Plan.
Reviewed By: singhsrb
Differential Revision: D17098991
fbshipit-source-id: c0ff1e586a887233bd43cdb854fb3538aa9b70c2
2019-09-13 01:05:08 +03:00
|
|
|
updated to "e0693e20f496: 123456789012345678901234567890123456789012345678901234567890\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88" (esc)
|
2016-02-02 17:49:02 +03:00
|
|
|
1 other heads for branch "default"
|
2015-09-10 16:41:11 +03:00
|
|
|
$ printf "\n\nEnd of file\n" >> a
|
|
|
|
$ hg ci -m "Add some stuff at the end"
|
2020-10-08 21:06:31 +03:00
|
|
|
$ hg up -r 'desc(branch1)'
|
2015-09-10 16:41:11 +03:00
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ printf "Start of file\n\n\n" > tmp
|
|
|
|
$ cat a >> tmp
|
|
|
|
$ mv tmp a
|
|
|
|
$ hg ci -m "Add some stuff at the beginning"
|
|
|
|
|
|
|
|
Now test :merge-other and :merge-local
|
|
|
|
|
|
|
|
$ hg merge
|
|
|
|
merging a
|
2018-10-22 22:45:46 +03:00
|
|
|
warning: 1 conflicts while merging a! (edit, then use 'hg resolve --mark')
|
2015-09-10 16:41:11 +03:00
|
|
|
1 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
|
|
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
|
|
|
|
[1]
|
|
|
|
$ hg resolve --tool :merge-other a
|
|
|
|
merging a
|
|
|
|
(no more unresolved files)
|
|
|
|
$ cat a
|
|
|
|
Start of file
|
|
|
|
|
|
|
|
|
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
6
|
|
|
|
8
|
|
|
|
Hop we are done.
|
|
|
|
|
|
|
|
|
|
|
|
End of file
|
|
|
|
|
|
|
|
$ hg up -C
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
2017-06-06 19:47:39 +03:00
|
|
|
updated to "18b51d585961: Add some stuff at the beginning"
|
2016-02-02 17:49:02 +03:00
|
|
|
1 other heads for branch "default"
|
2015-09-10 16:41:11 +03:00
|
|
|
$ hg merge --tool :merge-local
|
|
|
|
merging a
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
(branch merge, don't forget to commit)
|
|
|
|
$ cat a
|
|
|
|
Start of file
|
|
|
|
|
|
|
|
|
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
Hop we are done.
|
|
|
|
|
|
|
|
|
|
|
|
End of file
|
mergetools: add new conflict marker format with diffs in
Summary:
Written by Martin von Zweigbergk at https://phab.mercurial-scm.org/D9551,
or https://www.mercurial-scm.org/repo/hg/rev/bdc2bf68f19e.
He suggested it and it's a useful feature. I did minor compatibility changes
(encoding, avoid rev numbers, foo_bar -> foobar).
Original commit message:
I use 3-way conflict markers. Often when I resolve them, I manually
compare one the base with one side and apply the differences to the
other side. That can be hard when the conflict marker is large. This
patch introduces a new type of conflict marker, which I'm hoping will
make it easier to resolve conflicts.
The new format uses `<<<<<<<` and `>>>>>>>` to open and close the
markers, just like our existing 2-way and 3-way conflict
markers. Instead of having 2 or 3 snapshots (left+right or
left+base+right), it has a sequence of diffs. A diff looks like this:
```
------- base
+++++++ left
a
-b
+c
d
```
A diff that adds one side ("diff from nothing") has a `=======` header
instead and does not have have `+` prefixed on its lines. A regular
3-way merge can be viewed as adding one side plus a diff between the
base and the other side. It thus has two ways of being represented,
depending on which side is being diffed:
```
<<<<<<<
======= left
contents
on
left
------- base
+++++++ right
contents
on
-left
+right
>>>>>>>
```
or
```
<<<<<<<
------- base
+++++++ left
contents
on
-right
+left
======= right
contents
on
right
>>>>>>>
```
I've made it so the new merge tool tries to pick a version that has
the most common lines (no difference in the example above).
I've called the new tool "mergediff" to stick to the convention of
starting with "merge" if the tool tries a regular 3-way merge.
The idea came from my pet VCS (placeholder name `jj`), which has
support for octopus merges and other ways of ending up with merges of
more than 3 versions. I wanted to be able to represent such conflicts
in the working copy and therefore thought of this format (although I
have not yet implemented it in my VCS). I then attended a meeting with
Larry McVoy, who said BitKeeper has an option (`bk smerge -g`) for
showing a similar format, which reminded me to actually attempt this
in Mercurial.
Reviewed By: DurhamG
Differential Revision: D26947920
fbshipit-source-id: 8b4446862897ff9a6dfdf5a2e35617d4db09e883
2021-03-11 04:23:28 +03:00
|
|
|
|
|
|
|
internal:mergediff
|
|
|
|
|
|
|
|
$ hg co -C 'desc(branch1)'
|
|
|
|
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
$ cat << EOF > a
|
|
|
|
> Small Mathematical Series.
|
|
|
|
> 1
|
|
|
|
> 2
|
|
|
|
> 3
|
|
|
|
> 4
|
|
|
|
> 4.5
|
|
|
|
> 5
|
|
|
|
> Hop we are done.
|
|
|
|
> EOF
|
|
|
|
$ hg co -m 'desc(branch2)' -t internal:mergediff
|
|
|
|
merging a
|
|
|
|
warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
|
|
use 'hg resolve' to retry unresolved file merges
|
|
|
|
[1]
|
|
|
|
$ cat a
|
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
<<<<<<<
|
|
|
|
------- base
|
|
|
|
+++++++ working copy
|
|
|
|
4
|
|
|
|
+4.5
|
|
|
|
5
|
|
|
|
======= destination
|
|
|
|
6
|
|
|
|
8
|
|
|
|
>>>>>>>
|
|
|
|
Hop we are done.
|
|
|
|
Test the same thing as above but modify a bit more so we instead get the working
|
|
|
|
copy in full and the diff from base to destination.
|
|
|
|
$ hg co -C 'desc(branch1)'
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ cat << EOF > a
|
|
|
|
> Small Mathematical Series.
|
|
|
|
> 1
|
|
|
|
> 2
|
|
|
|
> 3.5
|
|
|
|
> 4.5
|
|
|
|
> 5.5
|
|
|
|
> Hop we are done.
|
|
|
|
> EOF
|
|
|
|
$ hg co -m 'desc(branch2)' -t internal:mergediff
|
|
|
|
merging a
|
|
|
|
warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
|
|
use 'hg resolve' to retry unresolved file merges
|
|
|
|
[1]
|
|
|
|
$ cat a
|
|
|
|
Small Mathematical Series.
|
|
|
|
1
|
|
|
|
2
|
|
|
|
<<<<<<<
|
|
|
|
======= working copy
|
|
|
|
3.5
|
|
|
|
4.5
|
|
|
|
5.5
|
|
|
|
------- base
|
|
|
|
+++++++ destination
|
|
|
|
3
|
|
|
|
-4
|
|
|
|
-5
|
|
|
|
+6
|
|
|
|
+8
|
|
|
|
>>>>>>>
|
|
|
|
Hop we are done.
|