equal
deleted
inserted
replaced
34 node, |
34 node, |
35 pycompat, |
35 pycompat, |
36 registrar, |
36 registrar, |
37 util, |
37 util, |
38 ) |
38 ) |
39 from mercurial.utils import dateutil |
39 from mercurial.utils import ( |
|
40 dateutil, |
|
41 stringutil, |
|
42 ) |
40 |
43 |
41 cmdtable = {} |
44 cmdtable = {} |
42 command = registrar.command(cmdtable) |
45 command = registrar.command(cmdtable) |
43 |
46 |
44 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
47 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
374 Matching supports regular expressions by using the `re:` prefix |
377 Matching supports regular expressions by using the `re:` prefix |
375 (use `literal:` to match names or namespaces that start with `re:`) |
378 (use `literal:` to match names or namespaces that start with `re:`) |
376 |
379 |
377 """ |
380 """ |
378 if namespace is not None: |
381 if namespace is not None: |
379 namespace = util.stringmatcher(namespace)[-1] |
382 namespace = stringutil.stringmatcher(namespace)[-1] |
380 if name is not None: |
383 if name is not None: |
381 name = util.stringmatcher(name)[-1] |
384 name = stringutil.stringmatcher(name)[-1] |
382 for entry in self: |
385 for entry in self: |
383 if namespace is not None and not namespace(entry.namespace): |
386 if namespace is not None and not namespace(entry.namespace): |
384 continue |
387 continue |
385 if name is not None and not name(entry.name): |
388 if name is not None and not name(entry.name): |
386 continue |
389 continue |