Re: '@' bookmark

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: '@' bookmark

Rik-4
On 03/19/2018 08:58 PM, [hidden email] wrote:
Subject:
Mercurial repository '@' bookmark
From:
Mike Miller [hidden email]
Date:
03/19/2018 03:35 PM
To:
[hidden email]
List-Post:
[hidden email]
Precedence:
list
MIME-Version:
1.0
Message-ID:
[hidden email]
Content-Type:
multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3"
Message:
1

All, probably Jordi in particular,

The '@' bookmark on the default branch lags behind the actual tip of the
default branch very frequently in our repository.

For example, at the moment, '@' points to 2f6698dd7dad, but the latest
change on the default branch is ecb5688b875f, 28 changesets later.

Is there any way we can help developers who are pushing changesets on
the default branch to ensure that the '@' bookmark is advanced properly?

All of my workflows and continuous build scripts depend on the '@'
bookmark being up to date.

Separately, but relatedly, can someone tell me whether this is a
Mercurial bug or not?

    $ hg phase
    25345: public
    $ hg id
    2f6698dd7dad tip @
    $ hg pull -u -q
    $ hg id
    ecb5688b875f tip @
    $ hg log -r @ -T '{node|short}\n'
    ecb5688b875f
    $ hg book -d @
    $ hg pull -u -q
    $ hg log -r @ -T '{node|short}\n'
    2f6698dd7dad

In short, when the '@' bookmark is active and I pull and update, the '@'
bookmark is advanced, and it no longer agrees with what the server says
the '@' bookmark is. If I delete '@' and pull again, I get a different
answer. Seems wrong.

I updated the '@' bookmark to point to the tip on default.  It does occasionally happen when merging in a lot of changes that the '@' bookmark gets confused.  To restore it, I manually moved the bookmark (I was sitting on the tip of the development branch at the time) with

hg book -r . @
moving bookmark '@' forward from 2f6698dd7dad
hg update @
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
(activating bookmark @)
hg push
pushing to <a class="moz-txt-link-freetext" href="ssh://rik5@hg.sv.gnu.org/octave">ssh://rik5@.../octave
no changes made to subrepo gnulib since last push to http://hg.octave.org/gnulib
searching for changes
no changes found
updating bookmark @
hg book
 * @                         24931:ecb5688b875f
   bessel                    23282:68720b4477e4
   betainc                   23282:68720b4477e4
   expint                    23282:68720b4477e4
   gammainc                  23282:68720b4477e4
   gsocspecfun2017           23282:68720b4477e4
   specfun2017               23282:68720b4477e4

--Rik

Reply | Threaded
Open this post in threaded view
|

Re: '@' bookmark

Mike Miller-4
On Tue, Mar 20, 2018 at 08:41:56 -0700, Rik wrote:
> I updated the '@' bookmark to point to the tip on default.  It does
> occasionally happen when merging in a lot of changes that the '@' bookmark
> gets confused.

To avoid that, I would recommend that all developers always push with

    hg push -r @

and always check what they want to push with

    hg out -r @

It should be immediately obvious if the local @ bookmark is or is not
updated correctly before the push.

It would be nice to have a server-side hook that could reject pushes
that do not advance the @ bookmark.

--
mike

signature.asc (849 bytes) Download Attachment