← Back to team overview

dulwich-users team mailing list archive

Re: [PATCH 0/7] Grab-bag of bugfixes

 

On Tue, Dec 28, 2010 at 01:52:44PM -0800, Dave Borowitz wrote:
> On Mon, Dec 27, 2010 at 19:08, <jelmer@xxxxxxxxx> wrote:
> > On Mon, Dec 27, 2010 at 05:44:01PM -0800, Dave Borowitz wrote:
> > > On Tue, Dec 21, 2010 at 14:50, <dborowitz@xxxxxxxxxx> wrote:
> > > > I've been meaning to help knock some bugs off the tracker for a while,
> > > > so here are some easy fixes.
> > > >
> > > > There are a number of other outstanding bugs I'm still working on, but
> > > > which will require significantly more code.
> > > >
> > > > ebc736f test_repository: Add setUp/tearDown to CreateRepositoryTests.
> > Is this preparing for more tests in that TestCase that hit disk, or perhaps
> > just simplifying the test method?
> It's for the benefit of the next patch. I would have had to add try/finally
> blocks to all 4 of the new test methods, so I simplified it ahead of time.
Ah, my bad -  I see that now. I didn't look further than the actual changes when I
reviewed the mkdir patch.

> BTW, it's clear from our other discussion that this patch isn't correct in
> that setUp/tearDown need to call the super methods as well.
Yep.

> >  > > 0c56328 repo: Allow recursive mkdir in Repo.init(_bare).
> > I wonder if this is really the right layer for this kind of thing. Wouldn't
> > it make
> > more sense to put that sort of thing in the UI layer?
> I'm not sure what you mean by the UI layer? IMO if we allow making any new
> directories with mkdir=True, then we should allow making new directories
> recursively. If you think making directories at all shouldn't be within the
> scope of Repo.init, then we should remove the mkdir arg entirely, no?
If we create parent directories automatically then that means applications that don't
want to create parent directories explicitly need to do manual checking if the parent
directory already exists. 

We could add a new flag to implicitly create parent directories, or perhaps we could 
leave it to the caller to create parent directories if it needs them.

Cheers,

Jelmer



References