Mercurial > hg
annotate tests/failfilemerge.py @ 28183:e07daee83029
automv: use 95 as the default similarity threshold
The motivation for the change from 100 to 95 is included in a comment.
* Updated the tests to include a change to a moved file that still should be
caught as a move.
* Use ui.configint() to non-integer configuration entries more gracefully. Also
complain if a similarity outside of the acceptable range is set.
author | Martijn Pieters <mjpieters@fb.com> |
---|---|
date | Tue, 16 Feb 2016 15:58:32 +0000 |
parents | 61f4d59e9a0b |
children | 424c1632fffb |
rev | line source |
---|---|
27988
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
1 # extension to emulate interupting filemerge._filemerge |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
2 |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
3 from __future__ import absolute_import |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
4 |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
5 from mercurial import ( |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
6 filemerge, |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
7 extensions, |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
8 error, |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
9 ) |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
10 |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
11 def failfilemerge(filemergefn, |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
12 premerge, repo, mynode, orig, fcd, fco, fca, labels=None): |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
13 raise error.Abort("^C") |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
14 return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels) |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
15 |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
16 def extsetup(ui): |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
17 extensions.wrapfunction(filemerge, '_filemerge', |
61f4d59e9a0b
rebase: update working directory when aborting (issue5084)
timeless <timeless@mozdev.org>
parents:
diff
changeset
|
18 failfilemerge) |