git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] Rename branch section in config when the branch is renamed
@ 2007-02-04  5:32 Pavel Roskin
  2007-02-04  5:32 ` [PATCH 2/4] Copy remote and merge settings when cloning a branch Pavel Roskin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pavel Roskin @ 2007-02-04  5:32 UTC (permalink / raw)
  To: git, Catalin Marinas

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 stgit/config.py |    3 +++
 stgit/stack.py  |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/stgit/config.py b/stgit/config.py
index 48b4e2d..fb38932 100644
--- a/stgit/config.py
+++ b/stgit/config.py
@@ -96,6 +96,9 @@ class GitConfig:
         else:
             raise GitConfigException, 'Value for "%s" is not an integer: "%s"' % (name, value)
 
+    def rename_section(self, from_name, to_name):
+        self.__run('git-repo-config --rename-section', [from_name, to_name])
+
     def set(self, name, value):
         self.__run('git-repo-config', [name, value])
 
diff --git a/stgit/stack.py b/stgit/stack.py
index 96863c6..c3bf3c6 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -590,6 +590,10 @@ class Series(StgitObject):
             rename(os.path.join(self.__base_dir, 'refs', 'patches'),
                    self.__name, to_stack.__name)
 
+        # Rename the config section
+        config.rename_section("branch.%s" % self.__name,
+                              "branch.%s" % to_name)
+
         self.__init__(to_name)
 
     def clone(self, target_series):

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

end of thread, other threads:[~2007-02-04  5:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-04  5:32 [PATCH 1/4] Rename branch section in config when the branch is renamed Pavel Roskin
2007-02-04  5:32 ` [PATCH 2/4] Copy remote and merge settings when cloning a branch Pavel Roskin
2007-02-04  5:32 ` [PATCH 3/4] Don't print "rebasing" if the head doesn't change Pavel Roskin
2007-02-04  5:32 ` [PATCH 4/4] Assorted typos Pavel Roskin

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 NNTP newsgroup(s).