Show commit changes in interdiffs
Review Request #10126 — Created Aug. 24, 2018 and submitted
When an interdiff is displayed in the diffviewer, we now show a history
of how the commits changed from the diffset to the interdiffset. The
implementation of diffing between two histories is very basic at the
moment. We currently only directly compare commit IDs as our metric of
whether or not two commits are equivalent. Once any commit IDs differ,
we assume the rest of the commits in the old history will be removed and
the remaining new commits are all added. This is because commit IDs
depend on prior commit IDs in most DVCS systems. Ideally we would use
use commit ancestor information (which is trivally obtainable from
Mercurial and less so from Git).
- Ran JS tests.
- Ran unit tests.
Description | From | Last Updated |
---|---|---|
Can you flesh out the description, describe how it's basic and what's missing? |
chipx86 | |
E501 line too long (89 > 79 characters) |
reviewbot | |
Col: 54 Expected a 'break' statement before 'default'. |
reviewbot | |
Col: 13 Unexpected ')'. |
reviewbot | |
Col: 13 Expected an identifier and instead saw ')'. |
reviewbot | |
Col: 17 Expected ')' and instead saw ';'. |
reviewbot | |
Col: 18 Missing semicolon. |
reviewbot | |
Col: 21 It's not necessary to initialize 'rowClass' to 'undefined'. |
reviewbot | |
Col: 17 Unexpected ')'. |
reviewbot | |
Col: 17 Expected an identifier and instead saw ')'. |
reviewbot | |
Col: 21 Expected ')' and instead saw ';'. |
reviewbot | |
Col: 22 Missing semicolon. |
reviewbot | |
Col: 13 Expected an identifier and instead saw ')'. |
reviewbot | |
Col: 13 Unexpected ')'. |
reviewbot | |
Col: 19 Missing semicolon. |
reviewbot | |
Col: 18 Expected ')' and instead saw ';'. |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
This seems unnecessary. Can't we just move that stuff into an __init__ in this class? |
chipx86 | |
Needs to be the full type path. |
chipx86 | |
Can you pass as keyword arguments, so this is self-describing? Same with all below. |
chipx86 | |
Is it really worth having these? The construction is pretty simple. |
chipx86 | |
Why aren't we just using __init__? This class is feeling unnecessarily complicated, and I don't have a sense as to … |
chipx86 | |
Full type path, here and below. |
chipx86 | |
No , or or in these. |
chipx86 | |
Same here. |
chipx86 | |
Can we say "Iterate through the diff between ...", so it's a bit more clear? |
chipx86 | |
No blank line. |
chipx86 | |
Doesn't seem like we'd need this namedtuple either. They kinda came out of nowhere, and I'm not sure they're appropriate … |
chipx86 | |
This should be a list so that ordering is consistent in the query. That allows the database to cache the … |
chipx86 | |
This can easily be one line. |
chipx86 | |
These should be on the same line. |
chipx86 | |
We have a trailing comma here, but this isn't a .es6.js file. Let's rename it. |
chipx86 | |
Blank line between these. |
chipx86 | |
Wrong number of spaces for indents. |
chipx86 | |
Missing docstring. |
chipx86 | |
You can use isEmpty(). |
chipx86 | |
It's always good to have a break, even in the last case. |
chipx86 | |
These can start on the line with the call. |
chipx86 | |
Typo: "cellection" -> "collection". |
chipx86 | |
F401 'collections.namedtuple' imported but unused |
reviewbot | |
F821 undefined name 'cls' |
reviewbot | |
F821 undefined name 'cls' |
reviewbot | |
F821 undefined name 'cls' |
reviewbot | |
F401 'collections.namedtuple' imported but unused |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
F401 'collections.namedtuple' imported but unused |
reviewbot | |
F821 undefined name 'cls' |
reviewbot | |
F821 undefined name 'cls' |
reviewbot | |
F821 undefined name 'cls' |
reviewbot | |
F401 'collections.namedtuple' imported but unused |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
No trailing period. |
chipx86 | |
No trailing period. |
chipx86 | |
__init__ doesn't return. |
chipx86 | |
Parameters should align. |
chipx86 | |
No spaces within {..} |
chipx86 | |
E501 line too long (83 > 79 characters) |
reviewbot | |
This doesn't look right. |
chipx86 | |
Are i and j ever different? They start as 0, are both incremented at the same time, and never seem … |
chipx86 | |
Can you put the full module path? Looks like it'd fit. |
chipx86 | |
We always compare the result to the expectation. A failure here with these values backwards could be confusing to debug … |
chipx86 | |
""" on the next line. |
chipx86 | |
Alphabetical order. |
chipx86 | |
Alphabetical order. |
chipx86 | |
Alphabetical order. |
chipx86 | |
Lookups would be faster if we just have a mapping defined (say, on RB.CommitHistoryDiffEntry, not the prototype) that mapped the … |
chipx86 | |
Can you use the expanded form? |
chipx86 | |
Same here. |
chipx86 | |
E501 line too long (83 > 79 characters) |
reviewbot | |
F821 undefined name 'j' |
reviewbot | |
Col: 2 Missing semicolon. |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
Docstring? |
david | |
Docstring? |
david | |
Babel turns this into a monster. We'll need to do it with a bunch of assignments instead. |
david | |
We don't need the $() here, since append() can take an HTML string. |
david | |
Same here with $() |
david | |
And here. |
david | |
E501 line too long (83 > 79 characters) |
reviewbot | |
E501 line too long (83 > 79 characters) |
reviewbot | |
It's best to also provide __ne__ for Python 2.x. On 3.x, we get this for free. |
chipx86 | |
Typo: "attribtues" -> "attributes" |
chipx86 | |
Kind of confused by the wording here around the double enumerate. |
chipx86 | |
Can you wrap this at the "at"? It's slightly too long. |
chipx86 | |
We can reduce the generated HTML and the test changes needed if we do: <th<% if (showExpandCollapse) { %>colspan="2"<% } … |
chipx86 | |
These are a too long for the lines. How about building the response payload higher up, before the return maybe, … |
chipx86 | |
E501 line too long (83 > 79 characters) |
reviewbot | |
Similar to above, let's only add the attribute if we have something other than "1" to set. |
chipx86 | |
This isn't a boolean. |
chipx86 | |
E501 line too long (83 > 79 characters) |
reviewbot |
- Change Summary:
-
jshint
- Commit:
-
d4aa747df8a84723f46643e449ba204f0490bca7d7d49e4022cecaaadcc0e833c602462d6b086e70
- Diff:
-
Revision 2 (+666 -90)
- Change Summary:
-
flake8
- Commit:
-
d7d49e4022cecaaadcc0e833c602462d6b086e70833175cae00e9fb725f52a6059ef10f3827780d5
- Diff:
-
Revision 3 (+667 -90)
Checks run (2 succeeded)
-
-
-
-
-
-
-
Why aren't we just using
__init__
? This class is feeling unnecessarily complicated, and I don't have a sense as to why it needs to be. -
-
-
-
-
-
Doesn't seem like we'd need this namedtuple either. They kinda came out of nowhere, and I'm not sure they're appropriate for this work.
-
This should be a list so that ordering is consistent in the query. That allows the database to cache the queryset.
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Addressed feedback.
- Description:
-
When an interdiff is displayed in the diffviewer, we now show a history
of how the commits changed from the diffset to the interdiffset. The implementation of diffing between two histories is very basic at the ~ moment. ~ moment. We currently only directly compare commit IDs as our metric of + whether or not two commits are equivalent. Once any commit IDs differ, + we assume the rest of the commits in the old history will be removed and + the remaining new commits are all added. This is because commit IDs + depend on prior commit IDs in most DVCS systems. Ideally we would use + use commit ancestor information (which is trivally obtainable from + Mercurial and less so from Git). - Commit:
-
833175cae00e9fb725f52a6059ef10f3827780d5e292e377e3ed8798546ce2fe49612c1771839c95
- Diff:
-
Revision 4 (+608 -93)
- Commit:
-
e292e377e3ed8798546ce2fe49612c1771839c95010afb49c7ff8b44f36263063bd95b9c1b3b8f77
- Diff:
-
Revision 5 (+608 -93)
- Commit:
-
010afb49c7ff8b44f36263063bd95b9c1b3b8f77169d810be8845d28d10a7b482c921ecd485c1c57
- Diff:
-
Revision 6 (+605 -93)
- Change Summary:
-
Addressed feedback
- Commit:
-
169d810be8845d28d10a7b482c921ecd485c1c577e488185aba379d628598723d5d12b86132bc950
- Diff:
-
Revision 7 (+675 -96)
-
-
Are
i
andj
ever different? They start as 0, are both incremented at the same time, and never seem to otherwise change. -
-
We always compare the result to the expectation. A failure here with these values backwards could be confusing to debug at first. These should all be fixed to follow the typical argument order.
-
-
-
-
-
Lookups would be faster if we just have a mapping defined (say, on
RB.CommitHistoryDiffEntry
, not the prototype) that mapped theentryType
values to the symbols. Lookups are faster, andgetSymbol()
could just wrap this. -
-
- Change Summary:
-
Addressed feedback
- Commit:
-
7e488185aba379d628598723d5d12b86132bc950c31a8cded7083aa379529eea98e700381da77f80
- Diff:
-
Revision 8 (+669 -85)
- Change Summary:
-
Fixes from accidental publish
- Commit:
-
c31a8cded7083aa379529eea98e700381da77f80a1163880fc94cce4b4dad15a54b2400c7e110aed
- Diff:
-
Revision 9 (+674 -85)
- Change Summary:
-
Unit test changes from /r/10125/
- Commit:
-
a1163880fc94cce4b4dad15a54b2400c7e110aedf1885c258e7e68b106525cee3ff5db86385970f6
- Diff:
-
Revision 10 (+719 -91)
- Change Summary:
-
Addressed feedback.
- Commit:
-
f1885c258e7e68b106525cee3ff5db86385970f69ab5d747cbd915338cf92fcb942d2ed77e92b06a
- Diff:
-
Revision 11 (+737 -91)
- Change Summary:
-
Fix unit test
- Commit:
-
9ab5d747cbd915338cf92fcb942d2ed77e92b06a3dc0db202fecbba4a5aa4069bd385712396f5a5e
- Diff:
-
Revision 12 (+744 -91)
- Change Summary:
-
Addressed feedback.
- Commit:
-
3dc0db202fecbba4a5aa4069bd385712396f5a5e25b7f10ec2b345ad34876050ec08c19803ffd79e
- Diff:
-
Revision 13 (+778 -104)