Mercurial > hg > mercurial-crew-with-dirclash
diff hgext/mq.py @ 2838:851b07ec450c
mq: apply patch is any posative guard matches
this is like guards command from quilt package.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Thu, 10 Aug 2006 17:18:55 -0700 |
parents | 307439d6fede |
children | 82f50658c72b |
line wrap: on
line diff
--- a/hgext/mq.py +++ b/hgext/mq.py @@ -176,11 +176,11 @@ class queue: if exactneg: return False, exactneg[0] pos = [g for g in patchguards if g[0] == '+'] - nonpos = [g for g in pos if g[1:] not in guards] + exactpos = [g for g in pos if g[1:] in guards] if pos: - if not nonpos: - return True, '' - return False, nonpos + if exactpos: + return True, exactpos[0] + return False, pos return True, '' def explain_pushable(self, idx, all_patches=False): @@ -1742,7 +1742,7 @@ def select(ui, repo, *args, **opts): this sets "stable" guard. mq will skip foo.patch (because it has nagative match) but push bar.patch (because it has posative - match). patch is pushed only if all posative guards match and no + match). patch is pushed if any posative guards match and no nagative guards match. with no arguments, default is to print current active guards.