comparison mercurial/filemerge.py @ 21918:10abc3a5c6b2

filemerge: use 'basic' as the default of '[ui] mergemarkers' for safety Before this patch, 'detailed' is used as the default of '[ui] mergemarkers'. This embeds non-ASCII characters in tags, branches, bookmarks, author and/or commit descriptions into merged files in the encoding specified by '--encoding' global option, 'HGENCODING' or other locale setting environment variables. But, if files to be merged use another encoding, this behavior breaks consistency of encoding in merged files. For example, ISO-2022-JP or EUC-JP are sometimes used as the file encoding for Japanese characters, because of historical and/or environmental reasons, even though UTF-8 or Shift-JIS are ordinarily used as the terminal encoding. This can't be resolved automatically, because Mercurial doesn't aware encoding of managed files. This patch uses 'basic' as the default of '[ui] mergemarkers' to avoid embedding encoding sensitive characters for safety. This patch puts '[ui] mergemarkers = detailed' into default hgrc file for tests, to reduce changes for tests in this patch.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 06 Jul 2014 02:56:41 +0900
parents 78e56e70c70a
children ecc1387138ba
comparison
equal deleted inserted replaced
21917:ac3b3a2d976d 21918:10abc3a5c6b2
374 else: 374 else:
375 ui.status(_("merging %s\n") % fd) 375 ui.status(_("merging %s\n") % fd)
376 376
377 ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca)) 377 ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))
378 378
379 markerstyle = ui.config('ui', 'mergemarkers', 'detailed') 379 markerstyle = ui.config('ui', 'mergemarkers', 'basic')
380 if markerstyle == 'basic': 380 if markerstyle == 'basic':
381 formattedlabels = _defaultconflictlabels 381 formattedlabels = _defaultconflictlabels
382 else: 382 else:
383 if not labels: 383 if not labels:
384 labels = _defaultconflictlabels 384 labels = _defaultconflictlabels