comparison mercurial/commands.py @ 17266:4e35dea77e31 stable

addremove: mention --similarity defaults to 100 (issue3430)
author Patrick Mezard <patrick@mezard.eu>
date Mon, 23 Jul 2012 19:03:32 +0200
parents ec7b9bec19c9
children 8da6fe276a23
comparison
equal deleted inserted replaced
17265:c30307eeec4b 17266:4e35dea77e31
188 188
189 New files are ignored if they match any of the patterns in 189 New files are ignored if they match any of the patterns in
190 ``.hgignore``. As with add, these changes take effect at the next 190 ``.hgignore``. As with add, these changes take effect at the next
191 commit. 191 commit.
192 192
193 Use the -s/--similarity option to detect renamed files. With a 193 Use the -s/--similarity option to detect renamed files. This
194 parameter greater than 0, this compares every removed file with
195 every added file and records those similar enough as renames. This
196 option takes a percentage between 0 (disabled) and 100 (files must 194 option takes a percentage between 0 (disabled) and 100 (files must
197 be identical) as its parameter. Detecting renamed files this way 195 be identical) as its parameter. With a parameter greater than 0,
196 this compares every removed file with every added file and records
197 those similar enough as renames. Detecting renamed files this way
198 can be expensive. After using this option, :hg:`status -C` can be 198 can be expensive. After using this option, :hg:`status -C` can be
199 used to check which files were identified as moved or renamed. 199 used to check which files were identified as moved or renamed. If
200 If this option is not specified, only renames of identical files 200 not specified, -s/--similarity defaults to 100 and only renames of
201 are detected. 201 identical files are detected.
202 202
203 Returns 0 if all files are successfully added. 203 Returns 0 if all files are successfully added.
204 """ 204 """
205 try: 205 try:
206 sim = float(opts.get('similarity') or 100) 206 sim = float(opts.get('similarity') or 100)