The -B option to "hg strip" deletes the bookmark before checking if it can actually strip anything. This makes it easy to lose a bookmark in a situation where a strip will abort due to e.g. a dirty working directory. If that occurs, it becomes way harder to kill off an unwanted head and its ancestors, because there's no longer a bookmark referring to them: hg init wat cd wat echo a>a hg ci -Ama echo a>>a hg ci -Amb hg bookmark wat echo b>>a # this will delete the bookmark, but the strip will not proceed hg strip -B wat
Fix ready and queued.
Fixed by http://selenic.com/repo/hg/rev/f6f122f4813b David Soria Parra <davidsp@fb.com> strip: remove bookmarks after strip succeed (issue4295) In case we have revs to strip, delete the bookmark after the strip succeeds, not beforehand as we might still abort due to dirty working directory, etc. (please test the fix)