[PATCH 7 of 8] patchbomb: remove is-comparisons with non-singletons

Martin Geisler mg at lazybytes.net
Tue Nov 16 17:01:54 CST 2010


Dan Villiom Podlaski Christiansen <danchr at gmail.com> writes:

> # HG changeset patch
> # User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
> # Date 1289939758 -3600
> # Branch stable
> # Node ID cc1abbd22d4ae99c4c096c2d7682d7758de583d2
> # Parent  60a3f52a0f97a406bb13aaa49f4784c503710f14
> patchbomb: remove is-comparisons with non-singletons.

I would also not change this -- fp is assigned just above and the code
is effectively testing to see how the assignment was done. That looks
quite normal to me.

> diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
> --- a/hgext/patchbomb.py
> +++ b/hgext/patchbomb.py
> @@ -473,7 +473,7 @@ def patchbomb(ui, repo, *revs, **opts):
>              except IOError, inst:
>                  if inst.errno != errno.EPIPE:
>                      raise
> -            if fp is not ui:
> +            if fp != ui:
>                  fp.close()
>          elif mbox:
>              ui.status(_('Writing '), subj, ' ...\n')
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20101117/6d8c852a/attachment.pgp>


More information about the Mercurial-devel mailing list