Project

General

Profile

Actions

Defect #149

closed

MercurialAdapter breaks on missing :files entry in changeset hash

Added by James Britt over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

The MercurialAdapter code grabs changeset details be shelling out, asking hg for the logs, and parsing the results.
It stuffs values into a hash, changeset, and uses that to create a Revision object.

Line 94 of mercurial_adapter.rb has this call:

changeset[:files].split.collect

but not there is no assurance that it will have a value (least not in my hg repo), leading to an exception because
"split" is called on nil.

Adding a call to 'to_s' seems to fix this (again, line 94):

:paths => changeset[:files].to_s.split.collect{|path| {:action => 'X', :path => "/#{path}"}}

Actions #1

Updated by Jean-Philippe Lang over 16 years ago

Thanks for the fix.
Committed in r921.

Regards

Actions

Also available in: Atom PDF