Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Failing to get parseUnifiedDiff for copied files #193

Closed
Assignees
wumpz
@MadnessIRL

Description

@MadnessIRL

When parsing a file that was copied in a raw pull request .diff, UnifiedDiffReader will fail with:

com.github.difflib.unifieddiff.UnifiedDiffParserException: expected file start line not foundat com.github.difflib.unifieddiff.UnifiedDiffReader.parse(UnifiedDiffReader.java:120)

To Reproduce

  1. Obtain the .diffs via bitbucket API of a PR that has a copy of a file, e.g.:
diff --git src://modules/configuration/config/web/pcf/account/AccountContactCV.pcf dst://modules/configuration/config/web/pcf/account/AccountContactCV.default.pcfsimilarity index 99%copy from modules/configuration/config/web/pcf/account/AccountContactCV.pcfcopy to modules/configuration/config/web/pcf/account/AccountContactCV.default.pcfindex 13efef5778..1a08b0befc 100644--- src://modules/configuration/config/web/pcf/account/AccountContactCV.pcf+++ dst://modules/configuration/config/web/pcf/account/AccountContactCV.default.pcf@@ -1,16 +1,17 @@ <?xml version="1.0"?> <PCF   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:noNamespaceSchemaLocation="../../../../../pcf.xsd">   <CardViewPanel-   >+   +    mode="default">     <Require       name="acctContact"       type="AccountContact"/>     <Require       name="showAddressTools"       type="boolean"/>     <Require       name="showRolesTab"       type="boolean"/>     <Variable
  1. Try obtaining the UnifiedDiffs:
    image

image

Notice how the file that was being looked by UnifiedParseDiff does not exist here, and the new copy should have been used instead (AccountContactCV.default.pcf)
image

Expected behavior
The correct file should be parsed and/or consider the original one removed.

System

  • Java 17
  • 4.12(latest)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp