Patchwork [2,of,4] contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict

login
register
mail settings
Submitter adgar@google.com
Date Sept. 13, 2014, 4:55 p.m.
Message ID <5edfc490cd4067d0b7b0.1410627342@adgar.nyc.corp.google.com>
Download mbox | patch
Permalink /patch/5818/
State Accepted
Headers show

Comments

adgar@google.com - Sept. 13, 2014, 4:55 p.m.
# HG changeset patch
# User Mike Edgar <adgar@google.com>
# Date 1410572332 14400
#      Fri Sep 12 21:38:52 2014 -0400
# Node ID 5edfc490cd4067d0b7b0e5d0ba878d51a3092aae
# Parent  1b1aeb594ac261750ebf95c1f92257d9c1f7d3ac
contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict
Pierre-Yves David - Sept. 18, 2014, 12:52 a.m.
On 09/13/2014 09:55 AM, adgar@google.com wrote:
> # HG changeset patch
> # User Mike Edgar <adgar@google.com>
> # Date 1410572332 14400
> #      Fri Sep 12 21:38:52 2014 -0400
> # Node ID 5edfc490cd4067d0b7b0e5d0ba878d51a3092aae
> # Parent  1b1aeb594ac261750ebf95c1f92257d9c1f7d3ac
> contrib/synthrepo: pass options to ctx.diff as kwargs, not a dict

This one is pushed to the clowncopter too.

Patch

diff -r 1b1aeb594ac2 -r 5edfc490cd40 contrib/synthrepo.py
--- a/contrib/synthrepo.py	Fri Sep 12 17:43:37 2014 -0400
+++ b/contrib/synthrepo.py	Fri Sep 12 21:38:52 2014 -0400
@@ -151,8 +151,7 @@ 
             lastctx = repo[rev - 1]
         if lastctx.rev() != nullrev:
             interarrival[roundto(ctx.date()[0] - lastctx.date()[0], 300)] += 1
-        diff = sum((d.splitlines()
-                    for d in ctx.diff(pctx, opts={'git': True})), [])
+        diff = sum((d.splitlines() for d in ctx.diff(pctx, git=True)), [])
         fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0
         for filename, mar, lineadd, lineremove, binary in parsegitdiff(diff):
             if binary: