Skip to content
Snippets Groups Projects
Commit dc48bcc3587d authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

track_commit: issue a clearer error when repository has a null checkout

If no revision is checkout, the "update" variant of the test will fail since
there are no file to update. Before this change, the error was quite obscure: no
file name was return, as a result the filepath was just the repo directory and
`open(…)` call failed. Now we explicitly detect the error and warn about it.

I am not sure what error should be raised, So I am going for a classical
ValueError.
parent ff291a5e3670
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,9 @@
else:
# pick filename to update
filename = self.hg('manifest').partition('\n')[0]
if not filename:
msg = 'no revision checked out in repo: %s' % self.repo_path
raise ValueError(msg)
filename = os.path.join(self.repo_path, filename)
# Do the commits N time
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment