Subject: [PATCH 2/4] Copy remote and merge settings when cloning a branch

From: Pavel Roskin <[email-masked]>
Date: Sun, 04 Feb 2007 00:32:26 -0500

Signed-off-by: Pavel Roskin <[email-masked]>
---

 stgit/stack.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/stgit/stack.py b/stgit/stack.py
index c3bf3c6..2e01f52 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -632,6 +632,15 @@ class Series(StgitObject):
         # fast forward the cloned series to self's top
         new_series.forward_patches(applied)
 
+        # Clone remote and merge settings
+        value = config.get('branch.%s.remote' % self.__name)
+        if value:
+            config.set('branch.%s.remote' % target_series, value)
+
+        value = config.get('branch.%s.merge' % self.__name)
+        if value:
+            config.set('branch.%s.merge' % target_series, value)
+
     def delete(self, force = False):
         """Deletes an stgit series
         """