Show More
@@ -94,10 +94,7 b' class convert_git(converter_source):' | |||
|
94 | 94 | if not os.path.exists(path + "/objects"): |
|
95 | 95 | raise NoRepo(_("%s does not look like a Git repository") % path) |
|
96 | 96 | |
|
97 | try: | |
|
98 | similarity = int(ui.config('convert', 'git.similarity') or 0) | |
|
99 | except ValueError: | |
|
100 | raise util.Abort('convert.git.similarity must be a number') | |
|
97 | similarity = ui.configint('convert', 'git.similarity', default=0) | |
|
101 | 98 | if similarity < 0 or similarity > 100: |
|
102 | 99 | raise util.Abort(_('similarity must be between 0 and 100')) |
|
103 | 100 | if similarity > 0: |
@@ -256,7 +256,7 b' since bar is not touched in this commit,' | |||
|
256 | 256 | |
|
257 | 257 | input validation |
|
258 | 258 | $ hg convert --config convert.git.similarity=foo --datesort git-repo2 fullrepo |
|
259 |
abort: convert.git.similarity |
|
|
259 | abort: convert.git.similarity is not an integer ('foo') | |
|
260 | 260 | [255] |
|
261 | 261 | $ hg convert --config convert.git.similarity=-1 --datesort git-repo2 fullrepo |
|
262 | 262 | abort: similarity must be between 0 and 100 |
General Comments 0
You need to be logged in to leave comments.
Login now