Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 24383:521cecb4a3f1
localrepo: simplify by using match.always() method
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Oct 2014 22:43:59 -0700 |
parents | 5859af34c5a6 |
children | d6ac30f4edef |
comparison
equal
deleted
inserted
replaced
24382:5859af34c5a6 | 24383:521cecb4a3f1 |
---|---|
1313 wlock = self.wlock() | 1313 wlock = self.wlock() |
1314 try: | 1314 try: |
1315 wctx = self[None] | 1315 wctx = self[None] |
1316 merge = len(wctx.parents()) > 1 | 1316 merge = len(wctx.parents()) > 1 |
1317 | 1317 |
1318 if (not force and merge and (match.files() or match.anypats())): | 1318 if not force and merge and not match.always(): |
1319 raise util.Abort(_('cannot partially commit a merge ' | 1319 raise util.Abort(_('cannot partially commit a merge ' |
1320 '(do not specify files or patterns)')) | 1320 '(do not specify files or patterns)')) |
1321 | 1321 |
1322 status = self.status(match=match, clean=force) | 1322 status = self.status(match=match, clean=force) |
1323 if force: | 1323 if force: |