{"thread":{"id":"34527","subject":"[PATCH v2] remotes-hg: bugfix for fetching non local remotes","startedAt":"2013-07-24T14:21:41Z","lastAt":"2013-07-25T00:42:21Z","messageCount":3,"participants":["Joern Hees","Junio C Hamano","Jörn Hees"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"224041","messageId":"1374675701-10592-1-git-send-email-dev@joernhees.de","threadId":"34527","inReplyTo":null,"subject":"[PATCH v2] remotes-hg: bugfix for fetching non local remotes","fromName":"Joern Hees","fromEmail":"dev@joernhees.de","sentAt":"2013-07-24T14:21:41Z","receivedAt":"2013-07-24T14:21:41Z","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 shared_path to \".git/hg/.shared\" will solve this problem\nand create a shared local mercurial repository for non local remotes.\nThe initial dot circumvents a name clash problem should a remote be\ncalled \"shared\".\n\nSigned-off-by: Joern Hees <dev@joernhees.de>\nMentored-by: Antoine Pelisse <apelisse@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 b/contrib/remote-helpers/git-remote-hg\nindex 0194c67..4a7d7a8 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(gitdir, 'hg', '.share')\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.4\n"},{"id":"224063","messageId":"7vd2q75zoo.fsf@alter.siamese.dyndns.org","threadId":"34527","inReplyTo":"1374675701-10592-1-git-send-email-dev@joernhees.de","subject":"Re: [PATCH v2] remotes-hg: bugfix for fetching non local remotes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-07-24T23:02:47Z","receivedAt":"2013-07-24T23:02:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Joern Hees <dev@joernhees.de> writes:\n\n> 6796d49 introduced a bug by making shared_path == \".git/hg' which\n> will most likely exist already, causing a new remote never to be\n> cloned and subsequently causing hg.share to fail with error msg:\n> \"mercurial.error.RepoError: repository .git/hg not found\"\n>\n> Changing shared_path to \".git/hg/.shared\" will solve this problem\n\nHere you say \"shared\" and the code says \"share\"; which one is\npreferred (I know either would work, but we would want to be\nconsistent).\n\nI'd vote for \"shared\", but I do not see a compelling reason to pick\none over the other so...?\n\n> and create a shared local mercurial repository for non local remotes.\n> The initial dot circumvents a name clash problem should a remote be\n> called \"shared\".\n>\n> Signed-off-by: Joern Hees <dev@joernhees.de>\n> Mentored-by: Antoine Pelisse <apelisse@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 b/contrib/remote-helpers/git-remote-hg\n> index 0194c67..4a7d7a8 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(gitdir, 'hg', '.share')\n>          if not os.path.exists(shared_path):\n>              try:\n>                  hg.clone(myui, {}, url, shared_path, update=False, pull=True)\n"},{"id":"224065","messageId":"6EDE159E-66C2-4CD8-B6D8-9960C681A3FB@joernhees.de","threadId":"34527","inReplyTo":"7vd2q75zoo.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH v2] remotes-hg: bugfix for fetching non local remotes","fromName":"Jörn Hees","fromEmail":"dev@joernhees.de","sentAt":"2013-07-25T00:42:21Z","receivedAt":"2013-07-25T00:42:21Z","isPatch":true,"sender":{"key":"dev@joernhees.de","avatar":"https://gravatar.com/avatar/590cc6f9e7423070747b155451ff7227c749cc3d3621359f2f3eddce0099a8f4?d=mp&s=160"},"body":"\nOn 25 Jul 2013, at 01:02, Junio C Hamano <gitster@pobox.com> wrote:\n> Joern Hees <dev@joernhees.de> writes:\n>> \n>> Changing shared_path to \".git/hg/.shared\" will solve this problem\n> \n> Here you say \"shared\" and the code says \"share\"; which one is\n> preferred (I know either would work, but we would want to be\n> consistent).\n> \n> I'd vote for \"shared\", but I do not see a compelling reason to pick\n> one over the other so…?\n\nok, v3 coming...\n"}]}