Add mercurial repository support.#979
Conversation
|
Automatic reply from Jenkins: Can I test this? |
There was a problem hiding this comment.
Can you not just use HAVE_HG for this?
There was a problem hiding this comment.
+1, what's the use of HAVE_HG if it's not being used?
There was a problem hiding this comment.
If you're up to it, fix this in the svnrepo.py and gitrepo.py modules too.
I don't know why we used this approach, using the HAVE_X constants makes more sense.
There was a problem hiding this comment.
also, it should use self.log.error:
if not HAVE_HG:
self.log.error("The python-hglib Python module is not available, which is required for Mercurial support.")|
ok to test |
|
retest this please |
|
@cclerget: mostly remarks w.r.t. style, some also apply to the existing Python modules in |
|
@cclerget: if you've tackled the remarks, please issue a comment to notify us (there are no notifications for pushed commits) |
There was a problem hiding this comment.
Can this point ever be reached? Will the USABLE properties not prevent from ever getting here?
There was a problem hiding this comment.
the USABLE is only used by EB, but what if someone creates their own GitRepository instance and calls setup_repo? You want to make sure things don't go down hard...
There was a problem hiding this comment.
true, then again, the uses of logger makes it hard to use this outside EB (as I noticed in the clean up script).
|
Test PASSed. |
There was a problem hiding this comment.
I thought the catching exception was used to make sure git/svn binary was present on system and I was wrong. What you think about an additional check on binary presence ?
There was a problem hiding this comment.
I'd say that's the job of the respective Python packages being used?
There was a problem hiding this comment.
Yes and only git and hglib module are concerned. Just apply a minor fix to catch OSError exception for cloning step.
|
Test PASSed. |
Unit tests are not coded for the moment, I would like to discuss if a tiny mercurial repo should be embedded in source tree or remotely on bitbucket or others.