git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[StGIT PATCH 2/2] Rename all config sections of a branch

From
Karl Hasselström <kha@treskal.com>
Date
Aug 8, 2007, 22:56 UTC
Message-ID
<20070808225641.17114.77114.stgit@yoghurt>
In-Reply-To
<20070808225522.17114.3065.stgit@yoghurt>

Just renaming the branch.branchname section doesn't rename the branch.branchname.stgit section -- we have to do that explicitly.

This fixes bug 9692.
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
 stgit/stack.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py
index dbd7ea4..9c15b3f 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -616,8 +616,8 @@ class Series(PatchSet):
                    self.get_name(), to_stack.get_name())
 
         # Rename the config section
-        config.rename_section("branch.%s" % self.get_name(),
-                              "branch.%s" % to_name)
+        for k in ['branch.%s', 'branch.%s.stgit']:
+            config.rename_section(k % self.get_name(), k % to_name)
 
         self.__init__(to_name)
 
Previous: Karl Hasselström
Message 3 of 3 in “Branch renaming bugfix”
  1. 0/2 Branch renaming bugfixKarl Hasselström, Aug 8, 2007
  2. 1/2 Test that all branch config information is renamedKarl Hasselström, Aug 8, 2007
  3. 2/2 Rename all config sections of a branchKarl Hasselström, Aug 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.