diff 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
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jan 22 03:23:02 2013 +0100
+++ b/mercurial/commands.py	Tue Jan 22 11:39:14 2013 +0100
@@ -5866,7 +5866,7 @@
     Returns 0 on success.
     """
     displayer = cmdutil.show_changeset(ui, repo, opts)
-    displayer.show(repo[len(repo) - 1])
+    displayer.show(repo['tip'])
     displayer.close()
 
 @command('unbundle',