changeset 11551:4484a7b661f2

commands: addremove does similarity 100 by default
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Tue, 13 Jul 2010 17:30:29 +0200
parents 14e90cc3a296
children 724362365ea0
files mercurial/commands.py tests/test-diff-upgrade tests/test-issue660 tests/test-rename
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jul 13 22:56:01 2010 +0900
+++ b/mercurial/commands.py	Tue Jul 13 17:30:29 2010 +0200
@@ -83,7 +83,7 @@
     Returns 0 if all files are successfully added.
     """
     try:
-        sim = float(opts.get('similarity') or 0)
+        sim = float(opts.get('similarity') or 100)
     except ValueError:
         raise util.Abort(_('similarity must be a number'))
     if sim < 0 or sim > 100:
--- a/tests/test-diff-upgrade	Tue Jul 13 22:56:01 2010 +0900
+++ b/tests/test-diff-upgrade	Tue Jul 13 17:30:29 2010 +0200
@@ -35,7 +35,7 @@
 python -c "file('binary', 'wb').write('\0\0')"
 python -c "file('newbinary', 'wb').write('\0')"
 rm rmbinary
-hg addremove
+hg addremove -s 0
 
 echo '% git=no: regular diff for all files'
 hg autodiff --git=no
--- a/tests/test-issue660	Tue Jul 13 22:56:01 2010 +0900
+++ b/tests/test-issue660	Tue Jul 13 17:30:29 2010 +0200
@@ -56,7 +56,7 @@
 echo a > a/a
 echo b > b
 
-hg addremove
+hg addremove -s 0
 hg st
 
 echo % commit
--- a/tests/test-rename	Tue Jul 13 22:56:01 2010 +0900
+++ b/tests/test-rename	Tue Jul 13 17:30:29 2010 +0200
@@ -26,7 +26,7 @@
 
 echo '# rename --after a single file when src and tgt already tracked'
 mv d1/d11/a1 d2/c
-hg addrem
+hg addrem -s 0
 hg rename --after d1/d11/a1 d2/c
 hg status -C
 hg update -C