[PATCH 2 of 2] qrecord: provide help when mq is not enabled
timeless
timeless at gmail.com
Thu Apr 14 03:02:26 CDT 2011
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1302768015 -7200
# Node ID 07f6a40860921989563fb9ef22ce2cef4818255c
# Parent 58e481eadc0e99941c1f741f756ccf35b55af921
qrecord: provide help when mq is not enabled
diff --git a/hgext/record.py b/hgext/record.py
--- a/hgext/record.py
+++ b/hgext/record.py
@@ -535,6 +535,9 @@ cmdtable = {
"record":
(record, commands.table['^commit|ci'][1], # same options as commit
_('hg record [OPTION]... [FILE]...')),
+ "qrecord":
+ (qrecord, {}, # placeholder until mq is available
+ _('hg qrecord [OPTION]... PATCH [FILE]...')),
}
diff --git a/tests/test-qrecord.t b/tests/test-qrecord.t
--- a/tests/test-qrecord.t
+++ b/tests/test-qrecord.t
@@ -10,6 +10,15 @@ help record (no record)
use "hg help extensions" for information on enabling extensions
+help qrecord (no record)
+
+ $ hg help qrecord
+ 'qrecord' is provided by the following extension:
+
+ record commands to interactively select changes for commit/qrefresh
+
+ use "hg help extensions" for information on enabling extensions
+
$ echo "[extensions]" >> $HGRCPATH
$ echo "record=" >> $HGRCPATH
@@ -63,30 +72,33 @@ help record (record)
help (no mq, so no qrecord)
$ hg help qrecord
- hg: unknown command 'qrecord'
- Mercurial Distributed SCM
+ hg qrecord [OPTION]... PATCH [FILE]...
- basic commands:
+ interactively record a new patch
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ See "hg help qnew" & "hg help record" for more information and usage.
- use "hg help" for the full list of commands or "hg -v" for details
+ use "hg -v help qrecord" to show global options
+
+ $ hg init a
+
+qrecord (mq not present)
+
+ $ hg -R a qrecord
+ hg qrecord: invalid arguments
+ hg qrecord [OPTION]... PATCH [FILE]...
+
+ interactively record a new patch
+
+ See "hg help qnew" & "hg help record" for more information and usage.
+
+ use "hg -v help qrecord" to show global options
+ [255]
+
+qrecord patch (mq not present)
+
+ $ hg -R a qrecord patch
+ abort: 'mq' extension not loaded
[255]
help (mq present)
@@ -116,7 +128,6 @@ help (mq present)
use "hg -v help qrecord" to show global options
- $ hg init a
$ cd a
Base commit
More information about the Mercurial-devel
mailing list