{"thread":{"id":"34507","subject":"[PATCH] remotes-hg: bugfix for fetching non local remotes","startedAt":"2013-07-22T01:22:59Z","lastAt":"2013-07-22T01:22:59Z","messageCount":1,"participants":["Joern Hees"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"223897","messageId":"1374456179-96670-1-git-send-email-dev@joernhees.de","threadId":"34507","inReplyTo":null,"subject":"[PATCH] remotes-hg: bugfix for fetching non local remotes","fromName":"Joern Hees","fromEmail":"dev@joernhees.de","sentAt":"2013-07-22T01:22:59Z","receivedAt":"2013-07-22T01:22:59Z","isPatch":true,"sender":{"key":"dev@joernhees.de","avatar":"https://gravatar.com/avatar/590cc6f9e7423070747b155451ff7227c749cc3d3621359f2f3eddce0099a8f4?d=mp&s=160"},"body":"6796d49 introduced a bug by making shared_path == \".git/hg' which\nwill most likely exist already, causing a new remote never to be\ncloned and subsequently causing hg.share to fail with error msg:\n\"mercurial.error.RepoError: repository .git/hg not found\"\n\nChanging gitdir to dirname causes shared_path ==\n.git/hg/<remote_name>/hg. The call to hg.share with local_path ==\n.git/hg/<remote_name>/clone works again.\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 b/contrib/remote-helpers/git-remote-hg\nindex 0194c67..89dd4cc 100755\n--- a/contrib/remote-helpers/git-remote-hg\n+++ b/contrib/remote-helpers/git-remote-hg\n@@ -390,7 +390,7 @@ def get_repo(url, alias):\n         if not os.path.exists(dirname):\n             os.makedirs(dirname)\n     else:\n-        shared_path = os.path.join(gitdir, 'hg')\n+        shared_path = os.path.join(dirname, 'hg')\n         if not os.path.exists(shared_path):\n             try:\n                 hg.clone(myui, {}, url, shared_path, update=False, pull=True)\n-- \n1.8.3.3\n"}]}