Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I delete a remote bookmark in Mercurial?

Tags:

mercurial

I can delete remote branches in Git using git push. (See How do I delete a remote branch in Git?). But I can't do the equivalent using Mercurial bookmarks.

I've tried hg bookmark -d something, but when I push to a Git repository using hg-git, it does not delete the bookmark on the remote repository.

When I try hg bookmark -d origin/something, it complains that it doesn't exist.

like image 651
Lambda Fairy Avatar asked Jul 26 '11 04:07

Lambda Fairy


2 Answers

To delete a bookmark from a remote server, you must have permission to push to the server. If you can push to it, then you can:

hg bookmark --delete <bookmark name>
hg push --bookmark <bookmark name>

See the "Working With Remote Repositories" section of the Mercurial BookmarksExtension wiki for further info.

NOTE: This only removes the bookmark itself. It does not remove any changesets that were associated with the bookmark. If you need to remove the changesets themselves, then you must consider other methods as noted in these related questions.

like image 53
Tim Henigan Avatar answered Oct 07 '22 16:10

Tim Henigan


With hg-git it is not possible at the moment.

You have to install the git client, clone the repo and issue a

git push origin :oldbranch

to delete the old branch. Hopefully there will be a patch one day.

like image 24
hyperknot Avatar answered Oct 07 '22 18:10

hyperknot