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

Support for dependent packages in Mercurial #1397

Merged
merged 6 commits into from
Nov 23, 2015
Merged

Support for dependent packages in Mercurial #1397

merged 6 commits into from
Nov 23, 2015

Conversation

DaveCTurner
Copy link
Contributor

Hi,

The ability to refer to a dependency on a git commit is useful, and I'd quite like to add support for the same thing for Mercurial repositories.

Firstly, would that be useful?

Secondly, I think all I'd have to do would be to add a new constructor to Stack.Types.Config.PackageLocation, implement ToJSON and FromJSON, and add a new case to Stack.Config.resolvePackageLocation that would look very similar to the git one except would run hg clone and then hg update -C instead of git clone and git reset --hard respectively. I've not actually tried it so perhaps there's more, but it'd be useful to know I'm on the right lines.

Thirdly, the cases for PLHttpTarball and PLGit are already rather similar and I'd feel bad adding a third case just like them. Would it be ok to extract the common code into one place too?

Cheers,

David

@DaveCTurner DaveCTurner changed the title Mercurial support Support for dependent packages in Mercurial Nov 21, 2015
The behaviour of http and git remote packages is very similar. This
change will enable the similarities to be combined.
@DaveCTurner
Copy link
Contributor Author

Something like this, perhaps?

@borsboom
Copy link
Contributor

Looks great, and thanks for the very easy to read PR. Can you just add an entry to the change log, and add "supported since 0.1.9.0" for the hg parts of yaml_configuration.md?

@DaveCTurner
Copy link
Contributor Author

Ok, I've done that.

borsboom added a commit that referenced this pull request Nov 23, 2015
Support for dependent packages in Mercurial
@borsboom borsboom merged commit 3e7867b into commercialhaskell:master Nov 23, 2015
@borsboom
Copy link
Contributor

Thanks; merged!

@DaveCTurner DaveCTurner deleted the issue-1397 branch November 23, 2015 13:49
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.

2 participants