Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 18464:a2e9fe93d9ea stable
changectx: fix the handling of `tip`
We can not use `len(repo,changelog)`, it may be a filtered revision. We now use
`repo,changelog.tip()` to fetch this information.
The `tip` command is also fixed and tested
Thanks goes to Idan Kamara for the initial report.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Tue, 22 Jan 2013 11:39:14 +0100 |
parents | 9354a8c1bded |
children | 2096e025a728 |
comparison
equal
deleted
inserted
replaced
18463:07771e233cf1 | 18464:a2e9fe93d9ea |
---|---|
5864 and cannot be renamed or assigned to a different changeset. | 5864 and cannot be renamed or assigned to a different changeset. |
5865 | 5865 |
5866 Returns 0 on success. | 5866 Returns 0 on success. |
5867 """ | 5867 """ |
5868 displayer = cmdutil.show_changeset(ui, repo, opts) | 5868 displayer = cmdutil.show_changeset(ui, repo, opts) |
5869 displayer.show(repo[len(repo) - 1]) | 5869 displayer.show(repo['tip']) |
5870 displayer.close() | 5870 displayer.close() |
5871 | 5871 |
5872 @command('unbundle', | 5872 @command('unbundle', |
5873 [('u', 'update', None, | 5873 [('u', 'update', None, |
5874 _('update to new branch head if changesets were unbundled'))], | 5874 _('update to new branch head if changesets were unbundled'))], |