CVS dir in migrations dir

1 view
Skip to first unread message

browndar

unread,
Aug 6, 2009, 10:48:57 PM8/6/09
to Carbon Five DB Migration Discussion Group
Hi There,

Quick note. the db migration tool is not compatible with the old CVS
directory naming scheme. So migrations will fail if there are any
files in the migrations dir other than files and dirs beginning with a
dot. First thought is filter out any resources that are directories.
Second probably more elaborate than is worth it would be to allow for
user specified filters.

Thanks very much. Great tool and easy to use.

Take care,

Darren

Darren Brown

unread,
Aug 7, 2009, 1:32:29 AM8/7/09
to Carbon Five DB Migration Discussion Group
And BTW, I'd be happy to make the changes. I've never contributed to
a google code proj, but I'd love to start sometime.

This is what I had in mind, starting at line 69 of ResourceMigrationResolver

// Remove resources starting with a '.' (e.g. .svn, .cvs, etc)
CollectionUtils.filter(resources, new Predicate()
{
public boolean evaluate(Object object)
{
try {
return !(((Resource)
object).getFilename().startsWith(".") || (((Resource)
object).getFile().isDirectory()));
} catch (IOException e)
{
throw new MigrationException(e);
}
}
});

Christian Nelson

unread,
Aug 7, 2009, 7:56:11 AM8/7/09
to c5-db-m...@googlegroups.com
Darren,

Thanks for the code sample... I'll fold in your change and make a point release soon.  I'm currently on vacation but should be able to squeeze it in one of these evenings.  Keep an eye out for v0.9.8.

Thanks,
Christian
--
Christian Nelson -- (e) cne...@slac.com -- (m) 415-378-3988

Darren Brown

unread,
Aug 7, 2009, 11:45:05 AM8/7/09
to c5-db-m...@googlegroups.com
Oh great!  I look forward to it. Have a great vacation.

Darren

Christian Nelson

unread,
Aug 10, 2009, 10:34:10 AM8/10/09
to c5-db-m...@googlegroups.com
Darren,

I'm back and I have a little time today.  I just started looking into this and have a request... can you send me a directory listing that exhibits the problem you're seeing?  I'm not sure what the old CVS naming scheme is and right now, don't see exactly what the problem is.  I want to grok it before I commit the changes.

Thanks a million,
Christian

Darren Brown

unread,
Aug 10, 2009, 11:07:45 AM8/10/09
to c5-db-m...@googlegroups.com
Sure, instead of '.svn' or '.cvs', it's just a dir called 'CVS'. 


browndar

unread,
Aug 26, 2009, 1:34:54 AM8/26/09
to Carbon Five DB Migration Discussion Group
Hi there Christian,

I'd be happy to contribute the change if that would be easier.
Whatcha think?

Take care,

Darren

On Aug 10, 8:07 am, Darren Brown <darren.s.br...@gmail.com> wrote:
> Sure, instead of '.svn' or '.cvs', it's just a dir called 'CVS'.
>
> On Aug 10, 2009, at 8:34 AM, Christian Nelson <cnel...@slac.com> wrote:
>
> > Darren,
>
> > I'm back and I have a little time today.  I just started looking  
> > into this and have a request... can you send me a directory listing  
> > that exhibits the problem you're seeing?  I'm not sure what the old  
> > CVS naming scheme is and right now, don't see exactly what the  
> > problem is.  I want to grok it before I commit the changes.
>
> > Thanks a million,
> > Christian
>
> > On Fri, Aug 7, 2009 at 8:45 AM, Darren Brown  
> > <darren.s.br...@gmail.com> wrote:
> > Oh great!  I look forward to it. Have a great vacation.
>
> > Darren
>
> > On Aug 7, 2009, at 4:56 AM, Christian Nelson <cnel...@slac.com> wrote:
>
> >> Darren,
>
> >> Thanks for the code sample... I'll fold in your change and make a  
> >> point release soon.  I'm currently on vacation but should be able  
> >> to squeeze it in one of these evenings.  Keep an eye out for v0.9.8.
>
> >> Thanks,
> >> Christian
>
> >> On Thu, Aug 6, 2009 at 10:32 PM, Darren Brown <darren.s.br...@gmail.com
> >> > wrote:
>
> >> And BTW, I'd be happy to make the changes.  I've never contributed to
> >> a google code proj, but I'd love to start sometime.
>
> >> This is what I had in mind, starting at line 69 of  
> >> ResourceMigrationResolver
>
> >>        // Remove resources starting with a '.' (e.g. .svn, .cvs, etc)
> >>        CollectionUtils.filter(resources, new Predicate()
> >>        {
> >>            public boolean evaluate(Object object)
> >>            {
> >>                try {
> >>                    return !(((Resource)
> >> object).getFilename().startsWith(".") || (((Resource)
> >> object).getFile().isDirectory()));
> >>            } catch (IOException e)
> >>                {
> >>                    throw new MigrationException(e);
> >>                }
> >>            }
> >>        });
>
> >> On Thu, Aug 6, 2009 at 7:48 PM, browndar<darren.s.br...@gmail.com>  
> >> wrote:
>
> >> > Hi There,
>
> >> > Quick note.  the db migration tool is not compatible with the old  
> >> CVS
> >> > directory naming scheme.  So migrations will fail if there are any
> >> > files in the migrations dir other than files and dirs beginning  
> >> with a
> >> > dot.  First thought is filter out any resources that are  
> >> directories.
> >> > Second probably more elaborate than is worth it would be to allow  
> >> for
> >> > user specified filters.
>
> >> > Thanks very much.  Great tool and easy to use.
>
> >> > Take care,
>
> >> > Darren
>
> >> --
> >> Christian Nelson -- (e) cnel...@slac.com -- (m) 415-378-3988
>
> > --
> > Christian Nelson -- (e) cnel...@slac.com -- (m) 415-378-3988

Christian Nelson

unread,
Sep 1, 2009, 12:31:15 PM9/1/09
to c5-db-m...@googlegroups.com
Darren,

Why don't you give 0.9.8-rc1 (note the new groupId com.carbonfive.db-support) a whirl... it should work for you.  If not, let me know.

Thanks again for the patch and being patient.
Christian
Christian Nelson -- (e) cne...@slac.com -- (m) 415-378-3988

Darren Brown

unread,
Sep 1, 2009, 12:53:52 PM9/1/09
to c5-db-m...@googlegroups.com
Cool! I'll check it out asap. I had my own version of your code
going for me for the last couple weeks and it's been working out
pretty well. But I would love to not do that long term, so I look
forward to trying your guy out. Thanks so much!

Darren
Reply all
Reply to author
Forward
0 new messages