Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

6 messages, 4 authors, 2016-06-15 · open the first message on its own page

Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

From: Miles Bader <hidden>
Date: 2016-06-15 22:46:42

"Shawn O. Pearce" [off-list ref] writes:
  And here is that hack.  It just feels wrong to me that I need
  to subtract 1 from the Edit region's line numbers, *only* when
  context is 0, in order to get the same output as CGit.
A big comment saying "this may look a bit funny, but it's the standard's
fault: [text from std...]" might help salve the wound...

-Miles

-- 
.Numeric stability is probably not all that important when you're guessing.

Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:46:42

söndag 03 maj 2009 02:50:36 skrev Miles Bader [off-list ref]:
"Shawn O. Pearce" [off-list ref] writes:
quoted
  And here is that hack.  It just feels wrong to me that I need
  to subtract 1 from the Edit region's line numbers, *only* when
  context is 0, in order to get the same output as CGit.
A big comment saying "this may look a bit funny, but it's the standard's
fault: [text from std...]" might help salve the wound...
1) I agree. This need to be commented in the code.

2) Do we need to fix it? I.e. is there a problem or just two different results,
where one is correct, the other incorrect but harmless.

3) We should have a convention like C Git for marking known breakages.
One option is FIXME, another it so go JUnit 4 and abuse the expected exception 
annotation (using it for declaring OK exceptions is pretty bad use anyway I think,
so we might use it for something better), or perhaps the @Ignore annotation which
is meant specifically for this and other cases. A FIXME can be implemented right
away.

-- robin

Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

From: Ferry Huberts (Pelagic) <hidden>
Date: 2016-06-15 22:46:42

3) We should have a convention like C Git for marking known breakages.
One option is FIXME, another it so go JUnit 4 and abuse the expected exception 
annotation (using it for declaring OK exceptions is pretty bad use anyway I think,
so we might use it for something better), or perhaps the @Ignore annotation which
is meant specifically for this and other cases. A FIXME can be implemented right
away.
standard pratice for junit would be to write a test case on what you would 
expect to be _correct_ behaviour. obviously that test would then fail.
it would be a know failure in the test suite. do not go ignoring it. it's 
better to keep being reminded that stuff doesn't work :-)

Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

From: Robin Rosenberg <hidden>
Date: 2016-06-15 22:46:42

söndag 03 maj 2009 10:31:30 skrev "Ferry Huberts (Pelagic)" [off-list ref]:
quoted
3) We should have a convention like C Git for marking known breakages.
One option is FIXME, another it so go JUnit 4 and abuse the expected exception 
annotation (using it for declaring OK exceptions is pretty bad use anyway I think,
so we might use it for something better), or perhaps the @Ignore annotation which
is meant specifically for this and other cases. A FIXME can be implemented right
away.
standard pratice for junit would be to write a test case on what you would 
expect to be _correct_ behaviour. obviously that test would then fail.
it would be a know failure in the test suite. do not go ignoring it. it's 
better to keep being reminded that stuff doesn't work :-)
What I've see so far is that people start ignoring almost any failure, including new ones, when the test suites contains fails with "known" failues. The assumption is that the failed tests were the same as before.

Worse, automated tests have a hard time telling the difference. Currently I ran
the jgit tests as part of the Eclipse plugin build and I want it to stop if there is a problem that we don't know of. 

"Annotation" of different kinds can be "grepped" for so we can find the broken
cases separately and even refuse completion of release builds if we decide
on that. 

Our primary UI right now is the Eclipse JUnit tests runner and I don't want
to be remined of Shawn's or whoever's bugs when trying to make sure I don't
break anything. Red = *I* broke something or found something new. 

TestNG has a nice way of classifying tests so, we could mark failures as "known failures" and specifically exclude/include them when invoking the
JUnit tests.

Best is to fix before we apply the patches as happened this time. So this problem still remains theoretical :)

-- robin


-- robin

Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

From: Ferry Huberts (Pelagic) <hidden>
Date: 2016-06-15 22:46:42

fair enough :-)

Re: [JGIT PATCH 8/6] Fix zero context insert and delete hunk headers to match CGit

From: SZEDER Gábor <hidden>
Date: 2016-06-15 22:46:42

Hi,


On Sun, May 03, 2009 at 11:24:07AM +0200, Robin Rosenberg wrote:
söndag 03 maj 2009 10:31:30 skrev "Ferry Huberts (Pelagic)" [off-list ref]:
quoted
quoted
3) We should have a convention like C Git for marking known breakages.
One option is FIXME, another it so go JUnit 4 and abuse the expected exception 
annotation (using it for declaring OK exceptions is pretty bad use anyway I think,
so we might use it for something better), or perhaps the @Ignore annotation which
is meant specifically for this and other cases. A FIXME can be implemented right
away.
standard pratice for junit would be to write a test case on what you would 
expect to be _correct_ behaviour. obviously that test would then fail.
it would be a know failure in the test suite. do not go ignoring it. it's 
better to keep being reminded that stuff doesn't work :-)
What I've see so far is that people start ignoring almost any failure, including new ones, when the test suites contains fails with "known" failues. The assumption is that the failed tests were the same as before.

Worse, automated tests have a hard time telling the difference. Currently I ran
the jgit tests as part of the Eclipse plugin build and I want it to stop if there is a problem that we don't know of. 

"Annotation" of different kinds can be "grepped" for so we can find the broken
cases separately and even refuse completion of release builds if we decide
on that. 

Our primary UI right now is the Eclipse JUnit tests runner and I don't want
to be remined of Shawn's or whoever's bugs when trying to make sure I don't
break anything. Red = *I* broke something or found something new. 

TestNG has a nice way of classifying tests so, we could mark failures as "known failures" and specifically exclude/include them when invoking the
JUnit tests.
you could use test suites to easily circumvent this in JUnit, even in
JUnit 3.x.

Just set up two test suites: one for the tests that should pass and
one for the tests with known breakages.  That way you can run either
only the "good" tests or only the broken ones.  Or even both, and you
can easily discern failures caused by known breakages from your new
breakages by looking at the tree of tests in eclipse's JUnit view.


Regards,
Gábor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help