You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "gary (guangyuan) sun" <ga...@yahoo.com> on 2007/07/24 15:00:16 UTC

I don't like the ".svn" directory name ...

Hi,

I like use .qvn as the name for the administrative
directory.

I follow the topic "I don't like the '.svn' directory
name ..." in Subversion FAQ to modify source code and
then recompile my client. It doesn't work becasue
there are many source codes don't use
SVN_WC_ADM_DIR_NAME, but use ".svn" directly. 

How can I handle the problem?

Gary Sun


       
____________________________________________________________________________________
Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
http://sims.yahoo.com/  

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: I don't like the ".svn" directory name ...

Posted by Matt Sickler <cr...@gmail.com>.
But you still didnt explain why you needed to change the
administrative dir to some other name.

On 7/27/07, gary (guangyuan) sun <ga...@yahoo.com> wrote:
> Jeremy,
>
> It works after I change
> ./subversion/libsvn_wc/adm_files.c:static const char
> default_adm_dir_name[] = ".qvn";
>
> Thanks
>
> Gary
>
>
> --- Jeremy Pereira <je...@jeremyp.net> wrote:
>
> >
> > On 25 Jul 2007, at 21:12, gary ((guangyuan)) sun
> > wrote:
> >
> > > Erik,
> > >
> > > I did try what the FAQ says many times to change
> > > svn_wc.h from
> > > #define SVN_WC_ADM_DIR_NAME   ".svn"
> > > to
> > > #define SVN_WC_ADM_DIR_NAME   ".qvn"
> > > and than recompile source. The administrative
> > > directory is still .svn,
> > >
> > > I grep .svn from source, and got some message
> > like:
> > >
> > > ./dist.sh:    if [ -d $DEP_PATH/.svn ]; then
> >
> > This is a script in the root directory for creating
> > a Subversion
> > distribution.  This has no impact on the subversion
> > binaries.
> >
> > > ./contrib/client-side/wcgrep:find $pathargs -regex
> > > ${WCGREP_IGNORE:-'.*~$\|.*/\.svn\(/\|$\)'} -prune
> > -o \
> > > ./contrib/client-side/svn_load_dirs.pl.in:  my
> > > $tmp_filename = ".svn/tmp/svn_load_dirs.$$";
> > > ./contrib/client-side/vc-svn.el:  (and
> > (file-exists-p
> > > (expand-file-name ".svn/entries"
> > > ./contrib/client-side/svnmerge.py:    return
> > > os.path.isdir(os.path.join(dir, ".svn")) or \
> > > ./contrib/client-side/wcgrep:find $pathargs -regex
> > > ${WCGREP_IGNORE:-'.*~$\|.*/\.svn\(/\|$\)'} -prune
> > -o \
> > >
> >
> ./contrib/client-side/svn_apply_autoprops.py:SVN_WC_ADM_DIR_NAME
> > > = '.svn'
> > > ./contrib/client-side/svn_load_dirs.pl.in:
> > >              '-x', '.svn',
> > > ./contrib/client-side/svn_load_dirs.pl.in:
> > unless
> > > (-d "$opt_existing_wc_dir/.svn")
> > > ./contrib/client-side/svnmerge.sh:    if [ -d "$1"
> > -a
> > > -d "$1/.svn" ]; then
> > > ./contrib/client-side/svnmerge.sh:[ -d
> > "${BRANCH_DIR}"
> > > -a -d "${BRANCH_DIR}/.svn" ] || \
> >
> > These are all contrib shell scripts.  These scripts
> > are all broken
> > with your qvn patch but they are not part of the
> > core product and
> > won't impact normal operation of subversion.
> >
> > >
> > >
> >
> ./subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/
> >
> > > tests/BasicTests.java:
> > >                client.isAdminDirectory(".svn");
> > > ./subversion/bindings/swig/python/svn_wc.c:{
> > > SWIG_PY_POINTER, (char*)"SVN_WC_ADM_DIR_NAME", 0,
> > 0,
> > > (void *)".svn", &SWIGTYPE_p_char},
> > > ./subversion/bindings/swig/python/svn_wc.c:
> > > PyDict_SetItemString(d,"SVN_WC_ADM_DIR_NAME",
> > > SWIG_FromCharPtr(".svn"));
> > > ./subversion/bindings/swig/ruby/svn_wc.c:
> > > rb_define_const(mWc,"SVN_WC_ADM_DIR_NAME",
> > > rb_str_new2(".svn"));
> > > ./subversion/bindings/swig/perl/native/svn_wc.c:{
> > > SWIG_STRING,  (char *) SWIG_prefix
> > > "SVN_WC_ADM_DIR_NAME", 0, 0, (void *)".svn", 0},
> >
> > These are all bindings to help you build Subversion
> > clients in other
> > programming languages.  Unless you are doing this,
> > you'll be OK.  If
> > you are using one of these other Subversion clients
> > e.g. the
> > Subclipse plugin can use JavaHL, that client is
> > likely broken.
> >
> >
> > > ./subversion/libsvn_subr/opt.c:          if (0 ==
> > > strcmp(base_name, ".svn")
> >
> > Looking at the code, I'd say this is a safety check
> > to make sure that
> > you don't accidentally put your administrative
> > directory in the
> > repository.  You need to change it thusly:
> >
> >            if (0 == strcmp(base_name, ".svn")
> >                || 0 == strcmp(base_name, "_svn")
> >             || 0 == strcmp (base_name, ".qvn"))
> >
> > If you have files called .svn or in a directory
> > called .svn that
> > you'd like to put under version control, you'll have
> > to remove the "0
> > == strcmp(base_name, ".svn") ||" part.
> >
> > Mind you, at this point, realising the dangers of
> > changing the admin
> > dir name I think I'd give up and put up with .svn.
> > Why do you need
> > to change it anyway?
> >
> >
> > > ./subversion/libsvn_wc/adm_files.c:static const
> > char
> > > default_adm_dir_name[] = ".svn";
> >
> > To me that looks like it should be changed to use
> > the macro.  I could
> > easily be wrong though.
> >
> > > ./subversion/libsvn_wc/update_editor.c:
> > > .svn/tmp/text-base/F.svn-base
> >
> > That's inside a comment
> >
> > >
> > > ./subversion/tests/cmdline/svntest/main.py:
> > return
> > > '.svn'
> > > ./tools/dev/stress.pl:      $File::Find::prune = 1
> > if
> > > $File::Find::name =~ m[/.svn];
> > > ./tools/dev/svn-dev.el:(defconst svn-adm-area
> > ".svn"
> > > ./tools/dev/svn-dev.el:(defconst svn-adm-entries
> > > ".svn/entries"
> >
> > These are in the test suite.  It's probably OK just
> > to change them
> > unless you are not going to run the tests in which
> > case, ignore them.
> >
> > >
> > > Do these mean something? Any idea what my problem
> > can
> > > be?
> > >
> > > Kind regards,
> > >
> > > Gary
> > >
> > >
> > >
> >
>
>
>
>
> ____________________________________________________________________________________
> Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
> http://sims.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: I don't like the ".svn" directory name ...

Posted by Jeremy Pereira <je...@jeremyp.net>.
On 25 Jul 2007, at 21:12, gary ((guangyuan)) sun wrote:

> Erik,
>
> I did try what the FAQ says many times to change
> svn_wc.h from
> #define SVN_WC_ADM_DIR_NAME   ".svn"
> to
> #define SVN_WC_ADM_DIR_NAME   ".qvn"
> and than recompile source. The administrative
> directory is still .svn,
>
> I grep .svn from source, and got some message like:
>
> ./dist.sh:    if [ -d $DEP_PATH/.svn ]; then

This is a script in the root directory for creating a Subversion  
distribution.  This has no impact on the subversion binaries.

> ./contrib/client-side/wcgrep:find $pathargs -regex
> ${WCGREP_IGNORE:-'.*~$\|.*/\.svn\(/\|$\)'} -prune -o \
> ./contrib/client-side/svn_load_dirs.pl.in:  my
> $tmp_filename = ".svn/tmp/svn_load_dirs.$$";
> ./contrib/client-side/vc-svn.el:  (and (file-exists-p
> (expand-file-name ".svn/entries"
> ./contrib/client-side/svnmerge.py:    return
> os.path.isdir(os.path.join(dir, ".svn")) or \
> ./contrib/client-side/wcgrep:find $pathargs -regex
> ${WCGREP_IGNORE:-'.*~$\|.*/\.svn\(/\|$\)'} -prune -o \
> ./contrib/client-side/svn_apply_autoprops.py:SVN_WC_ADM_DIR_NAME
> = '.svn'
> ./contrib/client-side/svn_load_dirs.pl.in:
>              '-x', '.svn',
> ./contrib/client-side/svn_load_dirs.pl.in:    unless
> (-d "$opt_existing_wc_dir/.svn")
> ./contrib/client-side/svnmerge.sh:    if [ -d "$1" -a
> -d "$1/.svn" ]; then
> ./contrib/client-side/svnmerge.sh:[ -d "${BRANCH_DIR}"
> -a -d "${BRANCH_DIR}/.svn" ] || \

These are all contrib shell scripts.  These scripts are all broken  
with your qvn patch but they are not part of the core product and  
won't impact normal operation of subversion.

>
> ./subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/ 
> tests/BasicTests.java:
>                client.isAdminDirectory(".svn");
> ./subversion/bindings/swig/python/svn_wc.c:{
> SWIG_PY_POINTER, (char*)"SVN_WC_ADM_DIR_NAME", 0, 0,
> (void *)".svn", &SWIGTYPE_p_char},
> ./subversion/bindings/swig/python/svn_wc.c:
> PyDict_SetItemString(d,"SVN_WC_ADM_DIR_NAME",
> SWIG_FromCharPtr(".svn"));
> ./subversion/bindings/swig/ruby/svn_wc.c:
> rb_define_const(mWc,"SVN_WC_ADM_DIR_NAME",
> rb_str_new2(".svn"));
> ./subversion/bindings/swig/perl/native/svn_wc.c:{
> SWIG_STRING,  (char *) SWIG_prefix
> "SVN_WC_ADM_DIR_NAME", 0, 0, (void *)".svn", 0},

These are all bindings to help you build Subversion clients in other  
programming languages.  Unless you are doing this, you'll be OK.  If  
you are using one of these other Subversion clients e.g. the  
Subclipse plugin can use JavaHL, that client is likely broken.


> ./subversion/libsvn_subr/opt.c:          if (0 ==
> strcmp(base_name, ".svn")

Looking at the code, I'd say this is a safety check to make sure that  
you don't accidentally put your administrative directory in the  
repository.  You need to change it thusly:

           if (0 == strcmp(base_name, ".svn")
               || 0 == strcmp(base_name, "_svn")
	      || 0 == strcmp (base_name, ".qvn"))

If you have files called .svn or in a directory called .svn that  
you'd like to put under version control, you'll have to remove the "0  
== strcmp(base_name, ".svn") ||" part.

Mind you, at this point, realising the dangers of changing the admin  
dir name I think I'd give up and put up with .svn.  Why do you need  
to change it anyway?


> ./subversion/libsvn_wc/adm_files.c:static const char
> default_adm_dir_name[] = ".svn";

To me that looks like it should be changed to use the macro.  I could  
easily be wrong though.

> ./subversion/libsvn_wc/update_editor.c:
> .svn/tmp/text-base/F.svn-base

That's inside a comment

>
> ./subversion/tests/cmdline/svntest/main.py:    return
> '.svn'
> ./tools/dev/stress.pl:      $File::Find::prune = 1 if
> $File::Find::name =~ m[/.svn];
> ./tools/dev/svn-dev.el:(defconst svn-adm-area ".svn"
> ./tools/dev/svn-dev.el:(defconst svn-adm-entries
> ".svn/entries"

These are in the test suite.  It's probably OK just to change them  
unless you are not going to run the tests in which case, ignore them.

>
> Do these mean something? Any idea what my problem can
> be?
>
> Kind regards,
>
> Gary
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: I don't like the ".svn" directory name ...

Posted by "gary (guangyuan) sun" <ga...@yahoo.com>.
Erik,

I did try what the FAQ says many times to change
svn_wc.h from
#define SVN_WC_ADM_DIR_NAME   ".svn"
to
#define SVN_WC_ADM_DIR_NAME   ".qvn"
and than recompile source. The administrative
directory is still .svn, 

I grep .svn from source, and got some message like:

./dist.sh:    if [ -d $DEP_PATH/.svn ]; then
./contrib/client-side/wcgrep:find $pathargs -regex
${WCGREP_IGNORE:-'.*~$\|.*/\.svn\(/\|$\)'} -prune -o \
./contrib/client-side/svn_load_dirs.pl.in:  my
$tmp_filename = ".svn/tmp/svn_load_dirs.$$";
./contrib/client-side/vc-svn.el:  (and (file-exists-p
(expand-file-name ".svn/entries"
./contrib/client-side/svnmerge.py:    return
os.path.isdir(os.path.join(dir, ".svn")) or \
./contrib/client-side/wcgrep:find $pathargs -regex
${WCGREP_IGNORE:-'.*~$\|.*/\.svn\(/\|$\)'} -prune -o \
./contrib/client-side/svn_apply_autoprops.py:SVN_WC_ADM_DIR_NAME
= '.svn'
./contrib/client-side/svn_load_dirs.pl.in:            
             '-x', '.svn',
./contrib/client-side/svn_load_dirs.pl.in:    unless
(-d "$opt_existing_wc_dir/.svn")
./contrib/client-side/svnmerge.sh:    if [ -d "$1" -a
-d "$1/.svn" ]; then
./contrib/client-side/svnmerge.sh:[ -d "${BRANCH_DIR}"
-a -d "${BRANCH_DIR}/.svn" ] || \

./subversion/bindings/java/javahl/src/org/tigris/subversion/javahl/tests/BasicTests.java:
               client.isAdminDirectory(".svn");
./subversion/bindings/swig/python/svn_wc.c:{
SWIG_PY_POINTER, (char*)"SVN_WC_ADM_DIR_NAME", 0, 0,
(void *)".svn", &SWIGTYPE_p_char},
./subversion/bindings/swig/python/svn_wc.c:   
PyDict_SetItemString(d,"SVN_WC_ADM_DIR_NAME",
SWIG_FromCharPtr(".svn"));
./subversion/bindings/swig/ruby/svn_wc.c:   
rb_define_const(mWc,"SVN_WC_ADM_DIR_NAME",
rb_str_new2(".svn"));
./subversion/bindings/swig/perl/native/svn_wc.c:{
SWIG_STRING,  (char *) SWIG_prefix
"SVN_WC_ADM_DIR_NAME", 0, 0, (void *)".svn", 0},
./subversion/libsvn_subr/opt.c:          if (0 ==
strcmp(base_name, ".svn")
./subversion/libsvn_wc/adm_files.c:static const char
default_adm_dir_name[] = ".svn";
./subversion/libsvn_wc/update_editor.c:          
.svn/tmp/text-base/F.svn-base

./subversion/tests/cmdline/svntest/main.py:    return
'.svn'
./tools/dev/stress.pl:      $File::Find::prune = 1 if
$File::Find::name =~ m[/.svn];
./tools/dev/svn-dev.el:(defconst svn-adm-area ".svn"
./tools/dev/svn-dev.el:(defconst svn-adm-entries
".svn/entries"

Do these mean something? Any idea what my problem can
be?

Kind regards, 

Gary



--- Erik Huelsmann <eh...@gmail.com> wrote:

> [General note: Please stay on the list, others may
> benefit from this
> discussion or even contribute to it]
> 
> On 7/24/07, gary (guangyuan) sun
> <ga...@yahoo.com> wrote:
> > Erik,
> >
> > Thanks for you quick response.
> >
> >  I download source code subversion-1.4.4.tar.gz
> and
> > subversion-deps-1.4.4.tar.gz from Tigris.org to my
> Red
> > Hat Linux machine.
> >
> > When I grep '\.svn' or '\.svn/'  , I view many
> files.
> 
> Well, that certainly doesn't mean anything by
> itself. Did you try what
> the FAQ says and encounter problems? That FAQ is
> there for a number of
> years now and I've never heard of any problems with
> it.
> 
> Just for fun I did the same grep and took a closer
> look at the
> matching files in subversion/libsvn_ra_serf/*.c:
> they contain a
> mime-specifier "application/vnd.svn-svndiff". You
> definitely don't
> want to replace that with your own specifier.
> 
> HTH,
> 
> Erik.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail:
> users-help@subversion.tigris.org
> 
> 



      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: I don't like the ".svn" directory name ...

Posted by Erik Huelsmann <eh...@gmail.com>.
[General note: Please stay on the list, others may benefit from this
discussion or even contribute to it]

On 7/24/07, gary (guangyuan) sun <ga...@yahoo.com> wrote:
> Erik,
>
> Thanks for you quick response.
>
>  I download source code subversion-1.4.4.tar.gz and
> subversion-deps-1.4.4.tar.gz from Tigris.org to my Red
> Hat Linux machine.
>
> When I grep '\.svn' or '\.svn/'  , I view many files.

Well, that certainly doesn't mean anything by itself. Did you try what
the FAQ says and encounter problems? That FAQ is there for a number of
years now and I've never heard of any problems with it.

Just for fun I did the same grep and took a closer look at the
matching files in subversion/libsvn_ra_serf/*.c: they contain a
mime-specifier "application/vnd.svn-svndiff". You definitely don't
want to replace that with your own specifier.

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: I don't like the ".svn" directory name ...

Posted by Erik Huelsmann <eh...@gmail.com>.
On 7/24/07, gary (guangyuan) sun <ga...@yahoo.com> wrote:
> Hi,
>
> I like use .qvn as the name for the administrative
> directory.
>
> I follow the topic "I don't like the '.svn' directory
> name ..." in Subversion FAQ to modify source code and
> then recompile my client. It doesn't work becasue
> there are many source codes don't use
> SVN_WC_ADM_DIR_NAME, but use ".svn" directly.
>
> How can I handle the problem?

That source isn't located in the Subversion source base, is it?
Otherwise, please submit a patch, because it's a bug (but I seriously
doubt that).

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org