Show More
@@ -10,7 +10,8 b' This extension checks at commit/amend ti' | |||||
10 | comes from an unrecorded mv. |
|
10 | comes from an unrecorded mv. | |
11 |
|
11 | |||
12 | The threshold at which a file is considered a move can be set with the |
|
12 | The threshold at which a file is considered a move can be set with the | |
13 | ``automv.similarity`` config option; the default value is 1.00. |
|
13 | ``automv.similarity`` config option. This option takes a percentage between 0 | |
|
14 | (disabled) and 100 (files must be identical), the default is 100. | |||
14 |
|
15 | |||
15 | """ |
|
16 | """ | |
16 | from __future__ import absolute_import |
|
17 | from __future__ import absolute_import | |
@@ -36,11 +37,12 b' def mvcheck(orig, ui, repo, *pats, **opt' | |||||
36 | renames = None |
|
37 | renames = None | |
37 | disabled = opts.pop('no_automv', False) |
|
38 | disabled = opts.pop('no_automv', False) | |
38 | if not disabled: |
|
39 | if not disabled: | |
39 |
threshold = float(ui.config('automv', 'similarity', '1 |
|
40 | threshold = float(ui.config('automv', 'similarity', '100')) | |
40 | if threshold > 0: |
|
41 | if threshold > 0: | |
41 | match = scmutil.match(repo[None], pats, opts) |
|
42 | match = scmutil.match(repo[None], pats, opts) | |
42 | added, removed = _interestingfiles(repo, match) |
|
43 | added, removed = _interestingfiles(repo, match) | |
43 |
renames = _findrenames(repo, match, added, removed, |
|
44 | renames = _findrenames(repo, match, added, removed, | |
|
45 | threshold / 100.0) | |||
44 |
|
46 | |||
45 | with repo.wlock(): |
|
47 | with repo.wlock(): | |
46 | if renames is not None: |
|
48 | if renames is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now