X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/1eae3bf5ef8561508d83845f27b61c7533ba3378..1c2426dc0bff311e5cba2ba12a1b6492553135b9:/stgit/commands/goto.py diff --git a/stgit/commands/goto.py b/stgit/commands/goto.py index fe13e49..99ae6c0 100644 --- a/stgit/commands/goto.py +++ b/stgit/commands/goto.py @@ -36,7 +36,7 @@ def func(parser, options, args): stack = directory.repository.current_stack iw = stack.repository.default_iw - trans = transaction.StackTransaction(stack, 'stg goto') + trans = transaction.StackTransaction(stack, 'goto') if patch in trans.applied: to_pop = set(trans.applied[trans.applied.index(patch)+1:]) assert not trans.pop_patches(lambda pn: pn in to_pop) @@ -46,6 +46,8 @@ def func(parser, options, args): trans.push_patch(pn, iw) except transaction.TransactionHalted: pass + elif patch in trans.hidden: + raise common.CmdException('Cannot goto a hidden patch') else: raise common.CmdException('Patch "%s" does not exist' % patch) return trans.run(iw)