Actions
Defect #149
closedMercurialAdapter breaks on missing :files entry in changeset hash
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}"}}
Updated by Jean-Philippe Lang over 17 years ago
Thanks for the fix.
Committed in r921.
Regards
Actions