From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Hees Subject: [PATCH] [SIGNED-OFF] remotes-hg: bugfix for fetching non local remotes Date: Tue, 23 Jul 2013 23:40:16 +0200 Message-ID: <1374615616-4730-1-git-send-email-dev@joernhees.de> Cc: git@vger.kernel.org, felipe.contreras@gmail.com, Joern Hees To: gitster@pobox.com X-From: git-owner@vger.kernel.org Tue Jul 23 23:40:58 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V1kKH-0003VK-8U for gcvg-git-2@plane.gmane.org; Tue, 23 Jul 2013 23:40:57 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933386Ab3GWVkx (ORCPT ); Tue, 23 Jul 2013 17:40:53 -0400 Received: from srv1.joernhees.de ([81.20.133.80]:37731 "EHLO mail.joernhees.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756943Ab3GWVkw (ORCPT ); Tue, 23 Jul 2013 17:40:52 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.joernhees.de (Postfix) with ESMTP id 8C8CEE8C2A0; Tue, 23 Jul 2013 23:40:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at joernhees.de Received: from mail.joernhees.de ([127.0.0.1]) by localhost (srv1.joernhees.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NjHG1wIc2Net; Tue, 23 Jul 2013 23:40:44 +0200 (CEST) Received: from localhost.localdomain (95-88-55-57-dynip.superkabel.de [95.88.55.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.joernhees.de (Postfix) with ESMTPSA id 7B729E8C28D; Tue, 23 Jul 2013 23:40:44 +0200 (CEST) X-Mailer: git-send-email 1.8.3.3 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 6796d49 introduced a bug by making shared_path == ".git/hg' which will most likely exist already, causing a new remote never to be cloned and subsequently causing hg.share to fail with error msg: "mercurial.error.RepoError: repository .git/hg not found" Changing gitdir to dirname causes shared_path == .git/hg//hg. The call to hg.share with local_path == .git/hg//clone works again. Signed-off-by: Joern Hees --- contrib/remote-helpers/git-remote-hg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 0194c67..89dd4cc 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -390,7 +390,7 @@ def get_repo(url, alias): if not os.path.exists(dirname): os.makedirs(dirname) else: - shared_path = os.path.join(gitdir, 'hg') + shared_path = os.path.join(dirname, 'hg') if not os.path.exists(shared_path): try: hg.clone(myui, {}, url, shared_path, update=False, pull=True) -- 1.8.3.3