[PATCH 5 of 8 STABLE] debugrevlog: fix commandline argument handling
timeless
timeless at mozdev.org
Mon Feb 1 01:29:16 CST 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1454273522 0
# Sun Jan 31 20:52:02 2016 +0000
# Branch stable
# Node ID c73d43cffa2887c9f0d3e6f3572f833626a92d68
# Parent cf775b5fa387784ad4468a9bb1fb60a554a7977e
debugrevlog: fix commandline argument handling
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -507,8 +507,8 @@
filelog = repo.file(file_)
if len(filelog):
r = filelog
- if not r:
- if not file_:
+ if r is None:
+ if not any([cl, mf, file_]):
raise error.CommandError(cmd, _('invalid arguments'))
if not os.path.isfile(file_):
raise error.Abort(_("revlog '%s' not found") % file_)
diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -20,7 +20,13 @@
(use "hg debugrevlog -h" to show more help)
[255]
+ $ hg debugrevlog -c -d
+ # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
+ $ hg debugrevlog -m -d
+ # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
$ hg commit --config ui.allowemptycommit=True -m 'empty'
+ $ hg debugrevlog -m -d
+ # rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
$ hg debugrevlog -c -d
# rev p1rev p2rev start end deltastart base p1 p2 rawsize totalsize compression heads chainlen
0 -1 -1 0 28 0 0 0 0 56 56 2 1 0
More information about the Mercurial-devel
mailing list