# HG changeset patch
# User Matt Harbison <
matt_h...@yahoo.com>
# Date 1664814268 14400
# Mon Oct 03 12:24:28 2022 -0400
# Branch stable
# Node ID e0c8b605b5a55816d8442098552115ab66fb6388
# Parent 7b9d45a26179fb9541306fdd1ca87ffd3daa411b
commit: ignore any new branch name when opening the topic dialog
There was an expectation mismatch here- `self.branchop` can either be a unicode
branch name (after a new branch is primed for the next commit), `False` (to
close the branch), or `None` (for no changes). But the topic dialog expects a
revision, and passes it directly to Mercurial in calls like `repo[self.rev]`.
That fails with a TypeError when changing the topic after setting the branch
name. Since commit is about the working directory, just pass `None`.
diff --git a/tortoisehg/hgqt/commit.py b/tortoisehg/hgqt/commit.py
--- a/tortoisehg/hgqt/commit.py
+++ b/tortoisehg/hgqt/commit.py
@@ -901,7 +901,7 @@
def topicOp(self):
# type: () -> None
- d = topic.TopicDialog(self._repoagent, self.branchop, self)
+ d = topic.TopicDialog(self._repoagent, None, self)
d.setWindowFlags(Qt.WindowType.Sheet)
d.setWindowModality(Qt.WindowModality.WindowModal)
d.exec_()