Stripping hidden changesets breaks "hg outgoing"

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Feb 6 02:40:51 CST 2013


On Tue, Feb 05, 2013 at 11:09:21AM -0500, Greg Ward wrote:
> Ouch. So I could get back to work with minimal fuss, I tried editing
> .hg/store/phaseroots to remove the stripped changeset that "hg out"
> was complaining about. Then, because I'm an idiot (or something), I
> tried stripping *just one more* hidden changeset:
> 
>   $ hg strip 316
>   saved backup bundle to /home/greg/src/fubsy/.hg/strip-backup/ce0a27dd3d06-backup.hg
>   ** Unknown exception encountered with possibly-broken third-party extension evolve
>   ** which supports versions unknown of Mercurial.
>   ** Please disable evolve and try your action again.
>   ** If that fixes the bug please report it to https://bitbucket.org/marmoute/mutable-history/issues
>   ** Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2]
>   ** Mercurial Distributed SCM (version 2.5+2-151f78a07607)
>   ** Extensions loaded: mq, patchbomb, record, purge, share, extdiff, progress, color, rebase, evolve
>   Traceback (most recent call last):
>     File "/home/greg/bin/hg", line 38, in <module>
>       mercurial.dispatch.run()
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 28, in run
>       sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 65, in dispatch
>       return _runcatch(req)
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 88, in _runcatch
>       return _dispatch(req)
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 743, in _dispatch
>       cmdpats, cmdoptions)
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 514, in runcommand
>       ret = _runcommand(ui, options, cmd, d)
>     File "/home/greg/src/hg-stable/mercurial/extensions.py", line 189, in wrap
>       return wrapper(origfn, *args, **kwargs)
>     File "/home/greg/src/hg-stable/hgext/color.py", line 394, in colorcmd
>       return orig(ui_, opts, cmd, cmdfunc)
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 833, in _runcommand
>       return checkargs()
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 804, in checkargs
>       return cmdfunc()
>     File "/home/greg/src/hg-stable/mercurial/dispatch.py", line 740, in <lambda>
>       d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
>     File "/home/greg/src/hg-stable/mercurial/util.py", line 475, in check
>       return func(*args, **kwargs)
>     File "/home/greg/src/hg-stable/hgext/mq.py", line 3052, in strip
>       force=opts.get('force'))
>     File "/home/greg/src/hg-stable/hgext/mq.py", line 1123, in strip
>       repair.strip(self.ui, repo, revs, backup)
>     File "/home/greg/src/hg-stable/mercurial/repair.py", line 183, in strip
>       repo.destroyed()
>     File "/home/greg/src/hg-stable/mercurial/localrepo.py", line 58, in wrapper
>       return orig(repo.unfiltered(), *args, **kwargs)
>     File "/home/greg/src/hg-stable/mercurial/localrepo.py", line 1422, in destroyed
>       branchmap.updatecache(self.filtered('served'))
>     File "/home/greg/src/hg-stable/mercurial/branchmap.py", line 75, in updatecache
>       partial = subset.branchmap().copy()
>     File "/home/greg/src/hg-stable/mercurial/localrepo.py", line 634, in branchmap
>       branchmap.updatecache(self)
>     File "/home/greg/src/hg-stable/mercurial/branchmap.py", line 80, in updatecache
>       partial.update(repo, revs)
>     File "/home/greg/src/hg-stable/mercurial/branchmap.py", line 192, in update
>       bheadrevs[0]))
>     File "/home/greg/src/hg-stable/mercurial/ancestor.py", line 230, in __iter__
>       for parent in parentrevs(visit.popleft()):
>     File "/home/greg/src/hg-stable/mercurial/changelog.py", line 204, in parentrevs
>       raise IndexError(rev)
>   IndexError: 445

removeing your branchmap cache should work around your issue (rm -rv .hg/cache/*)

Please fill a bug (on evolve for now) I'll have a look during the sprint this week-end.

> 
> Disabling evolve avoided that problem.
> 
> Moral of the story: if you want to go hunting for bugs in Mercurial
> and/or evolve, try stripping hidden changesets. If you just want to
> get work done, don't!
> 
> I've saved a tarball of the hosed repo + working dir (open source, 80
> MB) if anyone is interested. I've recloned from my public repo to
> clean up hidden changesets the "safe" way.
> 
>        Greg
> -- 
> Greg Ward                            http://www.gerg.ca
> <greg at gerg.ca>                       @gergdotca
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list