##// END OF EJS Templates
children extension: Don't abort when looking at the null revision....
Thomas Arendsen Hein -
r4785:be78ab21 default
parent child Browse files
Show More
@@ -7,9 +7,8 b''
7 7 # This software may be used and distributed according to the terms
8 8 # of the GNU General Public License, incorporated herein by reference.
9 9
10 from mercurial import cmdutil, util
10 from mercurial import cmdutil
11 11 from mercurial.i18n import _
12 from mercurial.node import nullid
13 12
14 13
15 14 def children(ui, repo, file_=None, **opts):
@@ -26,9 +25,6 b' def children(ui, repo, file_=None, **opt'
26 25 ctx = repo.filectx(file_, changeid=rev)
27 26 else:
28 27 ctx = repo.changectx(rev)
29 if ctx.node() == nullid:
30 raise util.Abort(_("All non-merge changesets are children of "
31 "the null revision!"))
32 28
33 29 displayer = cmdutil.show_changeset(ui, repo, opts)
34 30 for node in [cp.node() for cp in ctx.children()]:
@@ -1,6 +1,5 b''
1 1 % init
2 2 % no working directory
3 abort: All non-merge changesets are children of the null revision!
4 3 % setup
5 4 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
6 5 % hg children at revision 3 (tip)
@@ -16,7 +15,18 b' summary: 2'
16 15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 16 % hg children at revision 2 (other head)
18 17 % hg children -r null
19 abort: All non-merge changesets are children of the null revision!
18 changeset: 0:4df8521a7374
19 user: test
20 date: Thu Jan 01 00:00:00 1970 +0000
21 summary: 0
22
23 changeset: 3:e2962852269d
24 tag: tip
25 parent: -1:000000000000
26 user: test
27 date: Thu Jan 01 00:00:03 1970 +0000
28 summary: 3
29
20 30 % hg children -r 0
21 31 changeset: 1:708c093edef0
22 32 user: test
General Comments 0
You need to be logged in to leave comments. Login now