--- a/hgext3rd/evolve/__init__.py Thu Aug 10 17:57:50 2017 +0200
+++ b/hgext3rd/evolve/__init__.py Thu Aug 10 19:31:55 2017 +0200
@@ -995,7 +995,7 @@
tr = repo.transaction("evolve")
if 'orphan' == category:
result = _solveunstable(ui, repo, ctx, dryrun, confirm, progresscb)
- elif 'bumped' == category:
+ elif 'phasedivergent' == category:
result = _solvebumped(ui, repo, ctx, dryrun, confirm, progresscb)
elif 'contentdivergent' == category:
result = _solvedivergent(ui, repo, ctx, dryrun, confirm,
@@ -1010,7 +1010,7 @@
def _handlenotrouble(ui, repo, allopt, revopt, anyopt, targetcat):
"""Used by the evolve function to display an error message when
no troubles can be resolved"""
- troublecategories = ['bumped', 'contentdivergent', 'orphan']
+ troublecategories = ['phasedivergent', 'contentdivergent', 'orphan']
unselectedcategories = [c for c in troublecategories if c != targetcat]
msg = None
hint = None
@@ -1018,27 +1018,34 @@
troubled = {
"orphan": repo.revs("unstable()"),
"contentdivergent": repo.revs("divergent()"),
- "bumped": repo.revs("bumped()"),
+ "phasedivergent": repo.revs("bumped()"),
"all": repo.revs("troubled()"),
}
hintmap = {
- 'bumped': _("do you want to use --bumped"),
- 'bumped+contentdivergent': _("do you want to use --bumped or --contentdivergent"),
- 'bumped+orphan': _("do you want to use --bumped or --orphan"),
+ 'phasedivergent': _("do you want to use --phasedivergent"),
+ 'phasedivergent+contentdivergent': _("do you want to use "
+ "--phasedivergent or"
+ " --contentdivergent"),
+ 'phasedivergent+orphan': _("do you want to use --phasedivergent"
+ " or --orphan"),
'contentdivergent': _("do you want to use --contentdivergent"),
'contentdivergent+orphan': _("do you want to use --contentdivergent"
" or --orphan"),
'orphan': _("do you want to use --orphan"),
- 'any+bumped': _("do you want to use --any (or --rev) and --bumped"),
- 'any+bumped+contentdivergent': _("do you want to use --any (or --rev) and"
- " --bumped or --contentdivergent"),
- 'any+bumped+orphan': _("do you want to use --any (or --rev) and"
- "--bumped or --orphan"),
+ 'any+phasedivergent': _("do you want to use --any (or --rev) and"
+ " --phasedivergent"),
+ 'any+phasedivergent+contentdivergent': _("do you want to use --any"
+ " (or --rev) and"
+ " --phasedivergent or"
+ " --contentdivergent"),
+ 'any+phasedivergent+orphan': _("do you want to use --any (or --rev)"
+ " and --phasedivergent or --orphan"),
'any+contentdivergent': _("do you want to use --any (or --rev) and"
" --contentdivergent"),
'any+contentdivergent+orphan': _("do you want to use --any (or --rev)"
- " and --contentdivergent or --orphan"),
+ " and --contentdivergent or "
+ "--orphan"),
'any+orphan': _("do you want to use --any (or --rev)"
"and --orphan"),
}
@@ -1184,7 +1191,8 @@
return res
instabilities_map = {
- 'contentdivergent': "content-divergent"
+ 'contentdivergent': "content-divergent",
+ 'phasedivergent': "phase-divergent"
}
def _selectrevs(repo, allopt, revopt, anyopt, targetcat):
@@ -1291,9 +1299,9 @@
def listtroubles(ui, repo, troublecategories, **opts):
"""Print all the troubles for the repo (or given revset)"""
- troublecategories = troublecategories or ['contentdivergent', 'orphan', 'bumped']
+ troublecategories = troublecategories or ['contentdivergent', 'orphan', 'phasedivergent']
showunstable = 'orphan' in troublecategories
- showbumped = 'bumped' in troublecategories
+ showbumped = 'phasedivergent' in troublecategories
showdivergent = 'contentdivergent' in troublecategories
revs = repo.revs('+'.join("%s()" % t for t in troublecategories))
@@ -1373,7 +1381,8 @@
'directory')),
('r', 'rev', [], _('solves troubles of these revisions')),
('', 'bumped', False, _('solves only bumped changesets')),
- ('', 'divergent', False, _('solves only divergent changesets')),
+ ('', 'phasedivergent', False, _('solves only bumped changesets')),
+ ('', 'divergent', False, _('solves only phasedivergent changesets')),
('', 'contentdivergent', False, _('solves only contentdivergent changesets')),
('', 'unstable', False, _('solves only unstable changesets')),
('', 'orphan', False, _('solves only orphan changesets (default)')),
@@ -1479,7 +1488,14 @@
opts['contentdivergent'] = opts['divergent']
- troublecategories = ['bumped', 'contentdivergent', 'orphan']
+ if opts['bumped']:
+ msg = ("'evolve --bumped' is deprecated, "
+ "use 'evolve --phasedivergent'")
+ repo.ui.deprecwarn(msg, '4.4')
+
+ opts['phasedivergent'] = opts['bumped']
+
+ troublecategories = ['phasedivergent', 'contentdivergent', 'orphan']
specifiedcategories = [t for t in troublecategories if opts[t]]
if listopt:
listtroubles(ui, repo, specifiedcategories, **opts)
--- a/hgext3rd/evolve/compat.py Thu Aug 10 17:57:50 2017 +0200
+++ b/hgext3rd/evolve/compat.py Thu Aug 10 19:31:55 2017 +0200
@@ -101,6 +101,9 @@
if not util.safehasattr(context.basectx, 'contentdivergent'):
context.basectx.contentdivergent = context.basectx.divergent
+if not util.safehasattr(context.basectx, 'phasedivergent'):
+ context.basectx.phasedivergent = context.basectx.bumped
+
if not util.safehasattr(revset, 'orphan'):
@eh.revset('orphan')
def oprhanrevset(*args, **kwargs):
@@ -111,6 +114,11 @@
def contentdivergentrevset(*args, **kwargs):
return revset.divergent(*args, **kwargs)
+if not util.safehasattr(revset, 'phasedivergent'):
+ @eh.revset('phasedivergent')
+ def phasedivergentrevset(*args, **kwargs):
+ return revset.bumped(*args, **kwargs)
+
if not util.safehasattr(context.basectx, 'instabilities'):
def instabilities(self):
"""return the list of instabilities affecting this changeset.
@@ -123,8 +131,8 @@
instabilities = []
if self.orphan():
instabilities.append('unstable')
- if self.bumped():
- instabilities.append('bumped')
+ if self.phasedivergent():
+ instabilities.append('phase-divergent')
if self.contentdivergent():
instabilities.append('content-divergent')
return instabilities