convert: document source and sink identifiers, fix error message
authorPatrick Mezard <pmezard@gmail.com>
Tue, 02 Sep 2008 22:21:19 +0200
changeset 6976 b072266a83d1
parent 6975 5e1a867e5d65
child 6978 2ca84555ba1f
convert: document source and sink identifiers, fix error message
hgext/convert/__init__.py
hgext/convert/convcmd.py
tests/test-convert.out
--- a/hgext/convert/__init__.py	Sat Aug 02 19:34:50 2008 +0400
+++ b/hgext/convert/__init__.py	Tue Sep 02 22:21:19 2008 +0200
@@ -14,18 +14,18 @@
 def convert(ui, src, dest=None, revmapfile=None, **opts):
     """Convert a foreign SCM repository to a Mercurial one.
 
-    Accepted source formats:
-    - Mercurial
-    - CVS
-    - Darcs
-    - git
-    - Subversion
-    - Monotone
-    - GNU Arch
+    Accepted source formats [identifiers]:
+    - Mercurial [hg]
+    - CVS [cvs]
+    - Darcs [darcs]
+    - git [git]
+    - Subversion [svn]
+    - Monotone [mtn]
+    - GNU Arch [gnuarch]
 
-    Accepted destination formats:
-    - Mercurial
-    - Subversion (history on branches is not preserved)
+    Accepted destination formats [identifiers]:
+    - Mercurial [hg]
+    - Subversion [svn] (history on branches is not preserved)
 
     If no revision is given, all revisions will be converted. Otherwise,
     convert will only import up to the named revision (given in a format
--- a/hgext/convert/convcmd.py	Sat Aug 02 19:34:50 2008 +0400
+++ b/hgext/convert/convcmd.py	Tue Sep 02 22:21:19 2008 +0200
@@ -53,7 +53,7 @@
     if not ui.quiet:
         for inst in exceptions:
             ui.write("%s\n" % inst)
-    raise util.Abort(_('%s: unknown repository type') % path)
+    raise util.Abort(_('%s: missing or unsupported repository') % path)
 
 def convertsink(ui, path, type):
     for name, sink in sink_converters:
--- a/tests/test-convert.out	Sat Aug 02 19:34:50 2008 +0400
+++ b/tests/test-convert.out	Tue Sep 02 22:21:19 2008 +0200
@@ -2,18 +2,18 @@
 
 Convert a foreign SCM repository to a Mercurial one.
 
-    Accepted source formats:
-    - Mercurial
-    - CVS
-    - Darcs
-    - git
-    - Subversion
-    - Monotone
-    - GNU Arch
+    Accepted source formats [identifiers]:
+    - Mercurial [hg]
+    - CVS [cvs]
+    - Darcs [darcs]
+    - git [git]
+    - Subversion [svn]
+    - Monotone [mtn]
+    - GNU Arch [gnuarch]
 
-    Accepted destination formats:
-    - Mercurial
-    - Subversion (history on branches is not preserved)
+    Accepted destination formats [identifiers]:
+    - Mercurial [hg]
+    - Subversion [svn] (history on branches is not preserved)
 
     If no revision is given, all revisions will be converted. Otherwise,
     convert will only import up to the named revision (given in a format