##// END OF EJS Templates
match: add match.ispartial()...
Drew Gottlieb -
r25114:d1d69ca7 default
parent child Browse files
Show More
@@ -1377,7 +1377,7 b' class localrepository(object):'
1377 wctx = self[None]
1377 wctx = self[None]
1378 merge = len(wctx.parents()) > 1
1378 merge = len(wctx.parents()) > 1
1379
1379
1380 if not force and merge and not match.always():
1380 if not force and merge and match.ispartial():
1381 raise util.Abort(_('cannot partially commit a merge '
1381 raise util.Abort(_('cannot partially commit a merge '
1382 '(do not specify files or patterns)'))
1382 '(do not specify files or patterns)'))
1383
1383
@@ -186,6 +186,14 b' class match(object):'
186 - optimization might be possible and necessary.'''
186 - optimization might be possible and necessary.'''
187 return self._always
187 return self._always
188
188
189 def ispartial(self):
190 '''True if the matcher won't always match.
191
192 Although it's just the inverse of _always in this implementation,
193 an extenion such as narrowhg might make it return something
194 slightly different.'''
195 return not self._always
196
189 def isexact(self):
197 def isexact(self):
190 return self.matchfn == self.exact
198 return self.matchfn == self.exact
191
199
General Comments 0
You need to be logged in to leave comments. Login now