Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot parse SVN-diff #7

Open
aringa opened this issue Mar 21, 2016 · 4 comments
Open

cannot parse SVN-diff #7

aringa opened this issue Mar 21, 2016 · 4 comments

Comments

@aringa
Copy link

aringa commented Mar 21, 2016

using command
svn log --diff --verbose URL
a unified diff is generated by SVN.
When I parse this file, I get the following error:

java.lang.IllegalStateException: A FROM_FILE line ('---') must be directly followed by a TO_FILE line ('+++')!
at org.wickedsource.diffparser.unified.ParserState$3.nextState(ParserState.java:76)
at org.wickedsource.diffparser.api.UnifiedDiffParser.parse(UnifiedDiffParser.java:64)

@thombergs
Copy link
Owner

I added support for diffs created with the "svn diff" command. With Version 1.2 it should work (should be available in maven central shortly).

However, you should use "svn diff" instead of "svn log --diff" since "svn log" adds some noise to the diff which the parser can't handle.

@aringa
Copy link
Author

aringa commented Mar 24, 2016

I can't use svn diff because we need to operate with the (remote) repository, not on the local working copy. Could you enhance the parser to ignore the noise? Thanks.

@javydreamercsw
Copy link

javydreamercsw commented Aug 10, 2018

I'm having the same issue but with a proper diff. I can't attach the trouble causing Diff for obvious reasons but I could share privately.

This is on version 1.4.

@javydreamercsw
Copy link

On my case there was a XML file in the diff that had a line starting with --->. This was being parsed as a FROM_FILE making the parse fail. I'll have a PR for the issue I found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants