comparison tests/test-archive.t @ 34879:7d51a7792f52

subrepo: implement 'unshare' for Mercurial subrepos I think there's a slight hole here in that a subrepo could be shared, removed from .hgsub, and then it's not part of context.substate (so not iterated over). But the push command has the same hole IIRC, and I think removing a subrepo is an edge case. The import hack is a copy/paste of subrepo.subrepo().
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 17 Oct 2017 22:55:33 -0400
parents 68e0bcb90357
children 1e2dc50da17b
comparison
equal deleted inserted replaced
34878:9f7ecc5bbc28 34879:7d51a7792f52
49 $ echo 'mod' > share2/subrepo/sub 49 $ echo 'mod' > share2/subrepo/sub
50 $ hg -R share2 ci -Sqm 'subrepo mod' 50 $ hg -R share2 ci -Sqm 'subrepo mod'
51 $ hg -R clone1 update -C tip 51 $ hg -R clone1 update -C tip
52 cloning subrepo subrepo from $TESTTMP/test/subrepo 52 cloning subrepo subrepo from $TESTTMP/test/subrepo
53 3 files updated, 0 files merged, 0 files removed, 0 files unresolved 53 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 $ find share2 | egrep 'sharedpath|00.+\.i' | sort
55 share2/.hg/sharedpath
56 share2/subrepo/.hg/sharedpath
57 $ hg -R share2 unshare
58 unsharing subrepo 'subrepo'
59 $ find share2 | egrep 'sharedpath|00.+\.i' | sort
60 share2/.hg/00changelog.i
61 share2/.hg/sharedpath.old
62 share2/.hg/store/00changelog.i
63 share2/.hg/store/00manifest.i
64 share2/subrepo/.hg/00changelog.i
65 share2/subrepo/.hg/sharedpath.old
66 share2/subrepo/.hg/store/00changelog.i
67 share2/subrepo/.hg/store/00manifest.i
68 $ hg -R share2/subrepo log -r tip -T compact
69 1[tip] 559dcc9bfa65 1970-01-01 00:00 +0000 test
70 subrepo mod
71
54 $ rm -rf clone1 72 $ rm -rf clone1
55 73
56 $ hg clone -qr 1 test clone1 74 $ hg clone -qr 1 test clone1
57 $ hg share clone1 shared3 75 $ hg share clone1 shared3
58 updating working directory 76 updating working directory