Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mercurial repository support. #979

Merged
merged 3 commits into from
Oct 28, 2015
Merged

Conversation

cclerget
Copy link
Contributor

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.

@hpcugentbot
Copy link
Contributor

Automatic reply from Jenkins: Can I test this?

try:
HgCommandError
except NameError, err:
self.log.exception("It seems like python-hglib is not available: %s" % err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you not just use HAVE_HG for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, what's the use of HAVE_HG if it's not being used?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.")

@wpoely86
Copy link
Member

ok to test

@wpoely86
Copy link
Member

wpoely86 commented Aug 4, 2014

retest this please

@author: Cedric Clerget (University of Franche-Comte)
"""
import getpass
import os
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used? so remove please

@boegel
Copy link
Member

boegel commented Aug 13, 2014

@cclerget: mostly remarks w.r.t. style, some also apply to the existing Python modules in easybuild.tools.repository, a 🍪 for you if you fix those too

@boegel
Copy link
Member

boegel commented Aug 13, 2014

@cclerget: if you've tackled the remarks, please issue a comment to notify us (there are no notifications for pushed commits)

@boegel boegel modified the milestone: v1.16 Sep 6, 2014
@cclerget
Copy link
Contributor Author

@boegel, @wpoely86 , here applied remarks, sorry for delay. Let me know for mercurial unit tests.

except NameError, err:
self.log.exception("It seems like GitPython is not available: %s" % err)
if not HAVE_GIT:
self.log.error("It seems like GitPython is not available, which is required for Git support.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this point ever be reached? Will the USABLE properties not prevent from ever getting here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, then again, the uses of logger makes it hard to use this outside EB (as I noticed in the clean up script).

@hpcugentbot
Copy link
Contributor

Test PASSed.

git.GitCommandError
except NameError, err:
self.log.exception("It seems like GitPython is not available: %s" % err)
if not HAVE_GIT:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say that's the job of the respective Python packages being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes and only git and hglib module are concerned. Just apply a minor fix to catch OSError exception for cloning step.

@hpcugentbot
Copy link
Contributor

Test PASSed.

@boegel boegel mentioned this pull request Mar 11, 2015
8 tasks
@boegel boegel modified the milestones: v1.16, v2.2 Jun 24, 2015
@boegel
Copy link
Member

boegel commented Jul 7, 2015

conflicts with current develop fixed in mesocentrefc#3, I also threw in a simple unit test for HgRepository

@boegel
Copy link
Member

boegel commented Jul 14, 2015

tagging for v2.3...

@boegel boegel modified the milestones: v2.3, v2.2 Jul 14, 2015
@boegel boegel merged commit 80ca02a into easybuilders:develop Oct 28, 2015
@boegel
Copy link
Member

boegel commented Oct 28, 2015

merged via #1446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants