diff mercurial/hg.py @ 35331:773a9a06047c

clone: add support for storing remotenames while cloning If `experimental.remotenames` is set to True, we store the remotenames in case of `hg pull`. This patch adds that support to clone command also. Differential Revision: https://phab.mercurial-scm.org/D1601
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 06 Dec 2017 06:40:27 +0530
parents b64ea7fb9599
children a29fe459fc49
line wrap: on
line diff
--- a/mercurial/hg.py	Fri Dec 08 14:20:34 2017 -0800
+++ b/mercurial/hg.py	Wed Dec 06 06:40:27 2017 +0530
@@ -31,6 +31,7 @@
     merge as mergemod,
     node,
     phases,
+    remotenames,
     repoview,
     scmutil,
     sshpeer,
@@ -689,6 +690,9 @@
 
             destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone')
 
+            if ui.configbool('experimental', 'remotenames'):
+                remotenames.pullremotenames(destrepo, srcpeer)
+
             if update:
                 if update is not True:
                     checkout = srcpeer.lookup(update)