[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn add horkage (and exposing libsvn_wc's ignore functionality)

From: <epg_at_pretzelnet.org>
Date: 2003-01-22 23:41:37 CET

So i see svn add is now recursive by default. While it surprised
me at first since i wanted and expected non-recursive behavior,
this is probably how it should be. Most people probably want it
that way most of the time, and maybe i do too. However, i think
it is misbehaving:

0 ~% svn add thing
A thing
A thing/test
A thing/test/Makefile
A thing/test/Makefile.in
A thing/test/gettty.c
A thing/test/strings-memmove.c
A thing/.libs
A (bin) thing/.libs/librxvt.a
A thing/.libs/librxvt.lai
A thing/.libs/librxvt.la
A thing/graphics
A thing/graphics/Makefile
A thing/graphics/Makefile.in
A thing/graphics/README
A thing/graphics/data
A thing/graphics/grxlib.c
A thing/graphics/grxlib.h
A thing/graphics/qplot.c
A thing/command.c
A thing/command.h
A thing/defaultfont.c
A thing/defaultfont.h
A thing/feature.h
A thing/gcc-Wall
A thing/graphics.c
A thing/grkelot.c
A thing/grkelot.h
A thing/init.c
A thing/init.h
A thing/logging.c
A thing/logging.h
A thing/main.c
A thing/makeextprotos-awk
A thing/makeextprotos-sed
A thing/makeintprotos-awk
A thing/makeintprotos-sed
A thing/menubar.c
A thing/misc.c
A thing/menubar.h
A thing/netdisp.c
A thing/netdisp.h
A thing/protos.h
A thing/ptytty.c
A thing/rxvt.c
A thing/rxvt.h
A thing/rxvtgrx.h
A thing/rxvtlib.h.in
A thing/screen.c
A thing/scrollbar-next.c
A thing/scrollbar-rxvt.c
A thing/scrollbar-xterm.c
A thing/scrollbar.c
A thing/strings.c
A thing/version.h
A thing/xdefaults.c
A thing/xpm.c
A thing/Makefile
A thing/rxvtlib.h
A thing/logging.extpro
A thing/init.extpro
A thing/command.extpro
A thing/defaultfont.extpro
A thing/graphics.extpro
A thing/grkelot.extpro
A thing/menubar.extpro
A thing/main.extpro
A thing/netdisp.extpro
A thing/misc.extpro
A thing/scrollbar.extpro
A thing/ptytty.extpro
A thing/screen.extpro
A thing/.protos
A (bin) thing/rxvt.o
A thing/scrollbar-rxvt.extpro
A thing/scrollbar-next.extpro
A thing/scrollbar-xterm.extpro
A thing/strings.extpro
A thing/xdefaults.extpro
A thing/xpm.extpro
A (bin) thing/command.o
A thing/command.lo
A thing/command.intpro
A (bin) thing/defaultfont.o
A thing/defaultfont.intpro
A thing/defaultfont.lo
A (bin) thing/init.o
A thing/init.intpro
A thing/init.lo
A (bin) thing/graphics.o
A thing/graphics.intpro
A thing/graphics.lo
A thing/logging.intpro
A (bin) thing/main.o
A thing/main.intpro
A thing/main.lo
A (bin) thing/menubar.o
A thing/menubar.intpro
A thing/menubar.lo
A (bin) thing/misc.o
A thing/misc.intpro
A thing/misc.lo
A (bin) thing/netdisp.o
A thing/netdisp.intpro
A thing/netdisp.lo
A (bin) thing/ptytty.o
A thing/ptytty.intpro
A thing/ptytty.lo
A (bin) thing/screen.o
A thing/screen.intpro
A thing/screen.lo
A (bin) thing/scrollbar.o
A thing/scrollbar.intpro
A thing/scrollbar.lo
A (bin) thing/scrollbar-rxvt.o
A thing/scrollbar-rxvt.intpro
A thing/scrollbar-rxvt.lo
A (bin) thing/scrollbar-next.o
A thing/scrollbar-next.intpro
A thing/scrollbar-next.lo
A (bin) thing/xdefaults.o
A (bin) thing/scrollbar-xterm.o
A thing/scrollbar-xterm.intpro
A thing/scrollbar-xterm.lo
A thing/xdefaults.lo
A thing/xdefaults.intpro
A (bin) thing/xpm.o
A thing/xpm.intpro
A thing/xpm.lo
A thing/librxvt.la
A (bin) thing/rxvt
A thing/.indent.pro
A thing/Makefile.in

I have many of those files in global-ignores:

global-ignores = *.o *.lo *.la *.al .libs .so* .a #*# .*.rej *.rej .*~ *~ .#*

svn add should not add those files.

Well, i was going to have a patch with this message, but it looks
like the ignore functionality is completely hidden in libsvn_wc.
It looks like it was expected that only svn status would need
this functionality. At least some of it should be exposed.

I was going to add a test to see if the item is to be ignored in
libsvn_client/add.c:add_dir_recursive right after the check for
'.svn', '.', and '..'. But to do that i need a function like

Of course, another way to do it would be to have svn_wc_add call
get_default_ignores and check for this itself. But that seems
the wrong place to do it, to me. Furthermore, i still think
libsvn_wc should expose the ignore functionality. Even if it
turns out the svn program never does anything with it, other
clients may find it useful.

How does that sound?

Eric Gillespie, Jr. * epg@pretzelnet.org
Build a fire for a man, and he'll be warm for a day.  Set a man on
fire, and he'll be warm for the rest of his life. -Terry Pratchett
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:07:25 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.