changeset 1966:e67c526c0a25

update: calculate 'partial' as core does
author Sean Farley <sean@farley.io>
date Mon, 25 Apr 2016 21:24:20 -0700
parents 0421772a9c30
children c5d4e856ad0e
files hgext3rd/topic/__init__.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Mon Apr 25 20:00:19 2016 -0700
+++ b/hgext3rd/topic/__init__.py	Mon Apr 25 21:24:20 2016 -0700
@@ -290,7 +290,8 @@
     return ret
 
 def mergeupdatewrap(orig, repo, node, branchmerge, force, *args, **kwargs):
-    partial = bool(len(args)) or 'matcher' in kwargs
+    matcher = kwargs.get('matcher')
+    partial = not (matcher is None or matcher.always())
     wlock = repo.wlock()
     try:
         ret = orig(repo, node, branchmerge, force, *args, **kwargs)