- October 11th, 2010
- Write comment
I had iPhone mobile development code on my Mac OSX and I wanted to commit it to an online repository, Bitbucket (just like Git’s GitHub, except it is for the Mercurial DVCS).
So I created a private BitBucket repository with the name “Test App”. Surprisingly, BitBucket renamed my basename to “test-app”. However my folder structure was:
Current Folder Structure:
"Test App" (notice it has spaces) -- File 1 -- File 2
Now I can just as easily clone the “test-app” repository and change my folder structure to this:
Possible Solution’s Folder Structure:
test-app -- .hg/* -- "Test App" -- File 1 -- File 2
But that means I have to change my application file/folder paths. (Although I will note that a sane developer would use relative paths, I unfortunately did not have that option.) Surprisingly, this is not documented in the BitBucket documentation or on any online resource.
Possible solutions I looked at:
- “Hard” Symbolic Links – Unfortunately Mac OSX does not support hard linking to directories.
- Use a script to copy/paste code from “Test App” to test-app, each time I need to check it in – Highly inefficient
I cloned “test-app” to a folder. So I got:
Output of hg clone:
test-app -- .hg/*
Now I took the .hg directory and just moved it to my “Test App” folder, like this:
Final Folder structure:
"Test App" -- .hg/* -- File 1 -- File 2
Thankfully, there are no problems with hg commands. Apparently, the Mercurial coders are not hardcoding paths.