Home Download Buy Blog Forum Support

Howto setup/use Mercurial local & remote repo on bitlocker?

Howto setup/use Mercurial local & remote repo on bitlocker?

Postby rootey on Sun Sep 19, 2010 9:19 am


I'm trying to get Mercurial working from within Sublime Text 1.4 - I cannot get it to work, and was hoping someone can help.
These are my steps so far:

(a1) I have installed the Sublime Mercurial package from here:
http://sublime-text-community-packages. ... urial.html

(a2) Installed TortoiseHg (a Windows shell extension and a series of applications for the Mercurial) from here:
http://bitbucket.org/tortoisehg/stable/ ... .3-x64.msi

(a3) Created a public repository on http://bitbucket.org

(b4) I've configured 'Remote repository paths' in TortoiseHG, and tested that I can make local changes, and that I can 'Synchronize' these with the remote repository on bitbucket.org (This seems to work ok).

I cannot figure out / or find instructions, as to how to 'push' changes to my remote bitbucket.org repository (from Sublime Text, using the Mecurial Package).
Here is a list of errors I get in Sublime, when using Mercurial from the menu dropdowns:
(b1)Tools>Packages>Mercurial>Push all changes to remote repository
I get an error popup "An error or warning occurred: abort: http autorization required"

(b2)Tools>Packages>Mercurial>Initalize New Repository
I get an error popup "An error or warning occurred: abort: repository . already exists!"

(b3)If I create a new file, and save it anywhere (not in my local repo directory), and try
Tools>Packages>Mercurial>Add Current File to Mercurial
I get an error popup "An error or warning occurred"
If I try the same current file again, the popup says "testfile.py aready tracked!"

(b4)If I try to remove this new file:
Tools>Packages>Mercurial>Remove Current File from Mercurial
I get an error popup "An error or warning occurred: not removing testfile.py: file has been marked for add (use -f to force removal)"

So, it's obvious I've never used Mercurial before and that I maybe doing something wrong, or that I have done some sort of configuration somewhere.
I would really appreciate it, if some of you more advanced users could help me out, please.

This is how I "think" the whole process works:
Create a bitlocker online repository called 'test_project'.
Clone it to my local projects folder (this makes a folder called 'test_project).
Create some files and save them in my local 'test_project' directory.
Commit the new files locally.
Push/Synchronise the newly commited files to the remote bitlocker repository 'test_project'.

Now in Sublime Text, I think this is the process:
Create a new file, and save it to my local projects directory called 'test_projects'.
Commit changes (I guess this is locally)
Push changes to remote repository (I guess this is the bitlocker online repository)

Do I have to save all my project files, within my local 'test_project' directory, or can I save them anywhere on my computer?
If I do save files outside my 'test_project' directory, they appear to be 'tracked'; do I then have to HG Commit them? Doe's this automatically make a copy inside my 'test_project'???

Am I missing any vital bits of info here (Is this how the Mercurial tool is meant to be used)?

Posts: 5
Joined: Sun Nov 01, 2009 12:40 pm

Re: Howto setup/use Mercurial local & remote repo on bitlocker?

Postby samkerr on Wed Sep 29, 2010 12:05 am

Hi rootey,

I authored the plugin in question, so I'll try to help out.

b1) This is because you are not logged in to BitBucket. Currently, the plugin doesn't support this. What you need to do instead is set up SSH keys on BitBucket so you don't have to type a name and a password every time you use the remote repo.

b2) You only need to do this once, you might have done it already.

b3) If that is the error you are getting, I wouldn't worry about it; it sounds like it is being tracked just fine.

b4) Not too sure about this one, but I think that the remove command in this case just removes it if it's already tracked. (Not sure, try the Mercurial book)

You have a good idea about how it will work from the command line, but the Sublime workflow will be more like:

1. Use command line to clone BitBucket
2. Make a new file and edit others.
3. Commit changes locally.
4. Push changes.

For Mercurial to track the files, you need to keep them in that folder, or a sub-folder of the folder. If they are appearing as tracked, that's an error.

The main thing I'd advise is setting up SSH keys on BitBucket so you don't have to enter a name and password, since the plugin won't handle that for you.

Hope that helps!
Posts: 51
Joined: Mon Aug 03, 2009 11:20 pm

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 20 guests