git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Yann Dirson <ydirson@altern.org>
Date
Jun 16, 2007, 22:01 UTC
Message-ID
<20070616220115.14941.5072.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070616213615.14941.31187.stgit@gandelf.nowhere.earth>
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 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())
Previous: Yann DirsonNext: Yann Dirson
Message 9 of 10 in “Refactoring of command handling”
  1. 0/9 Refactoring of command handlingYann Dirson, Jun 16, 2007
  2. 1/9 Fix contrib/stg-whatchanged way of identifying a conflict.Yann Dirson, Jun 16, 2007
  3. 2/9 Revert part of the reverted commit that we want to keep.Yann Dirson, Jun 16, 2007
  4. 4/9 Fixed thinko in error message.Yann Dirson, Jun 16, 2007
  5. 5/9 Promote more common functions to Command methods.Yann Dirson, Jun 16, 2007
  6. 6/9 Changed sync not to use -b which has other semantics.Yann Dirson, Jun 16, 2007
  7. 7/9 Replace crt_series uses with a method call.Yann Dirson, Jun 16, 2007
  8. 8/9 Add a constructor to PatchSet.Yann Dirson, Jun 16, 2007
  9. 9/9 Cleanup the use of the Series class.Yann Dirson, Jun 16, 2007
  10. Yann DirsonJun 19, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.