Show More
@@ -49,10 +49,13 b' def _formatrevs(repo, revs, maxrevs=4):' | |||
|
49 | 49 | return summary |
|
50 | 50 | |
|
51 | 51 | |
|
52 | def precheck(repo, revs, action=b'rewrite'): | |
|
52 | def precheck(repo, revs, action=b'rewrite', check_divergence=True): | |
|
53 | 53 | """check if revs can be rewritten |
|
54 | 54 | action is used to control the error message. |
|
55 | 55 | |
|
56 | check_divergence allows skipping the divergence checks in cases like adding | |
|
57 | a prune marker (A, ()) to obsstore (which can't be diverging). | |
|
58 | ||
|
56 | 59 | Make sure this function is called after taking the lock. |
|
57 | 60 | """ |
|
58 | 61 | if nullrev in revs: |
@@ -85,6 +88,9 b" def precheck(repo, revs, action=b'rewrit" | |||
|
85 | 88 | hint=hint, |
|
86 | 89 | ) |
|
87 | 90 | |
|
91 | if not check_divergence: | |
|
92 | return | |
|
93 | ||
|
88 | 94 | if not obsolete.isenabled(repo, obsolete.allowdivergenceopt): |
|
89 | 95 | new_divergence = _find_new_divergence(repo, revs) |
|
90 | 96 | if new_divergence: |
General Comments 0
You need to be logged in to leave comments.
Login now