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

Martin von Zweigbergk martinvonz at google.com
Wed Mar 18 15:27:43 CDT 2015


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at 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

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)'))
 


More information about the Mercurial-devel mailing list