[Python-Dev] Committing a bug fix
Martin Panter
vadmium+py at gmail.com
Mon Sep 28 08:56:43 CEST 2015
On 28/09/2015, Terry Reedy <tjreedy at udel.edu> wrote:
> You neglected to forward merge a 3.4-3.4 merge and a 3.5-3.5 merge. I
> failed to notice the first and added a commit, and then backed it out,
> when I could not merge forward due to merge conflicts with your commits.
> Perhaps you just need to null-merge the 3.4 commits into 3.5, but I do
> not really know how to make the repository usable again.
Hopefully I have fixed this for you. My technique is below. I first
tried with Mercurial 2.7, but updated to 3.5 which apparently grew
some support for “criss-cross” merges, and this helped a lot with the
second merge.
hg update 3.5
hg merge 3.4 # NEWS and Argument Clinic files conflict
hg revert -r . Misc/NEWS Modules/clinic/_datetimemodule.c.h
python Tools/clinic/clinic.py --make
# Verify both Alexander and Serhiy’s entries already in NEWS
hg diff -p # No file changes to 3.5 branch
hg resolve -m
hg commit -m "Merge from 3.4 into 3.5; no file changes"
hg update default
hg merge 3.5 # No conflicts; 3 × “ambiguous merge - picked m action”
hg diff -p # Duplicate NEWS entry
hg revert -r . Misc/NEWS
hg diff -p # No changes
hg commit -m "Merge from 3.5; no file changes"
Summary of what I think was going on: Serhiy made some changes quite a
few hours ago to do with readline.set_completer_delims(). Meanwhile,
Alexander made some tzinfo.fromutc() commits based on revisions before
Serhiy’s changes. A couple comments on Alexander’s commits:
ff68705c56a8: Initial 3.4 patch has a trailing space in NEWS
c706c062f545: Initial merge into 3.5 removes this trailing space
cbcf82f92c25: Looks like a second version of the original patch
(ff68705c56a8), except without the extra space. I guess you got
confused, but it would have been better to not push this commit :)
Also @Terry, not sure on your workflow, but you might have been able
to avoid pushing your 3.4 commits. You might have been able to remove
it locally by using “hg strip” or deleting your local repository. Or
just leave it locally until the other branches got sorted out. Notice
that the 3.4 branch still has your backout commit at the top.
For what it’s worth, I have more faith in Git for merging stuff like
this smoothly. But today I learnt that the newer Mercurial version
does behave a bit better than it used to.
More information about the Python-Dev
mailing list