##// END OF EJS Templates
precheck: fix false warning about content-divergence creation...
Sushil khanchi -
r49848:d4752aeb stable
parent child Browse files
Show More
@@ -49,10 +49,13 b' def _formatrevs(repo, revs, maxrevs=4):'
49 return summary
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 """check if revs can be rewritten
53 """check if revs can be rewritten
54 action is used to control the error message.
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 Make sure this function is called after taking the lock.
59 Make sure this function is called after taking the lock.
57 """
60 """
58 if nullrev in revs:
61 if nullrev in revs:
@@ -85,6 +88,9 b" def precheck(repo, revs, action=b'rewrit"
85 hint=hint,
88 hint=hint,
86 )
89 )
87
90
91 if not check_divergence:
92 return
93
88 if not obsolete.isenabled(repo, obsolete.allowdivergenceopt):
94 if not obsolete.isenabled(repo, obsolete.allowdivergenceopt):
89 new_divergence = _find_new_divergence(repo, revs)
95 new_divergence = _find_new_divergence(repo, revs)
90 if new_divergence:
96 if new_divergence:
General Comments 0
You need to be logged in to leave comments. Login now