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

Conversation

Projects
None yet
2 participants
@DaveCTurner
Contributor

DaveCTurner commented Nov 21, 2015

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 from Mercurial support to Support for dependent packages in Mercurial Nov 21, 2015

DaveCTurner added some commits Nov 21, 2015

Introduce RemotePackageLocation type
The behaviour of http and git remote packages is very similar. This
change will enable the similarities to be combined.
@DaveCTurner

This comment has been minimized.

Contributor

DaveCTurner commented Nov 21, 2015

Something like this, perhaps?

@borsboom

This comment has been minimized.

Contributor

borsboom commented Nov 22, 2015

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

This comment has been minimized.

Contributor

DaveCTurner commented Nov 23, 2015

Ok, I've done that.

borsboom added a commit that referenced this pull request Nov 23, 2015

Merge pull request #1397 from DaveCTurner/issue-1397
Support for dependent packages in Mercurial

@borsboom borsboom merged commit 3e7867b into commercialhaskell:master Nov 23, 2015

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@borsboom

This comment has been minimized.

Contributor

borsboom commented Nov 23, 2015

Thanks; merged!

@DaveCTurner DaveCTurner deleted the DaveCTurner:issue-1397 branch Nov 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment