diff hgext/convert/convcmd.py @ 8691:a0a541d6fed6

convert: fail fast if source does not support --sourcesort
author Patrick Mezard <pmezard@gmail.com>
date Mon, 01 Jun 2009 17:12:39 +0200
parents c5b4f662109f
children 827d4e807d57
line wrap: on
line diff
--- a/hgext/convert/convcmd.py	Mon Jun 01 17:12:39 2009 +0200
+++ b/hgext/convert/convcmd.py	Mon Jun 01 17:12:39 2009 +0200
@@ -376,6 +376,8 @@
     if len(sortmode) > 1:
         raise util.Abort(_('more than one sort mode specified'))
     sortmode = sortmode and sortmode[0] or 'branchsort'
+    if sortmode == 'sourcesort' and not srcc.hasnativeorder():
+        raise util.Abort(_('--sourcesort is not supported by this data source'))
 
     fmap = opts.get('filemap')
     if fmap: