##// END OF EJS Templates
filemerge: add 'union' merge to internal merge tool...
Erik Huelsmann -
r26071:ff12a6c6 default
parent child Browse files
Show More
@@ -248,6 +248,17 b' def _merge(repo, mynode, orig, fcd, fco,'
248 return True, r
248 return True, r
249 return False, 0
249 return False, 0
250
250
251 @internaltool('union', True,
252 _("merging %s incomplete! "
253 "(edit conflicts, then use 'hg resolve --mark')\n"))
254 def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
255 """
256 Uses the internal non-interactive simple merge algorithm for merging
257 files. It will use both left and right sides for conflict regions.
258 No markers are inserted."""
259 return _merge(repo, mynode, orig, fcd, fco, fca, toolconf,
260 files, labels, 'union')
261
251 @internaltool('merge', True,
262 @internaltool('merge', True,
252 _("merging %s incomplete! "
263 _("merging %s incomplete! "
253 "(edit conflicts, then use 'hg resolve --mark')\n"))
264 "(edit conflicts, then use 'hg resolve --mark')\n"))
@@ -1202,6 +1202,11 b' Test dynamic list of merge tools only sh'
1202 ":tagmerge"
1202 ":tagmerge"
1203 Uses the internal tag merge algorithm (experimental).
1203 Uses the internal tag merge algorithm (experimental).
1204
1204
1205 ":union"
1206 Uses the internal non-interactive simple merge algorithm for merging
1207 files. It will use both left and right sides for conflict regions. No
1208 markers are inserted.
1209
1205 Internal tools are always available and do not require a GUI but will by
1210 Internal tools are always available and do not require a GUI but will by
1206 default not handle symlinks or binary files.
1211 default not handle symlinks or binary files.
1207
1212
@@ -1,5 +1,6 b''
1 Make sure that the internal merge tools (internal:fail, internal:local, and
1 Make sure that the internal merge tools (internal:fail, internal:local,
2 internal:other) are used when matched by a merge-pattern in hgrc
2 internal:union and internal:other) are used when matched by a
3 merge-pattern in hgrc
3
4
4 Make sure HGMERGE doesn't interfere with the test:
5 Make sure HGMERGE doesn't interfere with the test:
5
6
@@ -110,3 +111,31 b' Merge using default tool:'
110 $ hg stat
111 $ hg stat
111 M f
112 M f
112
113
114 Merge using internal:union tool:
115
116 $ hg update -C 2
117 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
118
119 $ echo "line 4a" >>f
120 $ hg ci -Am "Adding fourth line (commit 4)"
121 $ hg update 2
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
123
124 $ echo "line 4b" >>f
125 $ hg ci -Am "Adding fourth line v2 (commit 5)"
126 created new head
127
128 $ echo "[merge-patterns]" > .hg/hgrc
129 $ echo "* = internal:union" >> .hg/hgrc
130
131 $ hg merge 3
132 merging f
133 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
134 (branch merge, don't forget to commit)
135
136 $ cat f
137 line 1
138 line 2
139 third line
140 line 4b
141 line 4a
General Comments 0
You need to be logged in to leave comments. Login now