remote bookmarks confusion and hg-git
Andrew Fischer
andrew at apastron.co
Thu May 11 13:27:45 UTC 2017
I am guessing the issue you have is this piece of bookmark behavior? (from
the hg wiki)
"When you clone a repository, all remote bookmarks are transferred. However
only bookmarks that are present on both the local and the remote
repositories are updated on push. This is done to keep your local bookmarks
local until you manually publish them. As of Mercurial 2.3, all remote
bookmarks are updated on pull. Prior to that, only bookmarks present on
both the local and remote repositories were updated on pull."
So if your remote repository did not get the bookmarks upon an initial
clone, then will not be automatically pushed to/updated in that remote
repository until you have manually pushed them there the first time.
If you do an "hg push -B bookmarkname" from your repo with the bookmark to
the remote repo without the bookmark, it will appear there. Further normal
pushes should then update the bookmarks like you expect.
There several caveats as mentioned by Sean's email, which are being worked
on. But if you don't do anything too complicated it should work well
enough; it has for us. I'm in the habit of doing "hg push -B bookmarkname"
with most of my push commands now, as we work with bookmarks a fair amount.
-Andrew
On Wed, May 10, 2017 at 4:35 PM, Bill Shannon <bill.shannon at oracle.com>
wrote:
> Sean Farley wrote on 05/10/17 02:03 PM:
> > Bill Shannon <bill.shannon at oracle.com> writes:
> >
> >> I have a Mercurial repository for which I used hg-git to push it to
> GitHub.
> >> I used git to create a gh-pages branch in the repository, which I then
> pulled
> >> back to the original Mercurial repository. This showed up in Mercurial
> as
> >> "master" and "gh-pages" bookmarks.
> >>
> >> $ hg bookmarks
> >> gh-pages 943:fbd5759835c2
> >> * master 941:d7e9b0bd13b4
> >> $ hg branches
> >> default 943:fbd5759835c2
> >>
> >> This all seems to work as expected when pushing to GitHub.
> >>
> >> If I clone the repository locally, the clone includes the bookmarks.
> >>
> >> But if I push the repository to a remote Mercurial repository, the
> remote
> >> doesn't get any of the bookmarks. Further clones of that remote
> repository
> >> are obviously missing the bookmarks.
> >>
> >> I'm using Mercurial version 3.8.3 locally and 3.7.3 and 3.4 remotely,
> >> all on Solaris.
> >>
> >> Do I need to do something special to cause bookmarks to be pushed and
> >> retained in remote Mercurial repositories?
> >
> > This is a bit of a sore spot / work in progress. You can see my work to
> > bring remote bookmarks into hg-git here:
> >
> > https://bitbucket.org/seanfarley/hg-git/commits/all
> >
> > If you're on IRC #mercurial, I and / or others could help get a workflow
> > down for you.
>
> I'm not on IRC.
>
> My problems don't seem to be related to hg-git. The reason I *have*
> bookmarks is because of hg-git and GitHub.
>
> The problem seems to be moving bookmarks from one Mercurial repository
> to another. It works when everything is local, but not when one is remote.
>
> Maybe I just don't understand how bookmarks are *supposed* to work?
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
>
--
Andrew Fischer
Apastron Co
903 1st ST N Hopkins, MN
952-373-1024
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20170511/3b31a62a/attachment-0002.html>
More information about the Mercurial
mailing list