Help text for pull's '--update' option is wrong

Mads Kiilerich mads at kiilerich.com
Thu Jul 16 04:56:08 CDT 2009


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
>>> option:
>>>
>>>   -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 test
>>> this you can update to a previous revision and run a pull with nothing
>>> 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"?
>>
>> /Mads
>
> 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
> echo '----- Before pull -u:'
> hg parents
> hg pull -u
> echo
> 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?

/Mads


More information about the Mercurial-devel mailing list