Re: [StGIT PATCH 4/5] Add stack creation and initialisation support to lib.Stack

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Karl
Date: Thursday, June 5, 2008 - 12:28 am

On 2008-06-04 22:13:43 +0100, Catalin Marinas wrote:



s/stack/L{Stack}/, perhaps?


Wouldn't it be more consistent if the create function actually
returned a PatchOrder object, like other creation functions? (You
might even consider having these files auto-created whenever you
instantiate a PatchOrder object and they don't yet exist.)

Also, the creation function might instead live in the Stack class,
since it owns the patch order.


This needs to be in the previous patch, I think, since you use it
there.


Hmm, I don't quite follow. Why is this a no-op if you give a false
localbranch? And why is branch.<branchname>.stgit.parentbranch needed,
when it's always the same as branch.<branchname>.merge? (Backwards
compatibility? Would you mind making a comment about that, in that
case?)


This is not quite like the other "create" functions, since it just
promotes a branch, without really creating it.

What I'd really like to see here, I think, is something like this:

  1. You get a Stack object from some stack.Repository method.

  2. The Stack object works without having to be initialized, but the
     operations that need initialization throw an exception.

  3. The Stack object has an initialize() method -- just a normal
     method, not a class method.

This will pave the way for automatic initialization -- just call
self.initialize() instead of throwing an exception in step (2).

What do you think?


Same point as with the other creation functions.

And I'd appreciate some documentation on what the parameters mean --
either here, or in the methods you call from here.

-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [StGIT PATCH 4/5] Add stack creation and initialisatio ..., Karl , (Thu Jun 5, 12:28 am)