"not deleting diverged bookmark" on every GitHub PR merge
8 views
Skip to first unread message
Sanjay Vasandani
unread,
Apr 11, 2023, 3:11:09 PM4/11/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hg-git
I wanted to post here before filing an Issue on Heptapod as this may be particular to GitHub, but I'm not certain that's the case.
I have `pull-prune-bookmarks` and `pull-prune-remote-branches` on (the default). The GitHub repo I'm interacting with is set to automatically delete remote branches on merge. It's also set to maintain linear history, squash PR commits into a single revision, and use the PR description as the final commit message. Something about this configuration means that every time I `hg pull` after a PR is merged, hg-git fails to delete my local bookmark with a "not deleting diverged bookmark" message.
Note that I'm following the recommendation from another thread to specifically indicate the default Git branch in my URL fragment, so by default only that remote branch is "tracked" in Git terms. It appears that pushing a bookmark as my own Git branch from hg-git also results in that being "tracked", as a `git-remote` tag is created. I think this tag might not actually get created until my next `hg pull`, but I've noticed this behavior even when I've pulled since my last bookmark push.
hg-git version: 1.0.2 Tangentially related to https://foss.heptapod.net/mercurial/hg-git/-/issues/382
Sanjay Vasandani
unread,
May 4, 2023, 1:26:37 PM5/4/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hg-git
I think I've figured out the issue and it's not specific to GitHub at all. When I push a bookmark to the remote repo it doesn't immediately get it's git-remote tag updated. That doesn't happen until my next pull. If I happen to pull before the branch is merged, everything works fine. If not, it gets treated as if it diverged.