Is there a way to list remote branches in Mercurial like there in Git?
git branch -r
I want to list the branches on a remote machine (e.g. Bitbucket), so using:
hg branches -R `hg showconfig paths.default` --color false
fails with abort: repository not local
Quickly switch to another branch or bookmarkIn the Status bar, click the Mercurial Branch widget to open the Branches popup. Select the branch or bookmark to which you want to switch and in the menu that opens, click Update.
A remote branch only refers to a branch in a remote repository. A remote tracking branch is the branch in your local repository that tracks the remote branch.
The mercurial API allows it:
from mercurial import ui, hg, node peer = hg.peer(ui.ui(), {}, 'http://hg.python.org/cpython') for name, rev in peer.branchmap().items(): print(name, node.short(rev[0]))
The above snippet produces:
default aaa68dce117e legacy-trunk b77918288f7d 3.2 4787b9b2f860 3.0 4cd9f5e89061 3.1 5a6fa1b8767f 2.3 364638d6434d 2.2 61b0263d6881 2.1 e849d484029f 2.0 5fd74354d73b 2.7 260f3ad7af4b 2.6 f130ce67387d 2.5 b48e1b48e670 2.4 ceec209b26d4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With