Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 48705:bca57b01518f
merge: break up a not-so-one-liner for readability
Differential Revision: https://phab.mercurial-scm.org/D12108
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 28 Jan 2022 14:25:39 +0100 |
parents | 58a2c66fa94c |
children | 00bfd920169d |
comparison
equal
deleted
inserted
replaced
48704:58a2c66fa94c | 48705:bca57b01518f |
---|---|
1925 m_a = _(b"merging with a working directory ancestor has no effect") | 1925 m_a = _(b"merging with a working directory ancestor has no effect") |
1926 if pas == [p2]: | 1926 if pas == [p2]: |
1927 raise error.Abort(m_a) | 1927 raise error.Abort(m_a) |
1928 elif pas == [p1]: | 1928 elif pas == [p1]: |
1929 if not mergeancestor and wc.branch() == p2.branch(): | 1929 if not mergeancestor and wc.branch() == p2.branch(): |
1930 raise error.Abort( | 1930 msg = _(b"nothing to merge") |
1931 _(b"nothing to merge"), | 1931 hint = _(b"use 'hg update' or check 'hg heads'") |
1932 hint=_(b"use 'hg update' or check 'hg heads'"), | 1932 raise error.Abort(msg, hint=hint) |
1933 ) | |
1934 if not force and (wc.files() or wc.deleted()): | 1933 if not force and (wc.files() or wc.deleted()): |
1935 raise error.StateError( | 1934 raise error.StateError( |
1936 _(b"uncommitted changes"), | 1935 _(b"uncommitted changes"), |
1937 hint=_(b"use 'hg status' to list changes"), | 1936 hint=_(b"use 'hg status' to list changes"), |
1938 ) | 1937 ) |