chiark / gitweb /
Rename all config sections of a branch
authorKarl Hasselström <kha@treskal.com>
Mon, 20 Aug 2007 21:36:00 +0000 (22:36 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Mon, 20 Aug 2007 21:36:34 +0000 (22:36 +0100)
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

index dbd7ea43adfc2bd91769e1e4d57a0a2fb12759d3..9c15b3f9f733b98c49598566f0bdbab76f5f87c8 100644 (file)
@@ -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)