comparison mercurial/cmdutil.py @ 22303:0c838e7459a5 stable

import: show the warning message for failure of merging Before this patch, no message is shown for failure of merging at "hg import". In such case, merging patch is imported as a normal revision silently, and it may confuse users. For simplicity, this patch recommends just using "--exact", even though importing the merging patch itself is possible without it if: - the hash of the 1st parent in the patch is equal to one of the patch imported just before (or the parent of the working directory, for the 1st patch of the series), and - the hash of the 2nd parent in the patch is known in the local repository
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 27 Aug 2014 23:10:06 +0900
parents f6371cc62d2a
children bdc0e04df243 4fe5fa49eac8
comparison
equal deleted inserted replaced
22302:9472284df4eb 22303:0c838e7459a5
626 if p1 != parents[0]: 626 if p1 != parents[0]:
627 p1 = parents[0] 627 p1 = parents[0]
628 p2 = repo[nullid] 628 p2 = repo[nullid]
629 except error.RepoError: 629 except error.RepoError:
630 p1, p2 = parents 630 p1, p2 = parents
631 if p2.node() == nullid:
632 ui.warn(_("warning: import the patch as a normal revision\n"
633 "(use --exact to import the patch as a merge)\n"))
631 else: 634 else:
632 p1, p2 = parents 635 p1, p2 = parents
633 636
634 n = None 637 n = None
635 if update: 638 if update: