[Python-Dev] Hg question
Victor Stinner
victor.stinner at haypocalc.com
Tue Apr 12 23:08:13 CEST 2011
Le mardi 12 avril 2011 à 14:35 -0400, Alexander Belopolsky a écrit :
> I was preparing a commit to 3.2 and default branches and mistakenly
> used -m insread of -l commit option. As a result, I have
>
> $ hg out
> comparing with ssh://hg@hg.python.org/cpython
> searching for changes
> changeset: 69272:0bf1354fab6b
> branch: 3.2
> parent: 69268:bfc586c558ed
> user: Alexander Belopolsky <alexander.belopolsky at gmail.com>
> date: Tue Apr 12 14:00:43 2011 -0400
> summary: m.txt
>
> changeset: 69273:516ed700ce22
> tag: tip
> parent: 69270:c26d015cbde8
> parent: 69272:0bf1354fab6b
> user: Alexander Belopolsky <alexander.belopolsky at gmail.com>
> date: Tue Apr 12 14:02:22 2011 -0400
> summary: m.txt
>
>
> I would like to replace m.txt in the summary with the content of the
> file m.txt.
I don't know if it is the "right" solution, but I would use hg strip
+histedit. Something like:
$ hg strip 516ed700ce22 # remove commit in the default branch
$ hg update 3.2
$ hg histedit 0bf1354fab6b
<don't touch code>
$ hg ci -l m.txt
$ hg update default
$ hg merge 3.2
WARNING: it is easy to loose work using strip and histedit, so first
make sure that you have a copy of your commits. Use hg log -p, hg
export, clone the whole repository, etc.
Victor
More information about the Python-Dev
mailing list