# HG changeset patch # User Pierre-Yves David # Date 1536000792 -7200 # Node ID a93b74f745a6cb963bda1cbc6cb361d2b241ef79 # Parent fb4801478d5d7efd72fc61b01a0f4c6cd13502f7 topic: update other occurrence of 't0' is 's0' in the code diff -r fb4801478d5d -r a93b74f745a6 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Mon Sep 03 17:07:36 2018 +0200 +++ b/hgext3rd/topic/__init__.py Mon Sep 03 20:53:12 2018 +0200 @@ -29,7 +29,7 @@ your current topic. Topic is offering you aliases reference to changeset in your current topic -stack as 't#'. For example, 's1' refers to the root of your stack, 's2' to the +stack as 's#'. For example, 's1' refers to the root of your stack, 's2' to the second commits, etc. The 'hg stack' command show these number. 's0' can be used to refer to the parent of the topic root. Updating using `hg up s0` will keep the topic active. @@ -238,8 +238,8 @@ def _contexttopicidx(self): topic = self.topic() if not topic: - # XXX we might want to include t0 here, - # however t0 is related to 'currenttopic' which has no place here. + # XXX we might want to include s0 here, + # however s0 is related to 'currenttopic' which has no place here. return None revlist = stack.stack(self._repo, topic=topic) try: @@ -293,7 +293,7 @@ elif ttype == 'branch': msg = _('cannot resolve "%s": %s "%s" has only %d non-public changesets') raise error.Abort(msg % (name, ttype, tname, len(revs) - 1)) - # b0 or t0 can be None + # b0 or t0 or s0 can be None if r == -1 and idx == 0: msg = _('the %s "%s" has no %s') raise error.Abort(msg % (ttype, tname, name)) @@ -335,7 +335,7 @@ extensions.wrapfunction(cmdutil, 'buildcommittext', committextwrap) extensions.wrapfunction(merge, 'update', mergeupdatewrap) - # We need to check whether t0 or b0 is passed to override the default update + # We need to check whether t0 or b0 or s0 is passed to override the default update # behaviour of changing topic and I can't find a better way # to do that as scmutil.revsingle returns the rev number and hence we can't # plug into logic for this into mergemod.update(). diff -r fb4801478d5d -r a93b74f745a6 tests/test-topic.t --- a/tests/test-topic.t Mon Sep 03 17:07:36 2018 +0200 +++ b/tests/test-topic.t Mon Sep 03 20:53:12 2018 +0200 @@ -40,7 +40,7 @@ your current topic. Topic is offering you aliases reference to changeset in your current topic - stack as 't#'. For example, 's1' refers to the root of your stack, 's2' to the + stack as 's#'. For example, 's1' refers to the root of your stack, 's2' to the second commits, etc. The 'hg stack' command show these number. 's0' can be used to refer to the parent of the topic root. Updating using 'hg up s0' will keep the topic active.