Mercurial > hg
view README @ 28117:41a0fb2b4bbc
rebase: 'hg pull --rebase' now update only if there was nothing to rebase
I recently discovered that 'hg pull --rebase' was also running an update. And it
was running it in all cases as long as the update would move the working copy
somewhere else...
This felt wrong and it actually is. This 'update' call is introduced in
92455c1d6f83. In that commit the intent is very clear. The update should happen
only when there was nothing to rebase. The implementation did not check if a
rebase was performed because, at that time, rebase would always leave you on the
top most changeset. Being on that top most changeset result in a no-op update
and the step was skipped.
However 9c78ed396075f changed rebase behavior to preserve the working copy
parent, so if we are not on a head at pull time, the code performs both a rebase
and an update.
This changeset introduce a test for this case and restore the intended behavior.
There are other issues with this custom update code but they will be addressed
in later changeset (eg: own destination logic, lack of heads warning).
I'm not super happy with the explicitly comparison 'rebase(...) == 1' but a
later series will have a cleaner way to handle it anyway (while making 'rebase'
pick its default destination like 'merge').
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 13 Feb 2016 16:59:32 +0000 |
parents | 4b0fc75f9403 |
children | 76b171209151 |
line wrap: on
line source
Mercurial ========= Mercurial is a fast, easy to use, distributed revision control tool for software developers. Basic install: $ make # see install targets $ make install # do a system-wide install $ hg debuginstall # sanity-check setup $ hg # see help Running without installing: $ make local # build for inplace usage $ ./hg --version # should show the latest version See https://mercurial-scm.org/ for detailed installation instructions, platform-specific notes, and Mercurial user information.