Re: [StGIT PATCH 5/5] Add stack creation and deletion support to the new infrastructure
- From
Karl Hasselström <kha@treskal.com>
- Date
- Jun 5, 2008, 07:34 UTC
- Message-ID
- <20080605073429.GE23209@diana.vm.bytemark.co.uk>
- In-Reply-To
- <20080604211352.32531.10821.stgit@localhost.localdomain>
The commit message is misleading. What this patch does is make "stg init" _use_ the new-infrastructure stack init support added in your previous patches.
On 2008-06-04 22:13:52 +0100, Catalin Marinas wrote:
Show 17 quoted lines
> diff --git a/stgit/commands/init.py b/stgit/commands/init.py > index 475a4ce..b68acd7 100644 > --- a/stgit/commands/init.py > +++ b/stgit/commands/init.py > @@ -16,13 +16,8 @@ along with this program; if not, write to the Free Software > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > """ > > -import sys, os > -from optparse import OptionParser, make_option > - > -from stgit.commands.common import * > -from stgit.utils import * > -from stgit import stack, git > - > +from stgit.commands import common > +from stgit.lib import stack
Lots of imports gone, and the remaining ones aren't spilled directly into the local namespace. Very nice.
> - crt_series.init() > + stack.Stack.initialise(directory.repository)
This would need minor tweaking if you decide to take my advice for 4/5.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle