##// END OF EJS Templates
changectx: fix the handling of `tip`...
Pierre-Yves David -
r18464:a2e9fe93 stable
parent child Browse files
Show More
@@ -5866,7 +5866,7 b' def tip(ui, repo, **opts):'
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',
@@ -44,8 +44,8 b' class changectx(object):'
44 self._rev = nullrev
44 self._rev = nullrev
45 return
45 return
46 if changeid == 'tip':
46 if changeid == 'tip':
47 self._rev = len(repo.changelog) - 1
47 self._node = repo.changelog.tip()
48 self._node = repo.changelog.node(self._rev)
48 self._rev = repo.changelog.rev(self._node)
49 return
49 return
50 if len(changeid) == 20:
50 if len(changeid) == 20:
51 try:
51 try:
@@ -55,6 +55,17 b' Killing a single changeset without repla'
55 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
55 $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
56 $ hg debugobsolete
56 $ hg debugobsolete
57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'}
57 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'}
58
59 (test that mercurial is not confused)
60
61 $ hg up null --quiet # having 0 as parent prevents it to be hidden
62 $ hg tip
63 changeset: -1:000000000000
64 tag: tip
65 user:
66 date: Thu Jan 01 00:00:00 1970 +0000
67
68 $ hg up --hidden tip --quiet
58 $ cd ..
69 $ cd ..
59
70
60 Killing a single changeset with replacement
71 Killing a single changeset with replacement
General Comments 0
You need to be logged in to leave comments. Login now