Show More
@@ -144,20 +144,16 b' def getoptions(repo):' | |||
|
144 | 144 | """Returns dicts showing state of obsolescence features.""" |
|
145 | 145 | |
|
146 | 146 | createmarkersvalue = _getoptionvalue(repo, createmarkersopt) |
|
147 | unstablevalue = _getoptionvalue(repo, allowunstableopt) | |
|
148 |
|
|
|
149 |
|
|
|
150 | ||
|
151 | # createmarkers must be enabled if other options are enabled | |
|
152 | if ( | |
|
153 | unstablevalue or divergencevalue or exchangevalue | |
|
154 | ) and not createmarkersvalue: | |
|
155 | raise error.Abort( | |
|
156 | _( | |
|
157 | b"'createmarkers' obsolete option must be enabled " | |
|
158 | b"if other obsolete options are enabled" | |
|
159 | ) | |
|
160 | ) | |
|
147 | if createmarkersvalue: | |
|
148 | unstablevalue = _getoptionvalue(repo, allowunstableopt) | |
|
149 | divergencevalue = _getoptionvalue(repo, allowdivergenceopt) | |
|
150 | exchangevalue = _getoptionvalue(repo, exchangeopt) | |
|
151 | else: | |
|
152 | # if we cannot create obsolescence markers, we shouldn't exchange them | |
|
153 | # or perform operations that lead to instability or divergence | |
|
154 | unstablevalue = False | |
|
155 | divergencevalue = False | |
|
156 | exchangevalue = False | |
|
161 | 157 | |
|
162 | 158 | return { |
|
163 | 159 | createmarkersopt: createmarkersvalue, |
@@ -580,6 +580,24 b' iterable in addbranchrevs()' | |||
|
580 | 580 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
581 | 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 | 602 | Test clone with special '@' bookmark: |
|
585 | 603 | $ cd a |
General Comments 0
You need to be logged in to leave comments.
Login now