Mercurial > hg-stable
diff hgext/strip.py @ 42486:1acaa9f37377
strip: during merge allow strip only when -f is used
This ensures to abort strip to `hg strip` when we have a merge
in progress and allow it only when a `--force` flag is used.
Differential Revision: https://phab.mercurial-scm.org/D6529
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Fri, 14 Jun 2019 18:25:14 +0530 |
parents | 8c42b4a3d447 |
children | 3a1988e915f9 |
line wrap: on
line diff
--- a/hgext/strip.py Fri Apr 26 00:48:12 2019 +0200 +++ b/hgext/strip.py Fri Jun 14 18:25:14 2019 +0530 @@ -50,6 +50,9 @@ cmdutil.checkunfinished(repo) s = repo.status() if not force: + if len(repo[None].parents()) > 1: + _("outstanding uncommitted merge") #i18 tool detection + raise error.Abort(_("outstanding uncommitted merge"+ excsuffix)) if s.modified or s.added or s.removed or s.deleted: _("local changes found") # i18n tool detection raise error.Abort(_("local changes found" + excsuffix))