views:

159

answers:

2

Hi, not really a programming question, but I cant find anywhere else to ask it and there is bound to be someone in here using this as well.

I got the mercurial.tmbundle installed and everything seems to be working fine with the exception of "Push to default repo" I have a default repo setup (bitbucket) and just using the command

hg push

does exactly what one would expect, but when I try to do it via Textmate it just comes up with a little progressbar and the text "Accessing Parent Repository..." and that just disappears after 1 sec. It cannot be pushing since it has no password. I have checked and there is indeed no new commits on bitbucket. Is there something I need to configure? If you have this working then please do tell what you did to make it work. Any suggestions would be helpfull.

A: 

When you push on the command line does it ask you for a password?

Maybe it's asking for a password when you run it via the bundle and it's erroring at that point?

Maybe console.app can give you a useful log message?

RyanWilcox
Yes, when using hg push from the command-line it asks me for a password.I thought about that too, but I couldn't find anywhere to put in a default password so I thought that it should have a password prompt in the bundle.I will just give console.app a try.
Mathias Nielsen
Can you check out via SSH instead of HTTPS? That way it might not prompt you for a password...
RyanWilcox
A: 

As suggested by RyanWilcox, hg must be waiting for a password. Try using the following syntax and see if it works: hg push http://userid:[email protected]/yourhg/. If so, and you're not paranoid, you may set this as the default path in your hgrc.

EDIT: add this in your hgrc and leave your default path alone:

foo.prefix = bitbucket.org/yourhg/
foo.username = userid
foo.password = passwd
foo.schemes = http https
Jerome
That works. But putting the password in hgrc isn't exactly elegant. I'm not that paranoid about it, but there should be a better way. I will keep digging. But thanks to both you and RyanWilcox
Mathias Nielsen
Being curious about it, I googled a little and found this: http://www.selenic.com/mercurial/hgrc.5.html#auth and http://mercurial.selenic.com/wiki/KeyringExtension. You might give it a try.
Jerome
Using passwordless ssh is the way to go.
Matthew Schinckel