test-mq-strip.t fails on Windows MSYS - bookmarks not updated

Mads mads at kiilerich.com
Tue May 22 05:39:14 CDT 2012


On 22/05/12 10:38, Adrian Buehlmann wrote:
> using d0b9ebba41e9 from default
>
> --- c:\users\adi\hgrepos\hg-main\tests\test-mq-strip.t
> +++ c:\users\adi\hgrepos\hg-main\tests\test-mq-strip.t.err
> @@ -458,6 +458,7 @@
>     $ hg bookmarks
>        B                         9:ff43616e5d0f
>        delete                    6:2702dd0c91e7
> +   * todelete                  8:d62d843c9a01
>     $ hg strip -B delete
>     saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
>     bookmark 'delete' deleted
>
>
> This test failure first appears with:
>
>    changeset:   16718:3290e24bb3f0
>    parent:      16716:0311a6abd38a
>    user:        David Soria Parra<dsp at php.net>
>    date:        Sun May 13 16:39:40 2012 +0200
>    summary:     strip: introduce -B option to remove a bookmark

The parameter in
     repo._writebookmarks(marks)
is unused. That seems suspicious. Explicitly setting
     repo._bookmarks = marks
in mq.py before writing bookmarks do that .hg/bookmarks is updated again.

I don't know why it works on unix. Perhaps some side effect of different 
fstats and thus different cache reloading that do that the marks are 
modified in place and thus rewritten?

(((
btw: Why do we have ui.write "bookmark '%s' deleted" - that is what the 
user explicitly requested, so I would expect that Mercurial did it silently.

It also seems "interesting" that a strip of bookmark referencing a 
non-leaf revision remove the bookmark but doesn't strip anything and 
aborts. I would expect it to either fail completely (preferred) or just 
remove the bookmark and return with success (less preferred).
)))

/Mads



More information about the Mercurial-devel mailing list