New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 692032 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

rebaseline-cl trips over untracked 1-character filename file

Project Member Reported by drott@chromium.org, Feb 14 2017

Issue description

In your Chromium src checkout, try something like 
# touch 1
or 
# touch a

# git status
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	a

Go to third_party/WebKit/, then run
# Tools/Scripts/webkit-patch rebaseline-cl

Expected:
Tool should trigger try jobs

Actual:
Python stacktrace:
Traceback (most recent call last):
  File "Tools/Scripts/webkit-patch", line 84, in <module>
    main()
  File "Tools/Scripts/webkit-patch", line 79, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/usr/local/google/home/drott/dev/blink/src/third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py", line 124, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/usr/local/google/home/drott/dev/blink/src/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/command.py", line 110, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/usr/local/google/home/drott/dev/blink/src/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py", line 56, in execute
    unstaged_baselines = self.unstaged_baselines()
  File "/usr/local/google/home/drott/dev/blink/src/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py", line 532, in unstaged_baselines
    unstaged_changes = self._tool.git().unstaged_changes()
  File "/usr/local/google/home/drott/dev/blink/src/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/git.py", line 171, in unstaged_changes
    assert len(line) > 4, 'Unexpected change line format %s' % line
AssertionError: Unexpected change line format ?? a


Probably the regexp in unstaged_baselines() of rebaseline.py should be adjusted:
        baseline_re = re.compile(r'.*[\\/]LayoutTests[\\/].*-expected\.(txt|png|wav)$')


 
Thanks for filing; I didn't get time to look at this today, but want to look at it later this week :-)
Status: Started (was: Assigned)
Uploaded CL: https://codereview.chromium.org/2691343007
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ac08e177bbcec4e6d2213da7a46a541633841b4

commit 0ac08e177bbcec4e6d2213da7a46a541633841b4
Author: qyearsley <qyearsley@chromium.org>
Date: Thu Feb 16 19:30:35 2017

Fix assert statement in Git.unstaged_changes.

In Git.unstaged_changes, there was an assert statement which asserted
that git status -z lines should be longer than 4 characters. This is not
quite correct, since they can be equal to 4 characters, if the filename
is one character.

BUG= 692032 

Review-Url: https://codereview.chromium.org/2691343007
Cr-Commit-Position: refs/heads/master@{#451051}

[modify] https://crrev.com/0ac08e177bbcec4e6d2213da7a46a541633841b4/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/git.py
[modify] https://crrev.com/0ac08e177bbcec4e6d2213da7a46a541633841b4/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/git_unittest.py

Status: Fixed (was: Started)

Sign in to add a comment