[IPython-dev] how to contribute to ipython
Thu Jul 16 16:09:46 CDT 2009
I think the answer is simple. Simply set your email using whoami like the
bzr 5 minute guide says:
and then keep committing. In bzr (at least in how I use it) a commit is
used in the same sense that it is in a database transaction. Namely, once
you commit, there is no going back.
Once you accept that this is what "commit" means, your hypothetical of "what
if I had to change 20 commits" doesn't make sense. Again, the bottom line
is that the conceptual model of bzr is different from git (at least in this
On Thu, Jul 16, 2009 at 1:56 PM, Ondrej Certik <email@example.com> wrote:
> On Thu, Jul 16, 2009 at 2:30 PM, Ondrej Certik<firstname.lastname@example.org> wrote:
> > On Thu, Jul 16, 2009 at 2:27 PM, Ondrej Certik<email@example.com> wrote:
> >> On Thu, Jul 16, 2009 at 12:33 PM, Ondrej Certik<firstname.lastname@example.org>
> >>> On Thu, Jul 16, 2009 at 12:06 PM, Ville M. Vainio<email@example.com>
> >>>> On Thu, Jul 16, 2009 at 8:39 PM, Ondrej Certik<firstname.lastname@example.org>
> >>>>> Ok, so I will keep committing. But here is a real problem. I
> >>>>> with an email address ondrej@crow by a mistake and I would like to
> >>>>> my real address, before you merge it in. In other words, I need to
> >>>>> last two commits. How can I do that?
> >>>> If you don't mind some low-tech legwork, you can do a new branch and
> >>>> get your changes there by bzr diff + standard 'patch' app.
> >>> Well, what are my options?
> >>> 1) have ondrej@crow in the ipython history
> >>> 2) use the old good patch app.
> >>> Well, I do want to fix my email address. Imagine I noticed after
> >>> committing ~20 patches. I would not be happy to rework everything
> >>> using "patch". For comparison, with git, I would do:
> >>> git rebase -i HEAD~20 # assuming I have 20 patches to fix
> >>> # vim fires up, I change "e" next to each patch I want to edit and then
> >>> git --amend --author="Ondrej Certik <my correct email address>"
> >>> git rebase --continue
> >>> # repeat the last two commands 20 times
> >>> and I am done. Let me search the internet, there must be some better
> >>> way than to do a new branch and rework everything from scratch.
> >> Ok, so there is a better way.
> >> First I did "bzr whoami <correct name+email>" and this fixes the email
> >> in the last commit:
> >> bzr uncommit
> >> bzr commit -m "set_trace() moved from __init__.py to ipapi.py"
> >> Yes, I have to recommit the log (git allow you to reuse the log of the
> >> old, deleted, commit), but it's already a big step forward.
> >> However, now I have this problem:
> >> $ bzr push
> >> Using saved push location:
> >> bzr+ssh://bazaar.launchpad.net/~ipython-dev/ipython/set_trace/<http://bazaar.launchpad.net/%7Eipython-dev/ipython/set_trace/>
> >> bzr: ERROR: These branches have diverged. Try using "merge" and then
> >> I just changed my email. Git has "git push -f", which rewrites the
> >> remote branch. Ok, let me dig some more into this.
> > Very cool, now this works!
> > $ bzr push --overwrite
> > Using saved push location:
> > bzr+ssh://bazaar.launchpad.net/~ipython-dev/ipython/set_trace/<http://bazaar.launchpad.net/%7Eipython-dev/ipython/set_trace/>
> > Pushed up to revision 1176.
> > So now the only problem is to figure out how to fix the 2nd commit from
> Ok, so I created a new branch set_trace2 and then just merged one
> commit from set_trace. When I did "bzr merge -r 1175 ../set_trace", it
> merged it, but "bzr diff" still shows the diff. So I committed it and
> now "bzr log" shows two commits, the old one and my new one. So I am
> confused, I thought that a merge would just take the commit and put it
> on top of my set_trace2 branch. I think I should have used "bzr pull".
> So I created set_trace3 and used "bzr pull", now it works.
> I applied my trick above with changing the email (havig to copy the
> log message by hand sucks, but it works). Unfortunately, I am not able
> to pull the next commit anymore:
> $ bzr pull -r 1176 ../set_trace
> bzr: ERROR: These branches have diverged. Use the merge command to
> reconcile them.
> So that's a real problem now. If I use merge, it will merge it but it
> will be a mess. So let's use patch, that works nice (except that I
> have to commit the log by hand once again).
> Ok, so here is my reworked branch:
> So this worked fine. But if I had 20 patches to fix, I am afraid there
> is no way to do it. Working with 20 patches by hand and "patch", and
> copy & pasting 20 log messages, well, that would be a pain.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev