strip functionality for repositories

Issue #186 resolved
Jesper Noehr
created an issue

From the admin interface.

Comments (12)

  1. Eirik Stavem

    Comment on this issue from Ches Martin on bitbucket-users:

    Seems like it'd potentially lead to more frustration and confusion than good on a site/service that is largely about sharing repos, don't you think? backout would almost always be the prudent choice. Granted, strip might be handy if you just pushed a string of revisions, but if the goofs are more than rare, it's probably time to correct the blind pusher's habits instead of bitbucket ;-)

  2. Martin Geisler

    I would like to see strip functionality -- it would make it easy for me to use bitbucket as a scratch pad for outgoing patches.

    My idea is to work on the patches locally with MQ, but then push them to a regular repository when things look good. When I revise the patches, I'll go strip the top of the published repository and re-push the changesets.

  3. Jesper Noehr reporter

    We need:

    • strip (arbitrary rev as input)
    • must detect if rev is a head, and if so, warn that stripping heads is not a solution
    • backout (arbitrary rev), should keep backup bundle
    • rollback (no input rev), rolls back the last revision

    For all these, you must enter your password to complete the operation, as they are destructive (except for backout.)

  4. Peer Sommerlund

    I vote for the possibility of stripping selected revisions. I have deleted and re-created a repository a couple of times to remove changes that were pushed by accident.

    Also, for forks with a few changesets that will be pulled upstream it sometimes takes a few iterations to get it right. This leads to several heads, and it would be cleaner to be able to strip the first attempts.

  5. Jesper Noehr reporter

    Discussed this with alu on irc.

    So, what's needed for strip to happen:

    1. Must notify all followers/fork admins that there has been a strip
    2. Implement a simple notification system that warns users on pull that a strip has occured, like
    "remote: WARNING: alu stripped revision cad80dca2, 17 hours ago"
    "remote: to sync with remote, run 'hg strip cad80dca2'."

    This notification system can also be used for other things in the future. Should be a hook as it should affect both SSH and HTTP.

  6. Log in to comment