From patchwork Mon Dec 30 13:32:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7751: absorb: avoid using a list comprehension to fill a list with fixed values From: phabricator X-Patchwork-Id: 44123 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 30 Dec 2019 13:32:06 +0000 Closed by commit rHG236cec445be2: absorb: avoid using a list comprehension to fill a list with fixed values (authored by mharbison72). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7751?vs=18982&id=19011 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7751/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7751 AFFECTED FILES hgext/absorb.py CHANGE DETAILS To: mharbison72, #hg-reviewers, pulkit Cc: mercurial-devel diff --git a/hgext/absorb.py b/hgext/absorb.py --- a/hgext/absorb.py +++ b/hgext/absorb.py @@ -511,7 +511,7 @@ if not editedtext: raise error.Abort(_(b'empty editor text')) # parse edited result - contents = [b'' for i in self.fctxs] + contents = [b''] * len(self.fctxs) leftpadpos = 4 colonpos = leftpadpos + len(visiblefctxs) + 1 for l in mdiff.splitnewlines(editedtext):