I’m still trying to catch up on stuff following Develop. I’ve decided to write a post about my experience(s) switching my work over to SubRepos.
I am unaware of the “reason” why they’re considered “bad.” Perhaps it’s a Unix thing? Maybe they don’t work as well as people feel that they should?
I have a (secret) project called “
nite-nite/” in which I use and develop some public-domain headers.
I want this public-domain stuff to be … well … public-domain and visible to all.
Putting these into a Sub-Repository seemed appropriate, so I started by setting up a separate repository on BitBucket.
Following the basic usage I cloned this into my existing working copy and set it up as directed;
C:\Users\peter\Desktop\nite-nite>hg clone ssh://firstname.lastname@example.org/g-pechorin/pal-public-domain C:\Users\peter\Desktop\nite-nite>echo pal-public-domain = pal-public-domain > .hgsub C:\Users\peter\Desktop\nite-nite>hg add .hgsub
So far so good right? Well … not so much.
push command won’t work right with the setup we/I just used.
The fix is simple, the file
.hgsub looks like this …
pal-public-domain = pal-public-domain
… and it needs to look like this …
pal-public-domain = ssh://email@example.com/g-pechorin/pal-public-domain
So commit/amend the previous commit and
C:\Users\peter\Desktop\nite-nite>hg commit -m "added public domain stuff" C:\Users\peter\Desktop\nite-nite>hg push
I’m reasonably happy with this. As a bonus, I applied it to my blog and the embedded Unity project can be embedded as the source rather than a binary. Great, now I’ll get on with the actual work of moving those headers into the public-domain project.