I am trying to learn to use mercurial by pushing onto Google code.
I have two .hgrc files
: One file is located $PROJECT_DIR/.hg/.hrgc
and $HOME/.hgrc
. I have two separate files because I did not want to put the password out on the central repository.
Here is the content of $PROJECT_DIR/.hg/.hrgc
:
[ui]
usermane=Venkat S. Rao <vrao423@gmail.com>
verbose=true
[paths]
default-push =https:vrao423:gc4yy3vB3mc4@//personal-site423.googlecode.com/hg/us
Here is the content of $HOME/.hgrc
:
[ui]
username= Venkat Rao <vrao423@gmail.com>
verbose=True
[auth]
project.prefix=https://personal-site423.googlecode.com/hg/
password=###
username=vrao423
For username I have my Gmail id.
I can commit changes to my local repository, but when I try hg push I get this error.
** unknown exception encountered, details follow ** report bug details to http://mercurial.selenic.com/bts/ ** or mercurial@selenic.com ** Mercurial Distributed SCM (version 1.4.3) ** Extensions loaded: Traceback (most recent call last): File "/usr/bin/hg", line 27, in mercurial.dispatch.run() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run sys.exit(dispatch(sys.argv[1:])) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 30, in dispatch return _runcatch(u, args) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 46, in _runcatch return _dispatch(ui, args) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 454, in _dispatch return runcommand(lui, repo, cmd, fullargs, ui, options, d) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 324, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 505, in _runcommand return checkargs() File "/usr/lib/pymodules/python2.6/mercurial/dispat开发者_开发百科ch.py", line 459, in checkargs return cmdfunc() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 453, in d = lambda: util.checksignature(func)(ui, *args, **cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 386, in check return func(*args, **kwargs) File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 2345, in push other = hg.repository(cmdutil.remoteui(repo, opts), dest) File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 63, in repository repo = _lookup(path).instance(ui, path, create) File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 263, in instance inst.between([(nullid, nullid)]) File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 184, in between d = self.do_read("between", pairs=n) File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 128, in do_read fp = self.do_cmd(cmd, **args) File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 80, in do_cmd resp = self.urlopener.open(urllib2.Request(cu, data, headers)) File "/usr/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/usr/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 455, in https_open self.auth = self.pwmgr.readauthtoken(req.get_full_url()) File "/usr/lib/pymodules/python2.6/mercurial/url.py", line 141, in readauthtoken group, setting = key.split('.', 1) ValueError: need more than 1 value to unpack
Please help me. I have tried reading the hgrc man but that is just gibberish.
Thank You Venkat
I'm a Mercurial developer. Please report problems with our man page on the mailinglist or on our bugtracker. I would love to hear from you so that we can make the man page better, so please write to us and tell us which part you found to be "gibberish".
In this particular case, the problem is that you need to write your auth section like this:
[auth]
project.prefix=https://personal-site423.googlecode.com/hg/
project.password=###
project.username=vrao423
where I would replace project
with googlecode
or something similar. We should of course report something sensible instead of a traceback and I can see that we already fixed this particular bug in Mercurial 1.5.
精彩评论