All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: git@vger.kernel.org, Catalin Marinas <catalin.marinas@gmail.com>
Subject: [PATCH 1/4] Rename branch section in config when the branch is renamed
Date: Sun, 04 Feb 2007 00:32:21 -0500	[thread overview]
Message-ID: <20070204053221.15035.88015.stgit@dv.roinet.com> (raw)

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):

             reply	other threads:[~2007-02-04  5:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-04  5:32 Pavel Roskin [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070204053221.15035.88015.stgit@dv.roinet.com \
    --to=proski@gnu.org \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.