[PATCH 2 of 8] scmutil: pass a matcher to scmutil.addremove() instead of a list of patterns

Matt Harbison matt_harbison at yahoo.com
Fri Nov 28 00:47:08 CST 2014


On Wed, 26 Nov 2014 20:12:15 -0500, Matt Harbison wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1415581022 18000
> #      Sun Nov 09 19:57:02 2014 -0500
> # Node ID 0a826a7d6222c6170d7c1c9c8cbe3a735d4ad3b7
> # Parent  36938964dbce5fc575dce8d6c07d4aec4d3d8af3
> scmutil: pass a matcher to scmutil.addremove() instead of a list of patterns
> 
> diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
> --- a/mercurial/scmutil.py
> +++ b/mercurial/scmutil.py
> @@ -732,9 +731,9 @@
>          if repo.ui.verbose or not m.exact(abs):
>              rel = m.rel(abs)
>              if abs in unknownset:
> -                status = _('adding %s\n') % ((pats and rel) or abs)
> +                status = _('adding %s\n') % ((m.anypats() and rel) or abs)
>              else:
> -                status = _('removing %s\n') % ((pats and rel) or abs)
> +                status = _('removing %s\n') % ((m.anypats() and rel) or abs)

I misunderstood the comment for anypats() in the matcher class.  Both of
these should be 'm.files()'.  I'll wait another day or so for any comments
before resending.

>              repo.ui.status(status)
>  
>      renames = _findrenames(repo, m, added + unknown, removed + deleted,



More information about the Mercurial-devel mailing list