On Tue, Nov 25, 2008 at 9:11 AM, Kai Antweiler <[EMAIL PROTECTED]> wrote: > I tried "hg strip" last weekend. I ran into a problem and didn't have > the time to fix it. > > My plan was: > 1. using "hg export" with the last clean revision and the most recent > revision in that branch. > 2. using "hg strip" on the first dirty revision. > 3. using "hg import" to get the revision back. > > As you might remember, "hg export" does not store the individual > revisions unless you tell it too. I just stores the overall change > between the two revisions. > So the scheme above should do what we want. > > But I ran in to a problem with the strip command. > It worked well when I stripped the revisions after the dirty one. But > when I used "hg strip" on the dirty revision, it created two new > revisions somewhere. (At least that is what mercurial told me.) > > I don't know if this caused my plan to fail. Maybe I used import wrong > afterwards. I haven't used it for a long time. > > Somebody else could try. > In terms of logic, it should work.
The logic seems correct, but I don't know what went wrong since I avoided ever using export/import thanks to the MQ extension's flexibility. I've tried to first create MQ patches which could be later manipulated with 'hg qimport --git -r 3881:tip'. However, that failed with "abort: revision 3890 has unmanaged children". It looks like the repo has multiple heads, which makes things more complicated. > How to prevent people from repushing? > I don't know. Just hope that they don't do it. This could be done with a precommit hook, in theory. (http://hgbook.red-bean.com/hgbookch10.html) Here is more info about editing Mercurial histories: http://www.selenic.com/mercurial/wiki/index.cgi/EditingHistory May I suggest that someone gets IRC support for this problem from #mercurial on irc.freenode.net. I wish you the best. -- Michael Ploujnikov http://plouj.com/ _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
