Help text for pull's '--update' option is wrong
steve at stevelosh.com
Thu Jul 16 06:35:05 CDT 2009
On Jul 16, 2009, at 5:56 AM, Mads Kiilerich wrote:
> On 07/16/2009 10:36 AM, Steve Losh wrote:
>> On Jul 16, 2009, at 4:14 AM, Mads Kiilerich wrote:
>>> On 07/16/2009 09:26 AM, Steve Losh wrote:
>>>> Running `hg help pull` prints the following help about the update
>>>> -u --update update to new tip if changesets were pulled
>>>> This doesn't match the actual behavior. Running `hg pull -u` will
>>>> always attempt to update, even if no changesets were pulled. To
>>>> this you can update to a previous revision and run a pull with
>>>> new in the destination repo -- your working directory will still be
>>>> updated to tip (or fail if it crosses branches, etc).
>>> I can't reproduce the behavior you describe. And everybody else
>>> complains that it works exactly as documented. MPM mentioned on
>>> IRC 12 hours ago that he considered adding an option for doing
>>> what you describe.
>>> Can you show a script to reproduce the behaviour? Or at least the
>>> exact console output? "hg --version"?
>> Sure, here's a sample of the console output:
>> $ hg pull -u
>> pulling from /Users/sjl/Desktop/test
>> searching for changes
>> no changes found
>> 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>> Here's a script to reproduce it:
>> #!/usr/bin/env bash
>> hg init test
>> cd test
>> touch a
>> hg com -Am 'initial'
>> cd ..
>> hg clone test newtest
>> cd newtest
>> echo foo > a
>> hg com -Am 'foo'
>> hg update 0
>> echo '----- Before pull -u:'
>> hg parents
>> hg pull -u
>> echo '----- After pull -u:'
>> hg parents
> [mk at localhost newtest]$ hg pull -u
> pulling from /tmp/test
> searching for changes
> no changes found
> Strange. There must be something special in your setup which causes
> this. Do you have any extensions enabled? hg debugconfig? Can you
> try with another and clean Mercurial installation on another machine?
You're right, when I remove the hg-git extension it goes back to the
documented behavior. It only seems to be caused by abderrahim's fork
though -- schacon's doesn't do it. I'll file a bug.
More information about the Mercurial-devel