##// END OF EJS Templates
obsolete: disable other evolution config options if createmarkers is off...
av6 -
r48599:2cd00052 stable
parent child Browse files
Show More
@@ -144,20 +144,16 b' def getoptions(repo):'
144 """Returns dicts showing state of obsolescence features."""
144 """Returns dicts showing state of obsolescence features."""
145
145
146 createmarkersvalue = _getoptionvalue(repo, createmarkersopt)
146 createmarkersvalue = _getoptionvalue(repo, createmarkersopt)
147 unstablevalue = _getoptionvalue(repo, allowunstableopt)
147 if createmarkersvalue:
148 divergencevalue = _getoptionvalue(repo, allowdivergenceopt)
148 unstablevalue = _getoptionvalue(repo, allowunstableopt)
149 exchangevalue = _getoptionvalue(repo, exchangeopt)
149 divergencevalue = _getoptionvalue(repo, allowdivergenceopt)
150
150 exchangevalue = _getoptionvalue(repo, exchangeopt)
151 # createmarkers must be enabled if other options are enabled
151 else:
152 if (
152 # if we cannot create obsolescence markers, we shouldn't exchange them
153 unstablevalue or divergencevalue or exchangevalue
153 # or perform operations that lead to instability or divergence
154 ) and not createmarkersvalue:
154 unstablevalue = False
155 raise error.Abort(
155 divergencevalue = False
156 _(
156 exchangevalue = False
157 b"'createmarkers' obsolete option must be enabled "
158 b"if other obsolete options are enabled"
159 )
160 )
161
157
162 return {
158 return {
163 createmarkersopt: createmarkersvalue,
159 createmarkersopt: createmarkersvalue,
@@ -580,6 +580,24 b' iterable in addbranchrevs()'
580 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
580 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
581 $ rm -r ua
581 $ rm -r ua
582
582
583 Local clones don't get confused by unusual experimental.evolution options
584
585 $ hg clone \
586 > --config experimental.evolution=allowunstable,allowdivergence,exchange \
587 > a ua
588 updating to branch default
589 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
590 $ rm -r ua
591
592 $ hg clone \
593 > --config experimental.evolution.createmarkers=no \
594 > --config experimental.evolution.allowunstable=yes \
595 > --config experimental.evolution.allowdivergence=yes \
596 > --config experimental.evolution.exchange=yes \
597 > a ua
598 updating to branch default
599 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
600 $ rm -r ua
583
601
584 Test clone with special '@' bookmark:
602 Test clone with special '@' bookmark:
585 $ cd a
603 $ cd a
General Comments 0
You need to be logged in to leave comments. Login now