Patchwork convert: remove unused-but-set variable introduced in db9e883566e8

login
register
mail settings
Submitter Yuya Nishihara
Date Dec. 18, 2016, 7:49 a.m.
Message ID <7d505a99f16d0a7faae2.1482047351@mimosa>
Download mbox | patch
Permalink /patch/17949/
State Accepted
Headers show

Comments

Yuya Nishihara - Dec. 18, 2016, 7:49 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1482045604 -32400
#      Sun Dec 18 16:20:04 2016 +0900
# Node ID 7d505a99f16d0a7faae231432deef5c9bcfd3ad1
# Parent  07025bd744a09dd5622e16ccef11966fda7b86f2
convert: remove unused-but-set variable introduced in db9e883566e8

Spotted by pyflakes.
Augie Fackler - Dec. 19, 2016, 9:31 p.m.
On Sun, Dec 18, 2016 at 04:49:11PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1482045604 -32400
> #      Sun Dec 18 16:20:04 2016 +0900
> # Node ID 7d505a99f16d0a7faae231432deef5c9bcfd3ad1
> # Parent  07025bd744a09dd5622e16ccef11966fda7b86f2
> convert: remove unused-but-set variable introduced in db9e883566e8

Queued, thanks.

>
> Spotted by pyflakes.
>
> diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
> --- a/hgext/convert/p4.py
> +++ b/hgext/convert/p4.py
> @@ -302,8 +302,6 @@ class p4_source(common.converter_source)
>          `p4 describe` output
>          """
>          desc = self.recode(obj.get("desc", ""))
> -        shortdesc = desc.split("\n", 1)[0]
> -
>          date = (int(obj["time"]), 0)     # timezone not set
>          if parents is None:
>              parents = []
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
--- a/hgext/convert/p4.py
+++ b/hgext/convert/p4.py
@@ -302,8 +302,6 @@  class p4_source(common.converter_source)
         `p4 describe` output
         """
         desc = self.recode(obj.get("desc", ""))
-        shortdesc = desc.split("\n", 1)[0]
-
         date = (int(obj["time"]), 0)     # timezone not set
         if parents is None:
             parents = []