What is a "tip"?

Jordi Gutiérrez Hermoso jordigh at octave.org
Tue Dec 6 13:53:43 CST 2011


2011/12/6 Matt Mackall <mpm at selenic.com>:
> On Tue, 2011-12-06 at 11:01 -0600, Kevin Bullock wrote:
>> On Dec 5, 2011, at 7:57 PM, Jordi Gutiérrez Hermoso wrote:
>>
>> > I think this is a documentation bug. Consider,
>> >
>> >    jordi at Iris:~$ hg help tip
>> >    [...]
>> >        The tip revision (usually just called the tip) is the
>> >        changeset most recently added to the repository (and therefore
>> >        the most recently changed head).
>> >
>> > as opposed to
>> >
>> >    jordi at Iris:~$ hg help update
>> >    [...]
>> >        Update the repository's working directory to the specified
>> >        changeset. If no changeset is specified, update to the tip of
>> >        the current named branch.
>>
>> I think our recent usage of terminology would have this as "head of
>> the current named branch". Talking about a "branch tip" is something I
>> try not to do because it's confusing.
>
> A branch can have many heads, but when you say 'hg update foo', the
> revision chosen is the most recently added, highest numbered head of
> that branch. In other words, it's exactly analogous to our normal
> usage of tip, except restricted to the branch.

Would it make sense to patch the tip command to at least accept an
option to give you the tip of the current branch and do the global tip
by default?

- Jordi G. H.


More information about the Mercurial-devel mailing list