Page MenuHomePhabricator

arc cover in Mercurial fails for files with trailing whitespace
Closed, ResolvedPublic

Description

ArcanistMercurialAPI.getBlame seems to fail for files with trailing whitespace (like multiple newlines at the end of the file). I believe the problem is that it performs 'trim' on the blame output, which removes all trailing whitespace, then performs a regex check against each line with the following regex: /^\s*([^:]+?) [a-f0-9]{12}: (.*)$/ which expects a space after the final colon. This fails if the final line was empty, since the preceding space is trimmed as well.

Event Timeline

durham raised the priority of this task from to Needs Triage.
durham updated the task description. (Show Details)
durham added a project: Arcanist.
durham added a subscriber: durham.
epriestley triaged this task as Normal priority.Jan 27 2014, 6:52 PM

(And thanks for the report, that description was spot on.)