Mercurial > hg
comparison mercurial/merge.py @ 45917:721f765a34ac
errors: raise StateError on uncommitted changes when merge starts
Differential Revision: https://phab.mercurial-scm.org/D9393
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 23 Nov 2020 23:08:58 -0800 |
parents | 58e7ee23ddbd |
children | 10dbc80d4be7 |
comparison
equal
deleted
inserted
replaced
45916:fa87536d3d70 | 45917:721f765a34ac |
---|---|
1910 raise error.Abort( | 1910 raise error.Abort( |
1911 _(b"nothing to merge"), | 1911 _(b"nothing to merge"), |
1912 hint=_(b"use 'hg update' or check 'hg heads'"), | 1912 hint=_(b"use 'hg update' or check 'hg heads'"), |
1913 ) | 1913 ) |
1914 if not force and (wc.files() or wc.deleted()): | 1914 if not force and (wc.files() or wc.deleted()): |
1915 raise error.Abort( | 1915 raise error.StateError( |
1916 _(b"uncommitted changes"), | 1916 _(b"uncommitted changes"), |
1917 hint=_(b"use 'hg status' to list changes"), | 1917 hint=_(b"use 'hg status' to list changes"), |
1918 ) | 1918 ) |
1919 if not wc.isinmemory(): | 1919 if not wc.isinmemory(): |
1920 for s in sorted(wc.substate): | 1920 for s in sorted(wc.substate): |