comparison mercurial/merge.py @ 48704:58a2c66fa94c

merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12107
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 28 Jan 2022 14:25:32 +0100
parents 6c4b10d01af0
children bca57b01518f
comparison
equal deleted inserted replaced
48703:6c4b10d01af0 48704:58a2c66fa94c
1920 if ms.unresolvedcount(): 1920 if ms.unresolvedcount():
1921 msg = _(b"outstanding merge conflicts") 1921 msg = _(b"outstanding merge conflicts")
1922 hint = _(b"use 'hg resolve' to resolve") 1922 hint = _(b"use 'hg resolve' to resolve")
1923 raise error.StateError(msg, hint=hint) 1923 raise error.StateError(msg, hint=hint)
1924 if branchmerge: 1924 if branchmerge:
1925 m_a = _(b"merging with a working directory ancestor has no effect")
1925 if pas == [p2]: 1926 if pas == [p2]:
1926 raise error.Abort( 1927 raise error.Abort(m_a)
1927 _(
1928 b"merging with a working directory ancestor"
1929 b" has no effect"
1930 )
1931 )
1932 elif pas == [p1]: 1928 elif pas == [p1]:
1933 if not mergeancestor and wc.branch() == p2.branch(): 1929 if not mergeancestor and wc.branch() == p2.branch():
1934 raise error.Abort( 1930 raise error.Abort(
1935 _(b"nothing to merge"), 1931 _(b"nothing to merge"),
1936 hint=_(b"use 'hg update' or check 'hg heads'"), 1932 hint=_(b"use 'hg update' or check 'hg heads'"),