[PATCH] rebase: allow pull --rebase --update
pmezard at gmail.com
Sun Jan 18 08:08:22 CST 2009
Georg Brandl a écrit :
> Patrick Mézard schrieb:
>> Stefano Tortarolo a écrit :
>>> # HG changeset patch # User Stefano Tortarolo <stefano.tortarolo at gmail.com>
>>> # Date 1232190634 -3600 # Node ID 7ad65f570cd8faf43e2951ef8bbd66c95e847f9c
>>> # Parent f7256cd9beffe9efd85957368781a88171ed9977 rebase: allow pull
>>> --rebase --update
>> I never used pull --rebase, but I agree with the OP about --rebase should
>> update if there is nothing to rebase. It feels right to extend "rebase" to
>> "rebase if there is something to rebase, update otherwise", in this kind of
>> workflow. Besides, I have cannot figure when you would want not to update if
>> there is nothing to rebase but asked for --rebase nevertheless.
>> What do people think ?
> For someone like me, who has "-u" in the defaults.pull config, this patch
> (or better, the first hunk) is very valuable, because I can rebase without
> using --config or temporarily editing .hgrc.
I am not against this patch at all, I just feel it should be extended. The patch version says:
"hg pull --rebase == hg pull --rebase --update, except when there is nothing to rebase, the former does not update"
I would like:
"hg pull --rebase == hg pull --rebase --update"
The condition, while making sense as API level, looks like a subtle trap.
More information about the Mercurial-devel