0

I have a workflow where I need to allow users to be able to pull new changes from the Apache hosted mercurial repository but prevent them from doing a fresh clone.

Any ideas on how this can be done?

Thanks

  • Using hgweb.wsgi to serve the repository using an apache vhost (workarounds accepted)
eskhool
  • 657
  • 1
  • 11
  • 24

2 Answers2

2

A clone is just an init followed by a pull, so you can't stop cloning w/o also breaking pull.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • Thanks, this seems to be true...however, the answer below is closer to a workaround – eskhool Mar 12 '13 at 10:46
  • Definitely. You should edit your question so that it's broad enough to include that as an actual answers. As written putting .bundle files up is no longer a "hgweb.wsgi" hosted repository. – Ry4an Brase Mar 12 '13 at 14:12
  • Updating question to allow for workaround explicitly though any workarounds are always welcome. Had already upvoted your answer as a way of giving credit but with your expert score I doubt that matters to you by now :) cheers – eskhool Mar 14 '13 at 06:20
  • Yeah, I'm not worried about the points (but thanks) I'm just working to make sure a search always finds prior good questions – Ry4an Brase Mar 14 '13 at 14:10
1

The easiest way would be to just publish bundles via regular HTTP and allow users to download and apply those. See hg help bundle:

Generate a compressed changegroup file collecting changesets not known to
be in another repository.

The bundle file can then be transferred using conventional means and
applied to another repository with the unbundle or pull command. This is
useful when direct push and pull are not available or when exporting an
entire repository is undesirable.

Applying bundles preserves all changeset contents including permissions,
copy/rename information, and revision history.
djc
  • 11,603
  • 5
  • 41
  • 54
  • Wouldn't that also allow the user to effectively clone by creating a new repo and applying all the bundles? – Steve Kaye Mar 11 '13 at 20:25
  • Accepting this answer as the historical bundles can be removed so that only the latest bundles are available – eskhool Mar 12 '13 at 10:45