changeset 44622:7bbb83e4e8de

git: abort when attempting to set a branch Given the mapping we use (namely, a git head is a bookmark), it is better to error out with a hint.
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Thu, 26 Mar 2020 17:09:34 -0400
parents c5653cf2811d
children bb3e05ca21ca
files hgext/git/dirstate.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/git/dirstate.py	Thu Mar 26 16:23:54 2020 -0400
+++ b/hgext/git/dirstate.py	Thu Mar 26 17:09:34 2020 -0400
@@ -300,3 +300,8 @@
     def clearbackup(self, tr, backupname):
         # TODO
         pass
+
+    def setbranch(self, branch):
+        raise error.Abort(
+            b'git repos do not support branches. try using bookmarks'
+        )