dbuild icon indicating copy to clipboard operation
dbuild copied to clipboard

Add support for Mercurial project repositories

Open inkytonik opened this issue 11 years ago • 2 comments

It appears from the documentation that only git or svn repositories are currently supported by dbuild. Assuming that I've got the right impression, this limitation prevents me from adding our Kiama project to the Scala community build since Kiama lives on Google Code in a Mercurial repository.

Are there any plans to add Mercurial support?

inkytonik avatar Oct 20 '14 04:10 inkytonik

Hello, there are no plans to add Mercurial support at this time. However, we would welcome contributions to add support for further version control systems. Implementing a new module is actually rather easy. You can check the trait ProjectResolver, in: https://github.com/typesafehub/dbuild/blob/v0.9.2/core/src/main/scala/com/typesafe/dbuild/project/resolve/ProjectResolver.scala#L12 canResolve() could just check for a uri of the form "hg:..." (or "hgs:..."?). resolve() fetches the selected uri into the directory pointed to by dir. The uri fragment denotes the required tag, or commit, or branch; resolve() must return a new ProjectBuildConfig in which the branch or other qualifier in the uri fragment is replaced by a repeatable commit identifier. You may refer to the simple svn implementation for an example: https://github.com/typesafehub/dbuild/blob/v0.9.2/support/src/main/scala/com/typesafe/dbuild/support/svn/ProjectResolver.scala Finally, you will just need to append the resolver to the lists at: https://github.com/typesafehub/dbuild/blob/v0.9.2/build/src/main/scala/com/typesafe/dbuild/build/Checkout.scala#L53 and https://github.com/typesafehub/dbuild/blob/v0.9.2/build/src/main/scala/com/typesafe/dbuild/build/LocalBuildMain.scala#L23 If you need any additional information, please just let me know.

cunei avatar Oct 20 '14 11:10 cunei

I will see if I can find some time for this, but I'm not likely to in the near future, unfortunately. For now I will not be able to include Kiama in the Scala community build.

inkytonik avatar Oct 20 '14 23:10 inkytonik

Mercurial has fallen out of favor

SethTisue avatar Nov 23 '22 03:11 SethTisue