2

I have a project just getting started at http://sourceforge.net/projects/iotabuildit/ (more details at http://sourceforge.net/p/iotabuildit/wiki/Home/) that is currently using Mercurial for revision control. And it seems like Mercurial and SourceForge almost have all the right features or elements to put together the collaboration mechanism I have in mind for this project, but I think I'm not quite there yet. I want people to be able to submit, discuss and vote on individual changes from a large number of individuals (more developers than a project would normally have). And I want it to be as easy as possible for users to participate in this. The thought right now is that people can clone the "free4all" fork, which is a clone of the base "code" repository, or they can create their own fork in their own SourceForge user project (SourceForge now provides a workspace for every user to host miscellaneous project-related content). Then they can clone that to their local repository (after downloading TortoiseHg or their preferred Mercurial client). Then they can make modifications, commit them, push them to the fork, and request a merge into the base "code" repository, at which point we can discuss/review the merge request. This all is still far too many steps, and more formal than I'd like.

I see there is such a thing as "shelving" in Mercurial, but I don't see how/if that is supported in the SourceForge repository. And there probably isn't a way to discuss shelved changes as there is merge requests.

I'm looking for any suggestions that would make this easier. Ideally, I would like users to be able to:

  1. Specify any version that they would like to play, and have that requested version extracted from source control hosted for the user to play at SourceForge (because the game can't be played locally due to security restrictions the Chrome browser properly applies to javascript code accessing image content in independent files)
  2. Allow the user to download the requested version of the project for local editing (a C# version built from the same source is also playable locally, or Internet Explorer apparently ignores the security restriction, allowing local play in a browser)
  3. Accept submitted modifications in a form that can be merged with any other compatible "branch" or version of the game that has been submitted/posted (ideally this would be very simple -- perhaps used just uploads the whole set of files back to the server and the compare and patch/diff extraction is performed there)
  4. Other players can see a list of available submitted patches and choose any set to play/test with, then discuss and vote on changes.

Clearly some of these requirements are very specific, and I will probably need to write some server side code if I want to reach the ideal goal. But I want to take the path of least resistance and use the technologies available if much of the functionality I need is already almost there. Or I'd like to see if I can get any closer than the process I outlined earlier without writing any server code. So what pieces will help me do this? Does Mercurial & SourceForge support storing and sharing shelved code in the way I would want? Is there something to this "Patch Queue" (that I see, but can't understand or get to work yet) that might help? Is there a way to extract a patch file from a given set of files compared to a specific revision in a repository (on the server side), without having the user download any Mercurial components?

Andrei Dziahel
  • 969
  • 5
  • 14
BlueMonkMN
  • 25,079
  • 9
  • 80
  • 146
  • For anyone who's interested, there is a static running sample of the game at http://sgdk2.enigmadream.com/ben/iotaBuildIt/iotaBuildIt.html. I would like to host any version similarly and not just a formally released version. – BlueMonkMN Apr 13 '12 at 11:24

1 Answers1

4

It sounds like something you could do with mercurial queue (mq) patch queues. The patch queue can be is own, separate versioned repository, and people can use 'guards' to apply only the patches they want to try.

But really it sounds even easier to use bitbucket or github, both of which have excellent patch-submission, review, and acceptance workflows built into them.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • It looks like bitbucket is only free for up to 5 users, and my project is hopefully going to allow patches to be submitted from hundreds of users. Is there any special mechanism for people to submit patches on bitbucket without being considered a "user"? – BlueMonkMN Apr 13 '12 at 14:51
  • It is free for Open Source projects if that is what you're working on. – Steve Kaye Apr 13 '12 at 16:04
  • @SteveKaye Is there anywhere I can see a statement to that effect? It's not obvious on the registration or homepage. – BlueMonkMN Apr 13 '12 at 18:31
  • 1
    Well, it's a bit obtuse but the pricing page says that it's free for up to five users and defines a user as some one who has access to one of your private repositories. That would imply that public repositories don't affect the pricing. You could email sales@bitbucket.org for clarification. – Steve Kaye Apr 14 '12 at 08:52
  • I'm having a hard time figuring out how to use mq with bitbucket, and Google isn't helping (I see docs from 4 years ago that don't help). Should I ask a separate question or can you explain here? Using TortoiseHg 2.1.1 I was able to get an uncommitted patch to go into the patch queue, visible on bitbucket's patch queue for my linked mq repository. I had to explicitly add the .diff file and the series file to a changeset, and check the --mq switch option. I can see the uncommitted patch in a fresh clone now. But if I delete it, I can't get it back withuot re-cloning. Am I making a mess? – BlueMonkMN Apr 15 '12 at 15:37
  • I had too many questions to address in comments here, so I posted a new question at http://stackoverflow.com/questions/10164664/using-mercurial-patch-queue-repository-on-bitbucket-for-many-users-and-patches – BlueMonkMN Apr 16 '12 at 12:58
  • You say that github and bitbucket have excellent mechanisms to submit patches, but they are not readily apparent to me. Do you have to use MQ to submit patches on bitbucket? Is there any way on github or bitbucket to submit patches as patch files? – BlueMonkMN Apr 17 '12 at 10:52
  • On bitbucket you can either fork or create a patch-queue. On github you fork and provide a pull request. Even projects with hundreds of contributors are able to get them to (a) fork (b) commit (c) push (d) submit pull request. The project administrator is then well positioned to pull in the features s/he wants or code-review them in place. Non-administrators can easily pull from one another's repos's pull requests. Neither takes a patch directly, but both git and Mercurial make it easy to apply them locally and then push. – Ry4an Brase Apr 17 '12 at 13:30
  • As it turns out, finally got a better grasp of DVCS and decided that patches weren't the best approach for by case, but given the question I asked, this is probably a reasonable answer. My answer ended up being very different: http://stackoverflow.com/questions/10226930/online-dvcs-client/10228202 – BlueMonkMN Apr 21 '12 at 02:16
  • Good for you. Overengineering your patch process before anyone's yet interested in your project is overdoing it. – Ry4an Brase Apr 21 '12 at 14:10