git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [StGIT PATCH 0/2] Branch renaming bugfix
@ 2007-08-08 22:56 Karl Hasselström
  2007-08-08 22:56 ` [StGIT PATCH 1/2] Test that all branch config information is renamed Karl Hasselström
  2007-08-08 22:56 ` [StGIT PATCH 2/2] Rename all config sections of a branch Karl Hasselström
  0 siblings, 2 replies; 3+ messages in thread
From: Karl Hasselström @ 2007-08-08 22:56 UTC (permalink / raw
  To: Catalin Marinas; +Cc: git

This series consists of a test that demonstrates a bug in the branch
renaming (failure to rename the branch.<branchname>.stgit section),
and a fix.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [StGIT PATCH 1/2] Test that all branch config information is renamed
  2007-08-08 22:56 [StGIT PATCH 0/2] Branch renaming bugfix Karl Hasselström
@ 2007-08-08 22:56 ` Karl Hasselström
  2007-08-08 22:56 ` [StGIT PATCH 2/2] Rename all config sections of a branch Karl Hasselström
  1 sibling, 0 replies; 3+ messages in thread
From: Karl Hasselström @ 2007-08-08 22:56 UTC (permalink / raw
  To: Catalin Marinas; +Cc: git

This test currently fails (which is precisely why it's needed, of
course.) This is bug 9692 in the bug tracker.

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 t/t1001-branch-rename.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/t/t1001-branch-rename.sh b/t/t1001-branch-rename.sh
index 28da15c..28af8ae 100755
--- a/t/t1001-branch-rename.sh
+++ b/t/t1001-branch-rename.sh
@@ -26,7 +26,8 @@ test_expect_success \
     'Rename an stgit branch' \
     'stg branch -c buz &&
      stg branch -r foo bar &&
-     test -z `find .git -name foo | tee /dev/stderr`
+     test -z `find .git -name foo | tee /dev/stderr` &&
+     test -z $(git config -l | grep branch\\.foo)
 '
 
 test_done

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [StGIT PATCH 2/2] Rename all config sections of a branch
  2007-08-08 22:56 [StGIT PATCH 0/2] Branch renaming bugfix Karl Hasselström
  2007-08-08 22:56 ` [StGIT PATCH 1/2] Test that all branch config information is renamed Karl Hasselström
@ 2007-08-08 22:56 ` Karl Hasselström
  1 sibling, 0 replies; 3+ messages in thread
From: Karl Hasselström @ 2007-08-08 22:56 UTC (permalink / raw
  To: Catalin Marinas; +Cc: git

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)
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-08 22:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 22:56 [StGIT PATCH 0/2] Branch renaming bugfix Karl Hasselström
2007-08-08 22:56 ` [StGIT PATCH 1/2] Test that all branch config information is renamed Karl Hasselström
2007-08-08 22:56 ` [StGIT PATCH 2/2] Rename all config sections of a branch Karl Hasselström

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).