topic: allow specifying current topic using period
3 unresolved threads
3 unresolved threads
Compare changes
Files
2+ 15
− 7
@@ -804,14 +804,22 @@ def topics(ui, repo, topic=None, **opts):
What if we don't abort here?
hg up .
works fine, what's the downside of havinghg topics .
working as a no-op?Asking to try and avoid checking touchedrevs inside
if topic
block, because we are kinda already checking topic insideif touchedrevs
block, and having things live in multiple places could lead to messy code.I don't have any strong opinion, but a little inclined to the current one for msg clarity. If we do no-op here and rely on later check, abort msg would be:
abort: changing topic requires a topic name or --clear
which obviously not wrong, but also doesn't directly say that there is no active topic (for yourhg topic .
usage)@av6 what do you think? ^
Heptapod put one of my previous comments in limbo, so my comment above is confusing. What I meant is to do
and not check touchedrevs here. Don't indent the block that checks topic name, and let it all keep working with or without touchedrevs. Basically make
hg topic .
not complain about topic name, but instead be a no-op.