Defect #149

MercurialAdapter breaks on missing :files entry in changeset hash

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

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:


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:


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}"}}


#1 Updated by Jean-Philippe Lang over 11 years ago

Thanks for the fix.
Committed in r921.


Also available in: Atom PDF