Patchwork [4,of,5] localrepo: simplify by using match.always() method

login
register
mail settings
Submitter Martin von Zweigbergk
Date March 18, 2015, 8:27 p.m.
Message ID <a4576dc64143c7500e17.1426710463@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8153/
State Accepted
Commit 521cecb4a3f16e508ebc645879a0feee05dccc32
Headers show

Comments

Martin von Zweigbergk - March 18, 2015, 8:27 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1414561439 25200
#      Tue Oct 28 22:43:59 2014 -0700
# Node ID a4576dc64143c7500e17a933e709a568b50ebb90
# Parent  1cafeb13292131a62161de490230d90bf4b56c9a
localrepo: simplify by using match.always() method

Patch

diff -r 1cafeb132921 -r a4576dc64143 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Sep 30 16:40:15 2014 -0700
+++ b/mercurial/localrepo.py	Tue Oct 28 22:43:59 2014 -0700
@@ -1304,7 +1304,7 @@ 
             wctx = self[None]
             merge = len(wctx.parents()) > 1
 
-            if (not force and merge and (match.files() or match.anypats())):
+            if not force and merge and not match.always():
                 raise util.Abort(_('cannot partially commit a merge '
                                    '(do not specify files or patterns)'))