Patchwork test-subrepo: document why share magically works even if subrepos are missing

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 10, 2018, 3:13 a.m.
Message ID <ecc1380d217c65025da4.1541819588@mimosa>
Download mbox | patch
Permalink /patch/36500/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 10, 2018, 3:13 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1541818881 -32400
#      Sat Nov 10 12:01:21 2018 +0900
# Node ID ecc1380d217c65025da4b25ec6792ce3a0da0209
# Parent  96eb29b6c0edd5a3483b44a8f8f02eee2a65be70
test-subrepo: document why share magically works even if subrepos are missing

I was confused how it's working while reviewing fb490d798be0, "share: reload
repo after adjusting it in postshare()."
Augie Fackler - Nov. 12, 2018, 7:15 p.m.
queued, thanks

> On Nov 9, 2018, at 22:13, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1541818881 -32400
> #      Sat Nov 10 12:01:21 2018 +0900
> # Node ID ecc1380d217c65025da4b25ec6792ce3a0da0209
> # Parent  96eb29b6c0edd5a3483b44a8f8f02eee2a65be70
> test-subrepo: document why share magically works even if subrepos are missing
> 
> I was confused how it's working while reviewing fb490d798be0, "share: reload
> repo after adjusting it in postshare()."
> 
> diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t
> --- a/tests/test-subrepo-recursion.t
> +++ b/tests/test-subrepo-recursion.t
> @@ -559,8 +559,9 @@ The newly cloned subrepos contain no wor
>   commit: (clean)
>   update: 4 new changesets (update)
> 
> -Sharing a local repo without the locally referenced subrepo (i.e. it was never
> -updated from null) works, but clone fails.
> +Sharing a local repo with missing local subrepos (i.e. it was never updated
> +from null) works because the default path is copied from the source repo,
> +whereas clone should fail.
> 
>   $ hg --config progress.disable=True clone -U ../empty ../empty2
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t
--- a/tests/test-subrepo-recursion.t
+++ b/tests/test-subrepo-recursion.t
@@ -559,8 +559,9 @@  The newly cloned subrepos contain no wor
   commit: (clean)
   update: 4 new changesets (update)
 
-Sharing a local repo without the locally referenced subrepo (i.e. it was never
-updated from null) works, but clone fails.
+Sharing a local repo with missing local subrepos (i.e. it was never updated
+from null) works because the default path is copied from the source repo,
+whereas clone should fail.
 
   $ hg --config progress.disable=True clone -U ../empty ../empty2