{"thread":{"id":"35925","subject":"[PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","startedAt":"2014-02-21T15:17:16Z","lastAt":"2014-04-20T21:25:02Z","messageCount":10,"participants":["Daniel Liew","Delcypher","Felipe Contreras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"235128","messageId":"53076DFC.1000602@gmail.com","threadId":"35925","inReplyTo":null,"subject":"[PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Daniel Liew","fromEmail":"delcypher@gmail.com","sentAt":"2014-02-21T15:17:16Z","receivedAt":"2014-02-21T15:17:16Z","isPatch":true,"sender":{"key":"delcypher@gmail.com","avatar":"https://gravatar.com/avatar/a51a42ac111d81caef0661a8ce18559ae2eaddf8d82d3aff84bf97967d950b84?d=mp&s=160"},"body":"git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc\n\nUse the hgrc configuration file in the internal mercurial repository in\naddition to the other system wide hgrc files. This is done by using the\n'ui' object from the 'repository' object which will have loaded the\nrepository hgrc file if it exists.\n\nPrior to this patch the mercurial repository's hgrc file was ignored\nwhich I consider to be a bug.\n\nSigned-off-by: Dan Liew <delcypher@gmail.com>\n---\n contrib/remote-helpers/git-remote-hg | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/contrib/remote-helpers/git-remote-hg\nb/contrib/remote-helpers/git-remote-hg\nindex eb89ef6..451842a 100755\n--- a/contrib/remote-helpers/git-remote-hg\n+++ b/contrib/remote-helpers/git-remote-hg\n@@ -421,7 +421,7 @@ def get_repo(url, alias):\n\n         repo = hg.repository(myui, local_path)\n         try:\n-            peer = hg.peer(myui, {}, url)\n+            peer = hg.peer(repo._unfilteredrepo.ui, {}, url)\n         except:\n             die('Repository error')\n         repo.pull(peer, heads=None, force=True)\n-- \n1.9.0\n"},{"id":"237445","messageId":"CANNJ_zg10oMjwL-0j0XVAEmqgQU1fLsr6GYbKSRVApqgKrYvMQ@mail.gmail.com","threadId":"35925","inReplyTo":"53076DFC.1000602@gmail.com","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Delcypher","fromEmail":"delcypher@gmail.com","sentAt":"2014-03-24T15:07:41Z","receivedAt":"2014-03-24T15:07:41Z","isPatch":true,"sender":{"key":"delcypher@gmail.com","avatar":"https://gravatar.com/avatar/a51a42ac111d81caef0661a8ce18559ae2eaddf8d82d3aff84bf97967d950b84?d=mp&s=160"},"body":"ping.\n\nOn 21 February 2014 15:17, Daniel Liew <delcypher@gmail.com> wrote:\n> git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc\n>\n> Use the hgrc configuration file in the internal mercurial repository in\n> addition to the other system wide hgrc files. This is done by using the\n> 'ui' object from the 'repository' object which will have loaded the\n> repository hgrc file if it exists.\n>\n> Prior to this patch the mercurial repository's hgrc file was ignored\n> which I consider to be a bug.\n>\n> Signed-off-by: Dan Liew <delcypher@gmail.com>\n> ---\n>  contrib/remote-helpers/git-remote-hg | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/contrib/remote-helpers/git-remote-hg\n> b/contrib/remote-helpers/git-remote-hg\n> index eb89ef6..451842a 100755\n> --- a/contrib/remote-helpers/git-remote-hg\n> +++ b/contrib/remote-helpers/git-remote-hg\n> @@ -421,7 +421,7 @@ def get_repo(url, alias):\n>\n>          repo = hg.repository(myui, local_path)\n>          try:\n> -            peer = hg.peer(myui, {}, url)\n> +            peer = hg.peer(repo._unfilteredrepo.ui, {}, url)\n>          except:\n>              die('Repository error')\n>          repo.pull(peer, heads=None, force=True)\n> --\n> 1.9.0\n>\n>\n"},{"id":"238779","messageId":"53499bb02c140_285f9032ec58@nysa.notmuch","threadId":"35925","inReplyTo":"53076DFC.1000602@gmail.com","subject":"RE: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-04-12T20:01:52Z","receivedAt":"2014-04-12T20:01:52Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Daniel Liew wrote:\n> git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc\n> \n> Use the hgrc configuration file in the internal mercurial repository in\n> addition to the other system wide hgrc files. This is done by using the\n> 'ui' object from the 'repository' object which will have loaded the\n> repository hgrc file if it exists.\n\nWhat is the problem you are trying to solve? Is there a way to test that this\ncode is working correctly?\n\n> Prior to this patch the mercurial repository's hgrc file was ignored\n> which I consider to be a bug.\n\nIt might be, although the internal repository is not supposed to be used by the\nuser.\n\n> Signed-off-by: Dan Liew <delcypher@gmail.com>\n> ---\n>  contrib/remote-helpers/git-remote-hg | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/contrib/remote-helpers/git-remote-hg\n> b/contrib/remote-helpers/git-remote-hg\n> index eb89ef6..451842a 100755\n> --- a/contrib/remote-helpers/git-remote-hg\n> +++ b/contrib/remote-helpers/git-remote-hg\n> @@ -421,7 +421,7 @@ def get_repo(url, alias):\n> \n>          repo = hg.repository(myui, local_path)\n>          try:\n> -            peer = hg.peer(myui, {}, url)\n> +            peer = hg.peer(repo._unfilteredrepo.ui, {}, url)\n\nWhy not repo.unfiltered.ui? Or just repo.ui.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"238888","messageId":"CANNJ_zjVaymTUmSSFHfSpmcH7H2v62nsHaUoxRfi098zqLi_Ow@mail.gmail.com","threadId":"35925","inReplyTo":"53499bb02c140_285f9032ec58@nysa.notmuch","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Delcypher","fromEmail":"delcypher@gmail.com","sentAt":"2014-04-15T15:37:23Z","receivedAt":"2014-04-15T15:37:23Z","isPatch":true,"sender":{"key":"delcypher@gmail.com","avatar":"https://gravatar.com/avatar/a51a42ac111d81caef0661a8ce18559ae2eaddf8d82d3aff84bf97967d950b84?d=mp&s=160"},"body":"> What is the problem you are trying to solve?\nThe problem I was trying to solve is I wanted my authentication\ndetails to be in a hgrc local to the repository.\n\nThe problem is git-remote-hg will parse\n``.git/hg/origin/clone/.hg/hgrc`` but will ignore any settings in it\n(this seems a little silly).\nYou can see that git-remote-hg parses this by placing invalid syntax\nin the file.\n\n> Is there a way to test that this\n> code is working correctly?\n\nThe effects are much more obvious if you use a mercurial repository\nthat uses https and then you try to push to it with authentication\ndetails in ``.git/hg/origin/clone/.hg/hgrc``. For example\n\n[auth]\ncc.prefix = hg.codeplex.com\ncc.username = USERNAME\ncc.password = PASSWORD\ncc.schemes = https\n\npushing will fail because the authorisation details get completely\nignored and you will get an exception raised with a stack trace like\nthis...\n\nTraceback (most recent call last):\n  File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1254, in <module>\n    sys.exit(main(sys.argv))\n  File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1238, in main\n    do_export(parser)\n  File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1119, in do_export\n    if not push(parser.repo, peer, parsed_refs, p_revs):\n  File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1007, in push\n    ret = push_unsafe(repo, remote, parsed_refs, p_revs)\n  File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 990, in push_unsafe\n    return remote.unbundle(cg, remoteheads, 'push')\n  File \"/usr/lib/python2.7/site-packages/mercurial/wireproto.py\", line\n308, in unbundle\n    ret, output = self._callpush(\"unbundle\", cg, heads=heads)\n  File \"/usr/lib/python2.7/site-packages/mercurial/httppeer.py\", line\n201, in _callpush\n    r = self._call(cmd, data=fp, headers=headers, **args)\n  File \"/usr/lib/python2.7/site-packages/mercurial/httppeer.py\", line\n171, in _call\n    fp = self._callstream(cmd, **args)\n  File \"/usr/lib/python2.7/site-packages/mercurial/httppeer.py\", line\n118, in _callstream\n    resp = self.urlopener.open(req)\n  File \"/usr/lib/python2.7/urllib2.py\", line 410, in open\n    response = meth(req, response)\n  File \"/usr/lib/python2.7/urllib2.py\", line 523, in http_response\n    'http', request, response, code, msg, hdrs)\n  File \"/usr/lib/python2.7/urllib2.py\", line 442, in error\n    result = self._call_chain(*args)\n  File \"/usr/lib/python2.7/urllib2.py\", line 382, in _call_chain\n    result = func(*args)\n  File \"/usr/lib/python2.7/urllib2.py\", line 897, in http_error_401\n    url, req, headers)\n  File \"/usr/lib/python2.7/site-packages/mercurial/url.py\", line 436,\nin http_error_auth_reqed\n    self, auth_header, host, req, headers)\n  File \"/usr/lib/python2.7/urllib2.py\", line 872, in http_error_auth_reqed\n    response = self.retry_http_basic_auth(host, req, realm)\n  File \"/usr/lib/python2.7/urllib2.py\", line 878, in retry_http_basic_auth\n    user, pw = self.passwd.find_user_password(realm, host)\n  File \"/usr/lib/python2.7/site-packages/mercurial/url.py\", line 36,\nin find_user_password\n    raise util.Abort(_('http authorization required'))\nmercurial.error.Abort: http authorization required\n\n\nHowever, if you don't have a repository to hand you could also do the\nfollowing to observe the settings in the repository's hgrc being\nrespected\n\n1. Clone a repository\n$ git clone hg::https://hg.codeplex.com/boogie\n\n2. Add setting to ``.git/hg/origin/clone/.hg/hgrc``\n\n[ui]\nquiet = True\n\n3. With the current of git-remote-hg, when you do a pull you see\n\n$ git pull\nsearching for changes\nno changes found\nAlready up-to-date.\n\nYou can see that \"quiet\" is **not** being respected. If use my patch\nto git-remote-hg and run again you see\n\n\n$ git pull\nAlready up-to-date.\n\nwhich shows \"quiet\" being respected.\n\n>> Prior to this patch the mercurial repository's hgrc file was ignored\n>> which I consider to be a bug.\n>\n> It might be, although the internal repository is not supposed to be used by the\n> user.\n>\n>> Signed-off-by: Dan Liew <delcypher@gmail.com>\n>> ---\n>>  contrib/remote-helpers/git-remote-hg | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>>\n>> diff --git a/contrib/remote-helpers/git-remote-hg\n>> b/contrib/remote-helpers/git-remote-hg\n>> index eb89ef6..451842a 100755\n>> --- a/contrib/remote-helpers/git-remote-hg\n>> +++ b/contrib/remote-helpers/git-remote-hg\n>> @@ -421,7 +421,7 @@ def get_repo(url, alias):\n>>\n>>          repo = hg.repository(myui, local_path)\n>>          try:\n>> -            peer = hg.peer(myui, {}, url)\n>> +            peer = hg.peer(repo._unfilteredrepo.ui, {}, url)\n>\n> Why not repo.unfiltered.ui? Or just repo.ui.\n\nusing repo.unfiltered.ui makes git-remote-hg return \"ERROR: Repository error\"\n\nUsing \"repo.ui\" works correctly. I simply did not know that was there\nbecause I was debugging using PyDev in Eclipse and I could only find a\nui object in repo.unfiltered.ui. PyDev does not show \"repo.ui\" but it\nclearly works so using repo.ui is probably better than\nrepo._unfilteredrepo.ui\n\nThanks,\nDan Liew.\n"},{"id":"239152","messageId":"53540df5ad0fb_18fb153d2ec8b@nysa.notmuch","threadId":"35925","inReplyTo":"CANNJ_zjVaymTUmSSFHfSpmcH7H2v62nsHaUoxRfi098zqLi_Ow@mail.gmail.com","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-04-20T18:12:05Z","receivedAt":"2014-04-20T18:12:05Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Delcypher wrote:\n> > What is the problem you are trying to solve?\n> The problem I was trying to solve is I wanted my authentication\n> details to be in a hgrc local to the repository.\n> \n> The problem is git-remote-hg will parse\n> ``.git/hg/origin/clone/.hg/hgrc`` but will ignore any settings in it\n> (this seems a little silly).\n> You can see that git-remote-hg parses this by placing invalid syntax\n> in the file.\n> \n> > Is there a way to test that this\n> > code is working correctly?\n> \n> The effects are much more obvious if you use a mercurial repository\n> that uses https and then you try to push to it with authentication\n> details in ``.git/hg/origin/clone/.hg/hgrc``. For example\n> \n> [auth]\n> cc.prefix = hg.codeplex.com\n> cc.username = USERNAME\n> cc.password = PASSWORD\n> cc.schemes = https\n> \n> pushing will fail because the authorisation details get completely\n> ignored and you will get an exception raised with a stack trace like\n> this...\n> \n> Traceback (most recent call last):\n>   File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1254, in <module>\n>     sys.exit(main(sys.argv))\n>   File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1238, in main\n>     do_export(parser)\n>   File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1119, in do_export\n>     if not push(parser.repo, peer, parsed_refs, p_revs):\n>   File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 1007, in push\n>     ret = push_unsafe(repo, remote, parsed_refs, p_revs)\n>   File \"/home/dsl11/dev/git-remote-hg/git-remote-hg\", line 990, in push_unsafe\n>     return remote.unbundle(cg, remoteheads, 'push')\n>   File \"/usr/lib/python2.7/site-packages/mercurial/wireproto.py\", line\n> 308, in unbundle\n>     ret, output = self._callpush(\"unbundle\", cg, heads=heads)\n>   File \"/usr/lib/python2.7/site-packages/mercurial/httppeer.py\", line\n> 201, in _callpush\n>     r = self._call(cmd, data=fp, headers=headers, **args)\n>   File \"/usr/lib/python2.7/site-packages/mercurial/httppeer.py\", line\n> 171, in _call\n>     fp = self._callstream(cmd, **args)\n>   File \"/usr/lib/python2.7/site-packages/mercurial/httppeer.py\", line\n> 118, in _callstream\n>     resp = self.urlopener.open(req)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 410, in open\n>     response = meth(req, response)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 523, in http_response\n>     'http', request, response, code, msg, hdrs)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 442, in error\n>     result = self._call_chain(*args)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 382, in _call_chain\n>     result = func(*args)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 897, in http_error_401\n>     url, req, headers)\n>   File \"/usr/lib/python2.7/site-packages/mercurial/url.py\", line 436,\n> in http_error_auth_reqed\n>     self, auth_header, host, req, headers)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 872, in http_error_auth_reqed\n>     response = self.retry_http_basic_auth(host, req, realm)\n>   File \"/usr/lib/python2.7/urllib2.py\", line 878, in retry_http_basic_auth\n>     user, pw = self.passwd.find_user_password(realm, host)\n>   File \"/usr/lib/python2.7/site-packages/mercurial/url.py\", line 36,\n> in find_user_password\n>     raise util.Abort(_('http authorization required'))\n> mercurial.error.Abort: http authorization required\n> \n> \n> However, if you don't have a repository to hand you could also do the\n> following to observe the settings in the repository's hgrc being\n> respected\n> \n> 1. Clone a repository\n> $ git clone hg::https://hg.codeplex.com/boogie\n> \n> 2. Add setting to ``.git/hg/origin/clone/.hg/hgrc``\n> \n> [ui]\n> quiet = True\n> \n> 3. With the current of git-remote-hg, when you do a pull you see\n> \n> $ git pull\n> searching for changes\n> no changes found\n> Already up-to-date.\n> \n> You can see that \"quiet\" is **not** being respected. If use my patch\n> to git-remote-hg and run again you see\n> \n> \n> $ git pull\n> Already up-to-date.\n> \n> which shows \"quiet\" being respected.\n\nThis is what I get:\n\n% git pull                                                                                                          /tmp/boogie[master] nysa\nsearching for changes\nno changes found\nAlready up-to-date.\n % cat > .git/hg/origin/clone/.hg/hgrc <<EOF\n[ui]\nquiet = True\nEOF\n % git pull                                                                                                          /tmp/boogie[master] nysa\nAlready up-to-date.\n\nSo clearly there is something different on my side.\n\nWhat version of Mercurial are you using?\n\n-- \nFelipe Contreras\n"},{"id":"239175","messageId":"535425d891e41_6b186d130cc5@nysa.notmuch","threadId":"35925","inReplyTo":"CANNJ_zhpoRRTL1j8XKahrsqEgKfvFck-+aJ20X1OyAg73gGiqQ@mail.gmail.com","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-04-20T19:54:00Z","receivedAt":"2014-04-20T19:54:00Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Delcypher wrote:\n> > What version of Mercurial are you using?\n> \n> $ hg --version\n> \n> Mercurial Distributed SCM (version 2.9.2)\n\nSame as me. And which version of git-remote-hg are you using?\n\n-- \nFelipe Contreras\n"},{"id":"239174","messageId":"CANNJ_zhpoRRTL1j8XKahrsqEgKfvFck-+aJ20X1OyAg73gGiqQ@mail.gmail.com","threadId":"35925","inReplyTo":"53540df5ad0fb_18fb153d2ec8b@nysa.notmuch","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Delcypher","fromEmail":"delcypher@gmail.com","sentAt":"2014-04-20T19:57:12Z","receivedAt":"2014-04-20T19:57:12Z","isPatch":true,"sender":{"key":"delcypher@gmail.com","avatar":"https://gravatar.com/avatar/a51a42ac111d81caef0661a8ce18559ae2eaddf8d82d3aff84bf97967d950b84?d=mp&s=160"},"body":"> What version of Mercurial are you using?\n\n$ hg --version\n\nMercurial Distributed SCM (version 2.9.2)\n(see http://mercurial.selenic.com for more information)\n\nCopyright (C) 2005-2014 Matt Mackall and others\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"},{"id":"239177","messageId":"CANNJ_zi=qrhmWjd0_QR5-LLjuf2yM8g88xhiwmwdqansvaYy3A@mail.gmail.com","threadId":"35925","inReplyTo":"535425d891e41_6b186d130cc5@nysa.notmuch","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Delcypher","fromEmail":"delcypher@gmail.com","sentAt":"2014-04-20T20:36:19Z","receivedAt":"2014-04-20T20:36:19Z","isPatch":true,"sender":{"key":"delcypher@gmail.com","avatar":"https://gravatar.com/avatar/a51a42ac111d81caef0661a8ce18559ae2eaddf8d82d3aff84bf97967d950b84?d=mp&s=160"},"body":"> Same as me. And which version of git-remote-hg are you using?\n\nI'm using the version that ships with git 1.9.2\n\nI've taken a look and it seems I made a mistake, sorry. It seems that\n\n[ui]\nquiet = True\n\nis being respected when placed in ``.git/hg/origin/clone/.hg/hgrc``\n\nwith the un patched version of git-remote-hg.\n\nBut it is still the case that authentication details are being ignored\nwhen present in  ``.git/hg/origin/clone/.hg/hgrc``\n\ni.e. something like the following is ignored.\n\n[auth]\ncc.prefix = hg.codeplex.com\ncc.username = USERNAME\n# Eurgh fixme this shouldn't live here.\ncc.password = PWD\ncc.schemes = https\n\nand pushing fails. An easy way of duplicating this is forking a\nproject on codeplex (e.g. [1]), cloning that respository, making a\ntrivial commit and then trying to push that commit to your fork.\n\nWhen I try this pushing fails because the authentication details are\nbeing ignored in  ``.git/hg/origin/clone/.hg/hgrc``. Applying my patch\n(or your improved version using repo.ui instead of\nrepo._unfilteredrepo.ui) fixes this for me.\n\n[1] https://boogie.codeplex.com/SourceControl/latest\n"},{"id":"239178","messageId":"535432b6494cf_4a5cd6130c16@nysa.notmuch","threadId":"35925","inReplyTo":"CANNJ_zi=qrhmWjd0_QR5-LLjuf2yM8g88xhiwmwdqansvaYy3A@mail.gmail.com","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2014-04-20T20:48:54Z","receivedAt":"2014-04-20T20:48:54Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Delcypher wrote:\n> > Same as me. And which version of git-remote-hg are you using?\n> \n> I'm using the version that ships with git 1.9.2\n> \n> I've taken a look and it seems I made a mistake, sorry. It seems that\n> \n> [ui]\n> quiet = True\n> \n> is being respected when placed in ``.git/hg/origin/clone/.hg/hgrc``\n> \n> with the un patched version of git-remote-hg.\n> \n> But it is still the case that authentication details are being ignored\n> when present in  ``.git/hg/origin/clone/.hg/hgrc``\n> \n> i.e. something like the following is ignored.\n> \n> [auth]\n> cc.prefix = hg.codeplex.com\n> cc.username = USERNAME\n> # Eurgh fixme this shouldn't live here.\n> cc.password = PWD\n> cc.schemes = https\n\nI see now, I've taken the patch with repo.ui and applied on my repo:\n\nhttps://github.com/felipec/git/commit/ee17fe1cf80d5196be382ebbbcb1a24c05e61658\n\nIf Junio wants to take that he can add my s-o-b.\n\nCheers.\n\n-- \nFelipe Contreras\n"},{"id":"239184","messageId":"CANNJ_zg4hNWJDignen7YK1ta5gEDyu6nP4D8ZQNTn-1xypm2-Q@mail.gmail.com","threadId":"35925","inReplyTo":"535432b6494cf_4a5cd6130c16@nysa.notmuch","subject":"Re: [PATCH] git-remote-hg : Enable use of, $GIT_DIR/hg/origin/clone/.hg/hgrc","fromName":"Delcypher","fromEmail":"delcypher@gmail.com","sentAt":"2014-04-20T21:25:02Z","receivedAt":"2014-04-20T21:25:02Z","isPatch":true,"sender":{"key":"delcypher@gmail.com","avatar":"https://gravatar.com/avatar/a51a42ac111d81caef0661a8ce18559ae2eaddf8d82d3aff84bf97967d950b84?d=mp&s=160"},"body":"> I see now, I've taken the patch with repo.ui and applied on my repo:\n>\n> https://github.com/felipec/git/commit/ee17fe1cf80d5196be382ebbbcb1a24c05e61658\n\nThanks.\n\nIt might be helpful to catch the exception raised if https\nauthentication details are missing so that a more user friendly error\nmessage can be presented. I considered doing this but I wasn't\nentirely sure how to correctly do any necessary clean up.\n"}]}