Patchwork bookmarks: avoid creating a nested repository during testing

login
register
mail settings
Submitter Martijn Pieters
Date Feb. 12, 2016, 8:19 a.m.
Message ID <70c6f8ac53b569a59b20.1455265184@mjpieters-mbp>
Download mbox | patch
Permalink /patch/13128/
State Superseded
Commit db90cb1e89c8b7aa5cba363ba2f8d9c08fd5e07e
Headers show

Comments

Martijn Pieters - Feb. 12, 2016, 8:19 a.m.
# HG changeset patch
# User Martijn Pieters <mjpieters@fb.com>
# Date 1455265166 0
#      Fri Feb 12 08:19:26 2016 +0000
# Node ID 70c6f8ac53b569a59b20b8097ee91cf1bcad6995
# Parent  cc591353a8663619865b7cfb7f9a1d6ae9f60290
bookmarks: avoid creating a nested repository during testing.

This helps the test to pass with hgwatchman, which would otherwise need to be
taught about a nested .hg directory.
Pierre-Yves David - Feb. 12, 2016, 1:53 p.m.
On 02/12/2016 08:19 AM, Martijn Pieters wrote:
> # HG changeset patch
> # User Martijn Pieters <mjpieters@fb.com>
> # Date 1455265166 0
> #      Fri Feb 12 08:19:26 2016 +0000
> # Node ID 70c6f8ac53b569a59b20b8097ee91cf1bcad6995
> # Parent  cc591353a8663619865b7cfb7f9a1d6ae9f60290
> bookmarks: avoid creating a nested repository during testing.
>
> This helps the test to pass with hgwatchman, which would otherwise need to be
> taught about a nested .hg directory.

While I entirely support detaching bookmark test from repository nesting 
tests, I would like to make sure we still testing repository nesting 
properly and that watchman is still failing a test somewhere for the 
very reason you are working around here.

Can you either find and point at such test case (in the description of a 
V2) or introduce one (in a V2 series) ?

Thanks.
Martijn Pieters - Feb. 12, 2016, 1:59 p.m.
On Fri, Feb 12, 2016 at 1:53 PM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
> While I entirely support detaching bookmark test from repository nesting
> tests, I would like to make sure we still testing repository nesting
> properly and that watchman is still failing a test somewhere for the very
> reason you are working around here.
>
> Can you either find and point at such test case (in the description of a V2)
> or introduce one (in a V2 series) ?

hgwatchman currently has no tests of their own; I'm writing a series
of tests and will make sure I'll include expected failures. That's
very much outside the scope of *this* patch however.
Pierre-Yves David - Feb. 12, 2016, 2:10 p.m.
On 02/12/2016 01:59 PM, Martijn Pieters wrote:
> On Fri, Feb 12, 2016 at 1:53 PM, Pierre-Yves David
> <pierre-yves.david@ens-lyon.org> wrote:
>> While I entirely support detaching bookmark test from repository nesting
>> tests, I would like to make sure we still testing repository nesting
>> properly and that watchman is still failing a test somewhere for the very
>> reason you are working around here.
>>
>> Can you either find and point at such test case (in the description of a V2)
>> or introduce one (in a V2 series) ?
>
> hgwatchman currently has no tests of their own; I'm writing a series
> of tests and will make sure I'll include expected failures. That's
> very much outside the scope of *this* patch however.

As said in person, I just want to make sure we are not loosing test 
coverage by updating this test. Apparently test-nested-repo.t is also 
covering this behavior (well, hgwatchman misbehavior). So I would like 
you to update the patch description to point at this fact "double 
coverage with test-nested-repo" and send it as a V2 that I will happily 
take :)

Cheers,

Patch

diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -680,12 +680,12 @@ 
 
 pushing an existing but divergent bookmark with -B still requires -f
 
-  $ hg clone -q . r
+  $ hg clone -q . ../r
   $ hg up -q X
   $ echo 1 > f2
   $ hg ci -qAml
 
-  $ cd r
+  $ cd ../r
   $ hg up -q X
   $ echo 2 > f2
   $ hg ci -qAmr
@@ -696,7 +696,7 @@ 
   abort: push creates new remote head 54694f811df9 with bookmark 'X'!
   (pull and merge or see "hg help push" for details about pushing new heads)
   [255]
-  $ cd ..
+  $ cd ../addmarks
 
 Check summary output for incoming/outgoing bookmarks