[pony-build] Code Question

C. Titus Brown ctb at msu.edu
Thu Jan 21 18:59:00 PST 2010


On Thu, Jan 21, 2010 at 10:43:59PM -0400, Max Laite wrote:
> Yea, I guess I pretty much knew that already. Hacked something together that
> works. Need to get a couple more git/svn repo projects to test it though,
> just to be sure. Will push to git tomorrow or weekend and let you know so
> you can check it out.

You could push it now & then again later, too. :)

--titus

> On Thu, Jan 21, 2010 at 9:54 PM, C. Titus Brown <ctb at msu.edu> wrote:
> 
> > On Thu, Jan 21, 2010 at 08:52:56PM -0400, Max Laite wrote:
> > >  # now, do a clone, from either the parent OR the local cache
> > >         location = self.repository
> > >         if os.path.isdir(cache_dir):
> > >             location = cache_dir
> > >
> > >         cmdlist = ['git', 'clone', self.repository]
> > >         (ret, out, err) = _run_command(cmdlist)
> > >
> > >         self.results_dict['clone'] = \
> > >                  dict(status=ret, output=out, errout=err,
> > >                       command=str(cmdlist))
> > >         if ret != 0:
> > >             return
> > >
> > >         print cmdlist, out
> > >
> > >
> > > My assumption for this was that it does a clone to the temp directory or
> > > wherever it was doing the install from locally. It checks to see if the
> > > cache_dir exists and if it does, it does the clone from there so that you
> > > don't use up the repo's bandwidth. 'location' is never used though, so it
> > > just pulls from the online repo anyways.....Just looking for some
> > > clarification....
> > >
> > > As a note i have two variables for cache_dir now, for use in creation if
> > it
> > > doesn't exist....One that holds the info for if ~/.pony-build exists and
> > one
> > > to store path to the individual repo eg. ~/.pony-build/figleaf ........
> > >
> > > The code above is unedited......
> > >
> > > Don't forget to CC list, whoever responds.
> >
> > Hi Max,
> >
> > the logic for the code checkout should be something like this:
> >
> > --
> >
> > if cache directory exists:
> >  update cache directory from main repository
> > else:
> >  create cache directory by doing a clean checkout from main repository
> >
> > copy cache directory into current working space
> > ---
> >
> > not a direct answer but I think it gets at your question -- does it?
> >
> > cheers,
> > --titus
> > --
> > C. Titus Brown, ctb at msu.edu
> >

-- 
C. Titus Brown, ctb at msu.edu



More information about the pony-build mailing list