0

I have a dependancy as a subrepository (without write access to) in my project. I'd like to add a few personal customizations to that subrepository - possibly using mq.

I also would love to be able to just clone the main repo to build it. Currently I have to:

  1. clone the repo - with subrepositories getting cloned automagically
  2. manually clone all the patchqueues for subrepositories

How do I get rid of step 2? Is it even possible without an outside script? (I'm using bitbucket if it makes any difference).

Łukasz Gruner
  • 2,929
  • 3
  • 26
  • 28

1 Answers1

0

One notion is to make the subrepo not the repo to which you have no write access, but a clone of your own based on their repo.

cd myclones hg clone http://notmydomain.com/their-repo my-clone-of-their-repo

and in your project's .hg/hgrc you use a [subpaths] section to map their URL to your local clone:

[subpaths]
http://notmydomain.com/their-repo = ../my-clone-of-their-repo

Then you end up with your repo using your local (read-write) clone of their repo to which you otherwise have read-only access. This has a few benefits:

  • faster -- you're only checking local repositories for all actions
  • writeable -- you can edit directoy in myproject/their-repo and commit and push (to your local clone)

And when you want to merge in their upstream changes you just go into ../my-clone-of-their-repo and hg pull and hg merge their updates into your customizations.

Ry4an Brase
  • 78,112
  • 7
  • 148
  • 169
  • maintaining my own clone is something I don't want to do. having an alien repository as a subrepo is too big of a big win for me to ignore. – Łukasz Gruner Aug 27 '12 at 08:35
  • Having an alien repository + a mq atop it is nearly identical to having a clone of an alien repository. Indeed, their nearly functionally identical. – Ry4an Brase Aug 27 '12 at 14:30
  • A mq is also a repo that requires the same level of management. Really they're near analogous schemes w/ different window dressing. – Ry4an Brase Aug 28 '12 at 01:13
  • sorry dude, your answer did not solve my question, I am sorry I can't accept it, deal with it please. – Łukasz Gruner Aug 29 '12 at 08:42
  • I don't need you to accept it -- it's for the next person w/ the same question. I do hope you come to understand what mq is and isn't, and why it's seldom the right choice, especially given recent (and upcoming) features (like phases, obsolete, etc.) in the latest releases. – Ry4an Brase Aug 30 '12 at 03:14