[llvm-bugs] [Bug 37834] New: Unhandled Exception when uploading a git patch from Windows using web interface

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 18 04:55:51 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37834

            Bug ID: 37834
           Summary: Unhandled Exception when uploading a git patch from
                    Windows using web interface
           Product: Phabricator
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: greg.bedwell at sony.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20441
  --> https://bugs.llvm.org/attachment.cgi?id=20441&action=edit
example patch file

Steps to reproduce:

1) Create a patch file using git for Windows.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e:\work\upstream-llvm\llvm>git --version
git version 2.14.1.windows.1

e:\work\upstream-llvm\llvm>git commit -m "some commit"
[master 663a6ca48a3] some commit
 1 file changed, 2 insertions(+)

e:\work\upstream-llvm\llvm>git format-patch -1
0001-some-commit.patch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2) Using a browser, navigate to
https://reviews.llvm.org/differential/diff/create/ and by "Raw Diff From File"
select "Choose File" and select the patch file created in Step 1 (attached).

3) Click "Create Diff" and observe the following error message:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diff Parse Exception: Expected a hunk header, like 'Index: /path/to/file.ext'
(svn), 'Property changes on: /path/to/file.ext' (svn properties), 'commit
59bcc3ad6775562f845953cf01624225' (git show), 'diff --git' (git diff), '---
filename' (unified diff), or 'diff -r' (hg diff or patch).

            780      # The file should not end with two newlines. It creates
unnecessary churn.
            781      while len(output_lines) > 0 and output_lines[-1] == '':
            782        output_lines.pop()
            783    
            784      if input_lines == output_lines:
   >>>      785   -- 
            786   2.14.1.windows.1
            787   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The key appears to be the text "windows" in the version string.  If I remove
the version string entirely, or replace it with something like
"2.14.1.1234567.1" then the diff is created as expected, so the workaround is
trivial.  Presumably there is a regex or similar somewhere matching on just
digits/dots.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180618/fdb6a396/attachment.html>


More information about the llvm-bugs mailing list