Patchwork [5,of,6,V2] tests: consolidate update from obsolete changeset logic

login
register
mail settings
Submitter Sean Farley
Date Jan. 12, 2014, 10:25 p.m.
Message ID <e24232bda6e709274ba1.1389565553@laptop.local>
Download mbox | patch
Permalink /patch/3313/
State Superseded
Headers show

Comments

Sean Farley - Jan. 12, 2014, 10:25 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1385588966 21600
#      Wed Nov 27 15:49:26 2013 -0600
# Node ID e24232bda6e709274ba1e1007b8dbdd04c10ab29
# Parent  b97f7e3553f1694abd360e30c0e4a9eac59f393a
tests: consolidate update from obsolete changeset logic

The test written as is doesn't actually do what it says: a no-argument update
from an obsolete changeset. Since 2ca325ea57fa added a bookmark test, we move
that to an equivalent test so that we can keep the tests to a minimum.
Pierre-Yves David - Jan. 13, 2014, 9:51 a.m.
On 01/12/2014 02:25 PM, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@gmail.com>
> # Date 1385588966 21600
> #      Wed Nov 27 15:49:26 2013 -0600
> # Node ID e24232bda6e709274ba1e1007b8dbdd04c10ab29
> # Parent  b97f7e3553f1694abd360e30c0e4a9eac59f393a
> tests: consolidate update from obsolete changeset logic
>
>
>     $ hg up --quiet --hidden 3
> +  $ hg up
> +  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +
> +Test that 5 is detected as a valid destination from 1 and also accepts moving
> +the bookmark (issue4015)
> +  $ hg up --quiet 0          # we should be able to update to 1 directly
> +  $ hg up --quiet 1          # but not implemented yet.

What do you mean ?
Sean Farley - Jan. 13, 2014, 5:19 p.m.
pierre-yves.david@ens-lyon.org writes:

> On 01/12/2014 02:25 PM, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <sean.michael.farley@gmail.com>
>> # Date 1385588966 21600
>> #      Wed Nov 27 15:49:26 2013 -0600
>> # Node ID e24232bda6e709274ba1e1007b8dbdd04c10ab29
>> # Parent  b97f7e3553f1694abd360e30c0e4a9eac59f393a
>> tests: consolidate update from obsolete changeset logic
>>
>>
>>     $ hg up --quiet --hidden 3
>> +  $ hg up
>> +  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>> +
>> +Test that 5 is detected as a valid destination from 1 and also accepts moving
>> +the bookmark (issue4015)
>> +  $ hg up --quiet 0          # we should be able to update to 1 directly
>> +  $ hg up --quiet 1          # but not implemented yet.
>
> What do you mean ?

You mean the comment? It's a comment you wrote that still applies now
(you have to update to 0 before updating to 1).

Patch

diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -203,11 +203,10 @@  Test no-argument update to a successor o
   | |/
   | @  1:0786582aa4b1 1
   |/
   o  0:60829823a42a 0
   
-  $ hg book bm -r 3
   $ hg status
   M foo
 
 We add simple obsolescence marker between 3 and 4 (indirect successors)
 
@@ -216,27 +215,28 @@  We add simple obsolescence marker betwee
   $ hg id --debug -i -r 4
   d047485b3896813b2a624e86201983520f003206
   $ hg debugobsolete 6efa171f091b00a3c35edc15d48c52a498929953 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
   $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa d047485b3896813b2a624e86201983520f003206
 
-Test that 5 is detected as a valid destination from 3 and also accepts moving
-the bookmark (issue4015)
+Test that 5 is detected as a valid destination from 3
 
   $ hg up --quiet --hidden 3
+  $ hg up
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+Test that 5 is detected as a valid destination from 1 and also accepts moving
+the bookmark (issue4015)
+  $ hg up --quiet 0          # we should be able to update to 1 directly
+  $ hg up --quiet 1          # but not implemented yet.
+  $ hg book -qf bm
   $ hg up 5
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg book bm
-  moving bookmark 'bm' forward from 6efa171f091b
+  moving bookmark 'bm' forward from 0786582aa4b1
   $ hg bookmarks
    * bm                        5:ff252e8273df
 
-Test that 5 is detected as a valid destination from 1
-  $ hg up --quiet 0          # we should be able to update to 3 directly
-  $ hg up --quiet --hidden 3 # but not implemented yet.
-  $ hg up 5
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
 Test that 5 is not detected as a valid destination from 2
   $ hg up --quiet 0
   $ hg up --quiet 2
   $ hg up 5
   abort: uncommitted changes