Patchwork [4,of,4] test-subrepo-missing: test updating parent repo with missing subrepo revision

login
register
mail settings
Submitter Angel Ezquerra
Date Nov. 25, 2013, 8:46 p.m.
Message ID <b7dde04337cb6dced4f2.1385412410@Angel-PC.localdomain>
Download mbox | patch
Permalink /patch/3137/
State Changes Requested
Headers show

Comments

Angel Ezquerra - Nov. 25, 2013, 8:46 p.m.
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1385410402 -3600
#      Mon Nov 25 21:13:22 2013 +0100
# Node ID b7dde04337cb6dced4f212756e789391f1dfd6c0
# Parent  744f6a7b25cd7ea810ddcce3724ed82108706d5c
test-subrepo-missing: test updating parent repo with missing subrepo revision
Angel Ezquerra - Jan. 16, 2014, 9:21 p.m.
Forwarding Pierre-Yves' email to the list:

---------- Forwarded message ----------
From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Date: Wed, Jan 15, 2014 at 3:52 PM
Subject: Re: [PATCH 4 of 4] test-subrepo-missing: test updating parent
repo with missing subrepo revision
To: Angel Ezquerra <angel.ezquerra@gmail.com>


On 11/25/2013 12:46 PM, Angel Ezquerra wrote:
>
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra@gmail.com>
> # Date 1385410402 -3600
> #      Mon Nov 25 21:13:22 2013 +0100
> # Node ID b7dde04337cb6dced4f212756e789391f1dfd6c0
> # Parent  744f6a7b25cd7ea810ddcce3724ed82108706d5c
> test-subrepo-missing: test updating parent repo with missing subrepo revision


please stick that in the changeset introducing the feature.

--
Pierre-Yves
Angel Ezquerra - Jan. 16, 2014, 9:21 p.m.
> From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> Date: Wed, Jan 15, 2014 at 3:52 PM
> Subject: Re: [PATCH 4 of 4] test-subrepo-missing: test updating parent
> repo with missing subrepo revision
> To: Angel Ezquerra <angel.ezquerra@gmail.com>
>
>
> On 11/25/2013 12:46 PM, Angel Ezquerra wrote:
>>
>> # HG changeset patch
>> # User Angel Ezquerra <angel.ezquerra@gmail.com>
>> # Date 1385410402 -3600
>> #      Mon Nov 25 21:13:22 2013 +0100
>> # Node ID b7dde04337cb6dced4f212756e789391f1dfd6c0
>> # Parent  744f6a7b25cd7ea810ddcce3724ed82108706d5c
>> test-subrepo-missing: test updating parent repo with missing subrepo revision
>
>
> please stick that in the changeset introducing the feature.

OK. At least I've been consistent in how I've been doing this wrong :-)

Patch

# HG changeset patch
# User Angel Ezquerra <angel.ezquerra@gmail.com>
# Date 1385410402 -3600
#      Mon Nov 25 21:13:22 2013 +0100
# Node ID b7dde04337cb6dced4f212756e789391f1dfd6c0
# Parent  744f6a7b25cd7ea810ddcce3724ed82108706d5c
test-subrepo-missing: test updating parent repo with missing subrepo revision

diff --git a/tests/test-subrepo-missing.t b/tests/test-subrepo-missing.t
--- a/tests/test-subrepo-missing.t
+++ b/tests/test-subrepo-missing.t
@@ -68,4 +68,36 @@ 
   $ ls subrepo
   a
 
+Enable obsolete
+
+  $ cat > ${TESTTMP}/obs.py << EOF
+  > import mercurial.obsolete
+  > mercurial.obsolete._enabled = True
+  > EOF
+  $ cat >> $HGRCPATH << EOF
+  > [ui]
+  > logtemplate= {rev}:{node|short} {desc|firstline}
+  > [phases]
+  > publish=False
+  > [extensions]'
+  > obs=${TESTTMP}/obs.py
+  > EOF
+
+check that we can update parent repo with missing (amended) subrepo revision
+
+  $ hg up --repository subrepo -r tip
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg ci -m "updated subrepo to tip"
+  created new head
+  $ cd subrepo
+  $ hg update -r tip
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo foo > a
+  $ hg commit --amend -m "addb (amended)"
   $ cd ..
+  $ hg update --clean .
+  target revision (102a90ea7b4a) in subrepo subrepo is hidden
+  do you want to update to it anyway (Yn)? y
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ cd ..