[PATCH] commit: ignore any new branch name when opening the topic dialog

2 बार देखा गया
नहीं पढ़े गए पहले मैसेज पर जाएं

Matt Harbison

नहीं पढ़ी गई,
3 अक्तू॰ 2022, 12:40:33 pm3/10/22
ईमेल पाने वाला thg...@googlegroups.com
# 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_()

Yuya Nishihara

नहीं पढ़ी गई,
3 अक्तू॰ 2022, 9:13:17 pm3/10/22
ईमेल पाने वाला Matt Harbison, thg...@googlegroups.com
On Mon, 03 Oct 2022 12:40:30 -0400, Matt Harbison wrote:
> # 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

Queued for stable, thanks.
सभी प्रषकों को उत्तर दें
लेखक को उत्तर दें
आगे भेजें
0 नया मैसेज