Mercurial > hg
comparison hgext/histedit.py @ 32291:bd872f64a8ba
cleanup: use set literals
We no longer support Python 2.6, so we can now use set literals.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 10 Feb 2017 16:56:29 -0800 |
parents | e5ffc91a2276 |
children | 3546a771e376 |
comparison
equal
deleted
inserted
replaced
32290:2959c3e986e0 | 32291:bd872f64a8ba |
---|---|
1639 if isinstance(nodelist, str): | 1639 if isinstance(nodelist, str): |
1640 nodelist = [nodelist] | 1640 nodelist = [nodelist] |
1641 if os.path.exists(os.path.join(repo.path, 'histedit-state')): | 1641 if os.path.exists(os.path.join(repo.path, 'histedit-state')): |
1642 state = histeditstate(repo) | 1642 state = histeditstate(repo) |
1643 state.read() | 1643 state.read() |
1644 histedit_nodes = set([action.node for action | 1644 histedit_nodes = {action.node for action |
1645 in state.actions if action.node]) | 1645 in state.actions if action.node} |
1646 common_nodes = histedit_nodes & set(nodelist) | 1646 common_nodes = histedit_nodes & set(nodelist) |
1647 if common_nodes: | 1647 if common_nodes: |
1648 raise error.Abort(_("histedit in progress, can't strip %s") | 1648 raise error.Abort(_("histedit in progress, can't strip %s") |
1649 % ', '.join(node.short(x) for x in common_nodes)) | 1649 % ', '.join(node.short(x) for x in common_nodes)) |
1650 return orig(ui, repo, nodelist, *args, **kwargs) | 1650 return orig(ui, repo, nodelist, *args, **kwargs) |