Trying to clean my repo... help?

Matt Mackall mpm at selenic.com
Tue Dec 20 06:13:10 UTC 2011


On Mon, 2011-12-19 at 19:06 -0500, Matt Chaput wrote:
> Dear hg gurus,
> 
> I screwed up my repo, and then accidentally pushed the bad repo to
> bitbucket. I'm trying to find the best way to clean up my mess.
> 
> I created an unnamed branch 1066 by pulling a changeset from my
> computer at work. Then I realized that 1066 should have been a named
> branch. Unfortunately I couldn't (I thought) roll things back because
> I'd already pushed to BB. So I committed a changeset (1067) to name
> the branch, and pushed it to BB so I could tell users to use that
> named branch.
> 
> Of course, I realize now that that was probably very dumb, but I was
> young and naive then ;)
> 
> So now I have two heads in "default": my "real" default branch, and
> 1066 (which isn't really a "head" because it has child changesets but
> those children are in a named branch).
> 
> I've used the "clone and import individual heads" technique to make a
> local repo where the equivalent of the "1066" branch is in a named
> branch from the beginning, but I'm worried what will happen when I
> push it to BB. I tried pulling into it from BB and the resulting
> revision graph was insane.

The fundamental thing to understand is that 'push' and 'pull' will never
_remove_ changesets, they'll only add. So nothing you can do from the hg
command line can make an already pushed commit disappear from a remote
machine. So you need to blow away all or part of your repo on Bitbucket
'manually'.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list