Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

Commit a828e0cb authored by Manuel Jacob's avatar Manuel Jacob
Browse files

rewriteutil: add utility to check whether empty successors should be skipped

parent b6269741ed42
......@@ -53,3 +53,20 @@ def disallowednewunstable(repo, revs):
if allowunstable:
return revset.baseset()
return repo.revs(b"(%ld::) - %ld", revs, revs)
def skip_empty_successor(ui, command):
empty_successor = ui.config(b'rewrite', b'empty-successor')
if empty_successor == b'skip':
return True
elif empty_successor == b'keep':
return False
else:
raise error.ConfigError(
_(
b"%s doesn't know how to handle config "
b"rewrite.empty-successor=%s (only 'skip' and 'keep' are "
b"supported)"
)
% (command, empty_successor)
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment