Subject: [Tools-discuss] rfcdiffs w/ inter-chunk navigation

From: Eric Rescorla <[email-masked]>
Date: Tue, 22 Mar 2016 16:38:45 -0700

I do a lot of my code reviewing with Rietveld which has the nice feature
that you can navigate between chunks using 'n' and 'p'. This is very
convenient on big diffs.

I've updated rfcdiff to do this and posted the results at:
   https://github.com/ekr/rfcdiff

The system is very simple: the diff loads as usual, but when you press
'n' or 'p' it navigates to the next or previous chunk and puts a line above.
the chunk you are looking at now. We could add more functions, obviously,
but even this is useful.

In order to keep rfcdiff as one monolithic file, I've written this by making
a template file (rfcdiff-tmpl), a JS file, and a merger that puts them
together.
This allows you to edit the JS locally but then combine them for
distribution.

Henrik, is this a change you would be willing to take? What would you need
me to do to contribute it?

Thanks,
-Ekr

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 23 Mar 2016 13:32:40 +0100

Hi Eric,

> the chunk you are looking at now. We could add more functions, obviously,

Cool.  Yes.

> Henrik, is this a change you would be willing to take?

Sure.

> What would you need me to do to contribute it?

For the primary use case I see, which is the online service, I'd prefer to
serve the JS separately, and have a <script src="..."><script> entry in the
diff html to pull in the script.  Would that work for you?  Or do you think
people like shipping the actual diffs around so much that the JS should be
inlined?

I'm happy to take diffs from you, or to copy from your github-hosted code into
my own repo.  I should put these things up in a public repo, of course, but
there's too much that should be done ...

Best,

	Henrik

---

From: Martin Thomson <[email-masked]>
Date: Thu, 24 Mar 2016 00:00:54 +1100

> people like shipping the actual diffs around so much that the JS should be

I see individual files fairly often with offline use.  I have had
plenty of people ask for - and use - a diff option in the makefiles I
maintain.  Enough that <script src="" would have to be an option
rather than a default.  If you are going to split things, wouldn't you
also want to split out CSS?

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 23 Mar 2016 14:22:31 +0100

Hi Martin,

> also want to split out CSS?

I landed on keeping the css inline last time I considered splitting it out,
so from that point of view it would make more sense to be consistent and
keep the JS inline, too.  I'm fine with that.

Best regards,

	Henrik

---

From: Eric Rescorla <[email-masked]>
Date: Wed, 23 Mar 2016 06:52:10 -0700

> people like shipping the actual diffs around so much that the JS should be

I don't have a strong opinion. I was trying to match what seemed to be your
preference, which is to have things be inline. The code that I have could
be modified to accommodate both modes.  I think it is important to have the
source code repository have them separate otherwise modifying the JS is
really a PITA.

If we can decide on a canonical location (my Github repo is OK, I guess,
but probably not ideal)  I'll be happy to produce a version which has a
switch which produces either of these modes (and of course includes the JS
embedded in the program).

I'm happy to take diffs from you, or to copy from your github-hosted code
> into
> my own repo.

This is probably easiest. If you want to put your own code up on Github, I
can of course send you a PR.

>   I should put these things up in a public repo, of course, but
> there's too much that should be done ..
>

Yes, yes there is.

-Ekr

---

From: Henrik Levkowetz <[email-masked]>
Date: Wed, 23 Mar 2016 18:52:33 +0100

> can of course send you a PR.

I'll start with referencing your repo as an svn:external in my repo, and
update my make file to pull in the javascript when building the rfcdiff
script.  That way, any updates you make can be pulled in by just doing a
'svn update' as part of make'ing a release.

Thanks!

	Henrik