Thread (10 messages) flat view 10 messages, 1 author, 2016-06-15
DORMANTno replies

[StGIT PATCH 9/9] Cleanup the use of the Series class.

From: Yann Dirson <hidden>
Date: 2016-06-15 22:43:17
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Yann Dirson <redacted>
---

 stgit/commands/pick.py |    3 +--
 stgit/stack.py         |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/stgit/commands/pick.py b/stgit/commands/pick.py
index 0fb7282..9dd49d2 100644
--- a/stgit/commands/pick.py
+++ b/stgit/commands/pick.py
@@ -21,7 +21,6 @@ from optparse import OptionParser, make_option
 from stgit.commands.common import *
 from stgit.utils import *
 from stgit import stack, git
-from stgit.stack import Series
 
 
 class concreteCommand(Command):
@@ -133,7 +132,7 @@ class concreteCommand(Command):
                 if refbranchname:
                     # assume the refseries is OK, since we already resolved
                     # commit_str to a git_id
-                    refseries = Series(refbranchname)
+                    refseries = stack.Series(refbranchname)
                 else:
                     refseries = self.current_head()
                 patch = refseries.get_patch(refpatchname)
diff --git a/stgit/stack.py b/stgit/stack.py
index e33fe62..8acb308 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -629,8 +629,8 @@ class Series(PatchSet):
             base = self.get_base()
         except:
             base = git.get_head()
-        Series(target_series).init(create_at = base)
         new_series = Series(target_series)
+        new_series.init(create_at = base)
 
         # generate an artificial description file
         new_series.set_description('clone of "%s"' % self.get_name())
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help