Page MenuHomePhabricator

Show SVN property changes on commit page
Needs ReviewPublic

Authored by aik099 on Dec 11 2014, 7:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 11:18 PM
Unknown Object (File)
Mar 17 2024, 11:37 PM
Unknown Object (File)
Mar 17 2024, 11:08 PM
Unknown Object (File)
Mar 17 2024, 11:00 PM
Unknown Object (File)
Mar 16 2024, 3:24 PM
Unknown Object (File)
Mar 13 2024, 10:37 PM
Unknown Object (File)
Mar 9 2024, 2:04 PM
Unknown Object (File)
Feb 11 2024, 9:30 AM

Details

Summary

Allows to see changes within SVN properties on commit page.

This is actually the improved version of D8478, that supports also SVN 1.6 clients.
If this diff is to be merged, then that one needs to be closed.

Fixes T4255

Test Plan
  1. make a commit where SVN properties are added/changed/removed
  2. open commit detail page
  3. see that SVN property changes are supported

Diff Detail

Repository
rP Phabricator
Branch
tmp-branch
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3238
Build 3244: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

aik099 retitled this revision from to Show SVN property changes on commit page.
aik099 updated this object.
aik099 edited the test plan for this revision. (Show Details)
aik099 edited edge metadata.
aik099 added a subscriber: altendky.

Here are the changes we've discussed in D8478.

I haven't run this myself but the only regression you have mentioned compared with D8478 is that [[D8478#98991 | there is no No newline at end of file warning]] (all the other points are rendering issues). While I do think it is more important to have this fix accepted, it does seem technically correct to avoid losing that non-EOL incidentally. Based on your example XML response from SVN I made a sample script and the presence and lack of EOL are certainly exhibited in the output of SimpleXML. I'm not quite sure where it's getting lost here but somehow was not in D8478.

The property text just is added to em tag an maybe nl2br is applied later. Since each property value is rendered in td the presence of br at the end won't really affect the output. So it's not lost, but in HTML tailing br and no br at the end of td content look the same.

I guess for file content diffs there is a special code that detects such trailing \n absence and prints special line at the end. Although I might not implemented in favor of single-line properties where it would only make extra noise in the output. The svn:ignore property for example can have value in 1 line (just 1 folder/file ignored) and we'll not be showing no new line at the end in that case, but showing it for same property if it has 2 lines in value, then output would be inconsistent.

Sorry, this is all coming back to me more slowly than it should have. For the property, the output from my SVN diff-vs-0 calls were generating that message, not Phabricator.

Property changes on: genini
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property

This property was probably added by TortoiseSVN. I do not know off-hand whether other clients also fail to EOL.

So, this code is probably more accurate and the presence or lack of the no-EOL message should be handled when being rendered instead of here.

I guess for file content diffs there is a special code that detects such trailing \n absence and prints special line at the end.

It looks like svn cat does not add the no-EOL message like diff does so I agree that there is likely handling somewhere else for that. Regardless, it would seem that D8478 was innappropriately introducing this message so I think this revision is good to go in my opinion (not that that is worth a whole lot :] ).

I can manually add missing new line message and see how it gots rendered.

Just tried that and it doesn't render the same was as in regular diff (greyed out).

For file:

Phabricator_FileDiff_NoNewLineAtEnd.png (405×1 px, 70 KB)

For properties:

Phabricator_PropertyDiff_NoNewLineAtEnd.png (398×1 px, 53 KB)

It seems that nice diff engine, that isn't used on property display takes care of displaying line numbers and proper color of no new line at the end messages.

Other than D8478 prefixing a '\', the latter looks the same... aka, wrong. :]

pasted_file (79×568 px, 7 KB)

I say leave it as is without adding the no-EOL warning here. This seems to be a rendering issue that should be handled in that code instead.

Then I guess it's ready to be merged someday.

what's the status on this?

It works on my install. I have no idea, why it isn't merged to upstream.