On 03/16/2010 11:46 AM, Cristopher Ewing wrote:

On Mar 16, 2010, at 8:18 AM, Chris Rossi wrote:

On Tue, Mar 16, 2010 at 11:14 AM, Chris Calloway <c...@unc.edu
<mailto:c...@unc.edu>> wrote:

    On 3/16/2010 10:37 AM, Chris Rossi wrote:

        If I may play devil's advocate here, isn't the very idea that
        would do your svn checkin for you a bit overwrought? Is it so
        hard to run
        the template and then do svn add? The easiest features to
        support are the
        features you don't have, and with a feature like this it's
        going to be
        especially hard to get right because different users are going
        to have
        different expectations. I would, for example, consider
        anything that tried
        to check in .egg-info to be broken. I would argue that maybe
        the right
        choice is to drop this feature altogether and assume users can
        handle their
        own source control.

    If we were going to add this feature today, yeah, we should think
    better of it.

    But at the sprint we agreed on a "do no harm" policy to the
    ZopeSkel users who already use pre-existing features of ZopeSkel,
    however ill-considered those features may be.

    That's part of why we made the zopeskel wrapper binary: so we
    could make usability changes to ZopeSkel for the benefit of
    themers and integrators, without impacting the developers who
    already depend on ZopeSkel as it is (and who use an unwrapped
    paster binary).

    So as far as the zopeskel binary goes, --svn-repository is
    probably a paster option it should either:

    a) not be passing along to paster (and maybe warning about it), or
    b) doing a combination of:
    i) checking for non-egg templates, and
    ii) Clayton's good idea (setting svn:ignore on egg-info) for egg

Obviously, my vote is for a) with a warning, but I have little stake
in this either way.

I'm leaning towards a) myself. Having walked my way through the process
yesterday, There doesn't seem to be much of a place to wedge the code
that would add an svn:ignore in zopeskel code. The property would have
to be added _before_ the egg-info directory was added to svn, or it
wouldn't work. Right now, the control flow appears to be:

zopeskel is called w/ --svn-repository -> paster creates, and then
checks out trunk of an empty repository -> check-vars [zopeskel version]
is run, gathering the needed info to build the skeleton -> all files and
folders are created and added to the repository immediately afterwards
(in the same chunk of [pastescript] code) -> finish up.

I haven't read the code recently, but I don't think this is entirely true. The only thing that would be added into the svn repo at the end of the command is the my.project/{trunk,tags,branches}

The rest is left as "added" to the repository waiting for a commit. This is how I was able to set the svn:ignore property. In my custom code I actually do make it do the commit so that you don't forget and leave some code lying around.

The logical place to do any setting of svn:ignore might be in the
'check-vars' code, but it's not a particularly logical space to put things.

I did it in the "post" method, this is also where I do my custom commit of the code.

My instinct is to swallow the --svn-repository option and notify the
user that we are doing so. We can leave it so that the option would
still work if you use 'paster create -t template_name' instead of
'zopskel template_name'.

Either way they are going to be frustrated :)

Any final thoughts? (And thanks for all the input. Nice to know you all
are out there ;) )

A couple of things. First to Chris Rossi's point about this being a simple run the command and then do an `svn add`. That's not what the --svn-repository command is doing for you. It creates the proper svn layout for you, checks out the trunk, then runs the template. If you start without this step you need to still do an `svn import` (which is not the most straight forward command)

Second point, this command is starting to be behind the times anyway :) There are a lot more options that just svn these days. We have git, hg and bzr to think about.

All that being said, ignoring it might not be a bad option...

clay...@sixfeetup.com | +1 (317) 861-5948 x603
six feet up presents INDIGO : The Help Line for Plone
More info at http://sixfeetup.com/indigo or call +1 (866) 749-3338

ZopeSkel mailing list

Reply via email to