{"thread":{"id":"9447","subject":"[StGIT PATCH 0/2] Branch renaming bugfix","startedAt":"2007-08-08T22:56:29Z","lastAt":"2007-08-08T22:56:41Z","messageCount":3,"participants":["Karl Hasselström"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"50259","messageId":"20070808225522.17114.3065.stgit@yoghurt","threadId":"9447","inReplyTo":null,"subject":"[StGIT PATCH 0/2] Branch renaming bugfix","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-08T22:56:29Z","receivedAt":"2007-08-08T22:56:29Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"This series consists of a test that demonstrates a bug in the branch\nrenaming (failure to rename the branch.<branchname>.stgit section),\nand a fix.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"50261","messageId":"20070808225635.17114.27216.stgit@yoghurt","threadId":"9447","inReplyTo":"20070808225522.17114.3065.stgit@yoghurt","subject":"[StGIT PATCH 1/2] Test that all branch config information is renamed","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-08T22:56:36Z","receivedAt":"2007-08-08T22:56:36Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"This test currently fails (which is precisely why it's needed, of\ncourse.) This is bug 9692 in the bug tracker.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n t/t1001-branch-rename.sh |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t1001-branch-rename.sh b/t/t1001-branch-rename.sh\nindex 28da15c..28af8ae 100755\n--- a/t/t1001-branch-rename.sh\n+++ b/t/t1001-branch-rename.sh\n@@ -26,7 +26,8 @@ test_expect_success \\\n     'Rename an stgit branch' \\\n     'stg branch -c buz &&\n      stg branch -r foo bar &&\n-     test -z `find .git -name foo | tee /dev/stderr`\n+     test -z `find .git -name foo | tee /dev/stderr` &&\n+     test -z $(git config -l | grep branch\\\\.foo)\n '\n \n test_done\n"},{"id":"50260","messageId":"20070808225641.17114.77114.stgit@yoghurt","threadId":"9447","inReplyTo":"20070808225522.17114.3065.stgit@yoghurt","subject":"[StGIT PATCH 2/2] Rename all config sections of a branch","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-08-08T22:56:41Z","receivedAt":"2007-08-08T22:56:41Z","isPatch":true,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"Just renaming the branch.branchname section doesn't rename the\nbranch.branchname.stgit section -- we have to do that explicitly.\n\nThis fixes bug 9692.\n\nSigned-off-by: Karl Hasselström <kha@treskal.com>\n\n---\n\n stgit/stack.py |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/stgit/stack.py b/stgit/stack.py\nindex dbd7ea4..9c15b3f 100644\n--- a/stgit/stack.py\n+++ b/stgit/stack.py\n@@ -616,8 +616,8 @@ class Series(PatchSet):\n                    self.get_name(), to_stack.get_name())\n \n         # Rename the config section\n-        config.rename_section(\"branch.%s\" % self.get_name(),\n-                              \"branch.%s\" % to_name)\n+        for k in ['branch.%s', 'branch.%s.stgit']:\n+            config.rename_section(k % self.get_name(), k % to_name)\n \n         self.__init__(to_name)\n \n"}]}