diff mercurial/commands.py @ 50143:a3c856e2ea2f

branching: merge with default the first part of the fix is there
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 17 Feb 2023 17:04:41 +0100
parents 4fc6b423fa97
children a8d71a6ba205
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Jan 27 17:30:51 2023 +0100
+++ b/mercurial/commands.py	Fri Feb 17 17:04:41 2023 +0100
@@ -7500,6 +7500,9 @@
                 )
         node = logcmdutil.revsingle(repo, rev_).node()
 
+        if node is None:
+            raise error.InputError(_(b"cannot tag working directory"))
+
         if not message:
             # we don't translate commit messages
             message = b'Added tag %s for changeset %s' % (