# HG changeset patch # User Dirkjan Ochtman # Date 2010-07-13 15:30:29 # Node ID 4484a7b661f2f79f142c06c7ab1d9b58a7c3a608 # Parent 14e90cc3a296c71f600ac4d561184faf52832e0c commands: addremove does similarity 100 by default diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -83,7 +83,7 @@ def addremove(ui, repo, *pats, **opts): 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: diff --git a/tests/test-diff-upgrade b/tests/test-diff-upgrade --- a/tests/test-diff-upgrade +++ b/tests/test-diff-upgrade @@ -35,7 +35,7 @@ chmod -x unsetexec 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 diff --git a/tests/test-issue660 b/tests/test-issue660 --- a/tests/test-issue660 +++ b/tests/test-issue660 @@ -56,7 +56,7 @@ mkdir a echo a > a/a echo b > b -hg addremove +hg addremove -s 0 hg st echo % commit diff --git a/tests/test-rename b/tests/test-rename --- a/tests/test-rename +++ b/tests/test-rename @@ -26,7 +26,7 @@ rm d2/c 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