comparison tests/test-share.t @ 39848:4ece3cdfd907

localrepo: support shared repo creation Previously, hg.share() had its own logic for creating a new repository on the filesystem. With the recent introduction of the createopts dict for passing options to influence repository creation, it is now possible to consolidate the repo creation code for both the normal and shared use cases. This commit teaches the repo creation code in localrepo to recognize when we're creating a shared repo and to act appropriately. Meaningful behavior should be identical. However, there are a few subtle changes: * The .hg/requires file is written out in sorted order (rather than having share-related requirements appended at end). * The .hg directory is created with notindexed=True when a shared repo is being created. Differential Revision: https://phab.mercurial-scm.org/D4707
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 19 Sep 2018 17:05:59 -0700
parents 9de1a1c83cd7
children bd0874977a5e
comparison
equal deleted inserted replaced
39847:b504ff813c4f 39848:4ece3cdfd907
397 $ hg share -U --relative thisdir/abs thisdir/rel 397 $ hg share -U --relative thisdir/abs thisdir/rel
398 $ cat thisdir/rel/.hg/sharedpath 398 $ cat thisdir/rel/.hg/sharedpath
399 ../../orig/.hg (no-eol) 399 ../../orig/.hg (no-eol)
400 $ grep shared thisdir/*/.hg/requires 400 $ grep shared thisdir/*/.hg/requires
401 thisdir/abs/.hg/requires:shared 401 thisdir/abs/.hg/requires:shared
402 thisdir/rel/.hg/requires:relshared
402 thisdir/rel/.hg/requires:shared 403 thisdir/rel/.hg/requires:shared
403 thisdir/rel/.hg/requires:relshared
404 404
405 test that relative shared paths aren't relative to $PWD 405 test that relative shared paths aren't relative to $PWD
406 406
407 $ cd thisdir 407 $ cd thisdir
408 $ hg -R rel root 408 $ hg -R rel root