Why doesn't SourceTree update my mercurial bookmarks on a pull?

Jean-Francois A. Kamath April 3, 2015

When I pull from remote, the bookmarks don't seem to update consistently.  The only way to guarantee retrieval of a remote bookmark is via a terminal 'hg pull'.  SourceTree displays the bookmarks just fine after that.

 

Is there a workaround for this?

8 answers

0 votes
Mike Mariano October 5, 2015

I am also not seeing bookmarks with the latest SourceTree and Mercurial. But if I open the console and do "hg pull" I then see the bookmarks. During the console pull it also indicated bookmarks were added. So something about the SourceTree pull excludes getting this information.

0 votes
Jean-Francois A. Kamath April 6, 2015

Understood, but it's a basic pull, no options. The command is literally just 'hg pull default' which is about as simple as it gets. That command translates to 'Pull from the remote server address referred to by the alias default.' The command 'hg pull' is actually shorthand for 'hg pull default'.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 6, 2015

Sorry my Mercurial knowledge is so small. Have you checked the command that SourceTree is using? I know with git, the SourceTree-generated commands usually specify a few options beyond just a basic "fetch" command. If you can identify a specific option that is causing the pull to not work as expected, you'll have a really solid bug report.

0 votes
Jean-Francois A. Kamath April 6, 2015

The equivalent of a pull in Hg is 'fetch' in Git. It grabs all new changesets from the remote but does not attempt to update to them. To clarify to issue I'm having, in a shared Git repo, imagine that I have two branches of interest 'mine' and 'develop'. The 'mine' branch is experimental and tracked locally. The 'develop' branch is shared amongst all developers in the group. It represents a stable intermediate merge point during a development cycle, similar to 'master' or 'trunk' so that anyone can be sure they are based off of a stable, common location. Let's say the 'Joe' has completed his work, tested it and then merged with the stable 'develop' branch. This should now be the new common point for everyone. Once he has pushed that branch to the remote, I should be able to do a Git 'fetch' to see the new changesets and where the new 'develop' branch head is located. For Mercurial, when I do a 'pull' (i.e. like Git 'fetch'), the new changesets come in fine, but the 'develop' marker stays back in history on an earlier changeset despite the fact that it has been properly updated on the remote. Going through terminal and directly invoking 'hg pull default', the same as SourceTree, the 'develop' marker rolls forward no problem. Once in a long while SourceTree will actually get the marker right, but it's not reliable.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 6, 2015

Or, on reading your question again, you might be trying to just update one the one branch you have checked out, and even that isn't working right. When you hit the Pull button, the progress dialog should have a "show full output" button that prints the EXACT command SourceTree is using. You might try running that command in the terminal to see if you get the same result, and then compare the options SourceTree is using that you're omitting in a simple "hg pull".

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 6, 2015

It's fascinating how differently Mercurial is used compared to Git (I only have Git experience). When you do "hg pull", does it update all of your bookmarks/branches, or just the one that is "checked out" (probably wrong term for hg) to your working copy? I know git pull only updates the checked out branch, and SourceTree may behave the same for both systems, even if the mercurial default is to pull all branches.

0 votes
Jean-Francois A. Kamath April 3, 2015

I'm not referring to the 'bookmarks' that SourceTree has to local clones of the repositories. Bookmarks in Mercurial are analogous to branches in Git: http://mercurial.selenic.com/wiki/Bookmarks They basically provide a tracking name for a development branch that moves along with changeset additions. Bookmarks can be pushed to the remote server so that other developers can see where a specific point of interest lies in the revision history. The problem I'm having is when I do a 'Pull' operation for a repository, the bookmarks for that specific repository are not updated. Doing a pull from the terminal using 'hg pull' does actually update the local bookmark to match the remote. Other visualizer options, such as MacHg, also interact correctly with the remotes. It seems like SourceTree is still lacking support for certain core features of Mercurial. For example, the workflow appears to work with tags and 'named branches' as opposed to using bookmarks. Many Hg users, myself included, completely avoid using named branches due to the repository overhead incurred. We also tend to sparingly use tags as these are meant as semi-permanent indicators of work progress.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2015

Could you be more specific about what is going wrong? Unless mercurial uses some overlapping terminology here, I understand bookmarks to refer to the repository list. It sounds like you expect pressing the Pull button to execute that operation on all of the repositories you have bookmarked, which isn't how it should work, but I could be misinterpreting your question.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events