Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
35330:0c1aff6d73a7 | 35331:773a9a06047c |
---|---|
29 localrepo, | 29 localrepo, |
30 lock, | 30 lock, |
31 merge as mergemod, | 31 merge as mergemod, |
32 node, | 32 node, |
33 phases, | 33 phases, |
34 remotenames, | |
34 repoview, | 35 repoview, |
35 scmutil, | 36 scmutil, |
36 sshpeer, | 37 sshpeer, |
37 statichttprepo, | 38 statichttprepo, |
38 ui as uimod, | 39 ui as uimod, |
686 defaulturl = bytes(u) | 687 defaulturl = bytes(u) |
687 fp.write(util.tonativeeol(template % defaulturl)) | 688 fp.write(util.tonativeeol(template % defaulturl)) |
688 fp.close() | 689 fp.close() |
689 | 690 |
690 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') | 691 destrepo.ui.setconfig('paths', 'default', defaulturl, 'clone') |
692 | |
693 if ui.configbool('experimental', 'remotenames'): | |
694 remotenames.pullremotenames(destrepo, srcpeer) | |
691 | 695 |
692 if update: | 696 if update: |
693 if update is not True: | 697 if update is not True: |
694 checkout = srcpeer.lookup(update) | 698 checkout = srcpeer.lookup(update) |
695 uprev = None | 699 uprev = None |