You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Gillespie <ep...@pretzelnet.org> on 2002/12/11 00:57:03 UTC

Default global-ignores setting

The default global-ignores setting has '*.rej' and '*~', but not
'.*.rej' and '.*~'.  Can these be added to the default so that
backup and diff rejects for dotfiles are also ignored?  I have
fixed it in my .subversion/config, but this ought to be the
default IMO.

-- 
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

Re: Default global-ignores setting

Posted by cm...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:

> cmpilato@collab.net writes:
> 
> > > I don't know whether the regression tests will pass if this is done,
> > > which is what makes the task more than trivial.  Ideally the tests
> > > would pass whatever I have in my config file, but at the very least I
> > > would want them to pass if I have no global_ignores in my config file.
> > 
> > Our 'svn' binary should probably accept a --default-config option that
> > reverts its supposed config state to what it would be in the absence
> > of a configuration file.
> 
> Or a "--config-dir DIR" option that lets us change the config dir to
> one generated by the test suite.

Still better.  That way we can test the config stuff itself.

Philip Martin for Global Potentate!
Philip Martin for Global Potentate!
Philip Martin for ...

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

Re: Default global-ignores setting

Posted by Philip Martin <ph...@codematters.co.uk>.
cmpilato@collab.net writes:

> > I don't know whether the regression tests will pass if this is done,
> > which is what makes the task more than trivial.  Ideally the tests
> > would pass whatever I have in my config file, but at the very least I
> > would want them to pass if I have no global_ignores in my config file.
> 
> Our 'svn' binary should probably accept a --default-config option that
> reverts its supposed config state to what it would be in the absence
> of a configuration file.

Or a "--config-dir DIR" option that lets us change the config dir to
one generated by the test suite.

-- 
Philip Martin

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

Re: Default global-ignores setting

Posted by cm...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:

> > This patch is incomplete.  The default values written to the config
> > file should also be changed to reflect these same additions.
> 
> I was thinking of a patch to remove the hard-coded default, and to
> update the config file template.

That would indeed be the better change.

> I don't know whether the regression tests will pass if this is done,
> which is what makes the task more than trivial.  Ideally the tests
> would pass whatever I have in my config file, but at the very least I
> would want them to pass if I have no global_ignores in my config file.

Our 'svn' binary should probably accept a --default-config option that
reverts its supposed config state to what it would be in the absence
of a configuration file.

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

Re: Default global-ignores setting

Posted by Philip Martin <ph...@codematters.co.uk>.
cmpilato@collab.net writes:

> Eric Gillespie <ep...@pretzelnet.org> writes:
> 
> > <br...@xbc.nu> writes:
> > 
> > > Not so. It's not only about editing files, it's also about unit testing
> > > the chantes to make sure that they actually work. If you come up with a
> > > patch, and a description of how you tested it, that can save other
> > > people a lot of time. Really.
> > 
> > Index: subversion/libsvn_wc/status.c
> > ===================================================================
> > --- subversion/libsvn_wc/status.c	(revision 4007)
> > +++ subversion/libsvn_wc/status.c	(working copy)
> > @@ -45,7 +45,7 @@
> >  
> >    SVN_ERR (svn_config_read_config (&cfg, pool));
> >    svn_config_get (cfg, &val, "miscellany", "global_ignores", 
> > -                  "*.o *.lo *.la #*# *.rej *~ .#*");
> > +                  "*.o *.lo *.la #*# *.rej .*.rej *~ .*~ .#*");
> >    *patterns = apr_array_make (pool, 4, sizeof (const char *));
> >    svn_cstring_split_append (*patterns, val, "\n\r\t\v ", FALSE, pool);
> 
> This patch is incomplete.  The default values written to the config
> file should also be changed to reflect these same additions.

I was thinking of a patch to remove the hard-coded default, and to
update the config file template.

I don't know whether the regression tests will pass if this is done,
which is what makes the task more than trivial.  Ideally the tests
would pass whatever I have in my config file, but at the very least I
would want them to pass if I have no global_ignores in my config file.

-- 
Philip Martin

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

Re: Default global-ignores setting

Posted by Eric Gillespie <ep...@pretzelnet.org>.
cmpilato@collab.net writes:

> This patch is incomplete.  The default values written to the config
> file should also be changed to reflect these same additions.

No, i just diffed the wrong file.  Whoops!

* subversion/libsvn_subr/config_file.c:
  (svn_config_ensure): Add .*.rej and .*~ patterns to the
  default global_ignores setting; *.rej and *~ do not match
  files that begin with a . ("hidden" files).

Index: subversion/libsvn_subr/config_file.c
===================================================================
--- subversion/libsvn_subr/config_file.c	(revision 4007)
+++ subversion/libsvn_subr/config_file.c	(working copy)
@@ -772,7 +772,7 @@
         "###   default, this value is '*.o *.lo *.la #*# *.rej *~ .#*'. \n"
         "###   To turn off global ignores, simply set the value to be\n"
         "###   empty (as in \"global_ignores = \").\n"
-        "# global_ignores = *.o *.lo *.la #*# *.rej *~ .#*"
+        "# global_ignores = *.o *.lo *.la #*# *.rej .*.rej *~ .*~ .#*"
         "\n"
         "### Set compression to 'no' to avoid compressing requests\n"
         "###   to a DAV-enabled Subversion server.  It defaults to 'yes'.\n"   



--  
Eric Gillespie <*> 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

Re: Default global-ignores setting

Posted by cm...@collab.net.
Eric Gillespie <ep...@pretzelnet.org> writes:

> <br...@xbc.nu> writes:
> 
> > Not so. It's not only about editing files, it's also about unit testing
> > the chantes to make sure that they actually work. If you come up with a
> > patch, and a description of how you tested it, that can save other
> > people a lot of time. Really.
> 
> Index: subversion/libsvn_wc/status.c
> ===================================================================
> --- subversion/libsvn_wc/status.c	(revision 4007)
> +++ subversion/libsvn_wc/status.c	(working copy)
> @@ -45,7 +45,7 @@
>  
>    SVN_ERR (svn_config_read_config (&cfg, pool));
>    svn_config_get (cfg, &val, "miscellany", "global_ignores", 
> -                  "*.o *.lo *.la #*# *.rej *~ .#*");
> +                  "*.o *.lo *.la #*# *.rej .*.rej *~ .*~ .#*");
>    *patterns = apr_array_make (pool, 4, sizeof (const char *));
>    svn_cstring_split_append (*patterns, val, "\n\r\t\v ", FALSE, pool);

This patch is incomplete.  The default values written to the config
file should also be changed to reflect these same additions.

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

Re: Default global-ignores setting

Posted by Branko Čibej <br...@xbc.nu>.
Eric Gillespie wrote:

><br...@xbc.nu> writes:
>
>  
>
>>Not so. It's not only about editing files, it's also about unit testing
>>the chantes to make sure that they actually work. If you come up with a
>>patch, and a description of how you tested it, that can save other
>>people a lot of time. Really.
>>    
>>
>
>Index: subversion/libsvn_wc/status.c
>===================================================================
>--- subversion/libsvn_wc/status.c	(revision 4007)
>+++ subversion/libsvn_wc/status.c	(working copy)
>@@ -45,7 +45,7 @@
> 
>   SVN_ERR (svn_config_read_config (&cfg, pool));
>   svn_config_get (cfg, &val, "miscellany", "global_ignores", 
>-                  "*.o *.lo *.la #*# *.rej *~ .#*");
>+                  "*.o *.lo *.la #*# *.rej .*.rej *~ .*~ .#*");
>   *patterns = apr_array_make (pool, 4, sizeof (const char *));
>   svn_cstring_split_append (*patterns, val, "\n\r\t\v ", FALSE, pool);
>

And the log message is? :-)

Maybe you think I'm nitpicking here, but writing a log message takes
time, even a trivial one. Please, help us make the patch submission
process smoother by following the rules. They're there for a purpose.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: Default global-ignores setting

Posted by Eric Gillespie <ep...@pretzelnet.org>.
<br...@xbc.nu> writes:

> Not so. It's not only about editing files, it's also about unit testing
> the chantes to make sure that they actually work. If you come up with a
> patch, and a description of how you tested it, that can save other
> people a lot of time. Really.

Index: subversion/libsvn_wc/status.c
===================================================================
--- subversion/libsvn_wc/status.c	(revision 4007)
+++ subversion/libsvn_wc/status.c	(working copy)
@@ -45,7 +45,7 @@
 
   SVN_ERR (svn_config_read_config (&cfg, pool));
   svn_config_get (cfg, &val, "miscellany", "global_ignores", 
-                  "*.o *.lo *.la #*# *.rej *~ .#*");
+                  "*.o *.lo *.la #*# *.rej .*.rej *~ .*~ .#*");
   *patterns = apr_array_make (pool, 4, sizeof (const char *));
   svn_cstring_split_append (*patterns, val, "\n\r\t\v ", FALSE, pool);
 


--  
Eric Gillespie <*> 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

Re: Default global-ignores setting

Posted by Branko Čibej <br...@xbc.nu>.
Eric Gillespie wrote:

>Philip Martin <ph...@codematters.co.uk> writes:
>
>  
>
>>Care to submit a patch :)
>>    
>>
>
>Er, what's the point?  It takes you just as long to make the
>change as apply the patch.  You just add a few characters to the
>string in subversion/libsvn_wc/status.c:get_default_ignores.
>  
>
Not so. It's not only about editing files, it's also about unit testing
the chantes to make sure that they actually work. If you come up with a
patch, and a description of how you tested it, that can save other
people a lot of time. Really.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: Default global-ignores setting

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Philip Martin <ph...@codematters.co.uk> writes:

> Care to submit a patch :)

Er, what's the point?  It takes you just as long to make the
change as apply the patch.  You just add a few characters to the
string in subversion/libsvn_wc/status.c:get_default_ignores.

--  
Eric Gillespie <*> 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

Re: Default global-ignores setting

Posted by Philip Martin <ph...@codematters.co.uk>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> Sussman set me straight.  The plan is to remove the hard-coded
> default and make sure the generated .subversion/config has this
> entry *uncommented* instead of commented as it is now.
> 
> > Even if it is, the code that writes out the default config file
> > needs to include these two patterns.
> 
> This still stands.

Care to submit a patch :)

-- 
Philip Martin

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

Re: Default global-ignores setting

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> 
> > I believe the plan is to remove the hard-coded default
> > altogether.
> 
> Oof, i hope not.

Sussman set me straight.  The plan is to remove the hard-coded
default and make sure the generated .subversion/config has this
entry *uncommented* instead of commented as it is now.

> Even if it is, the code that writes out the default config file
> needs to include these two patterns.

This still stands.

--  
Eric Gillespie <*> 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

Re: Default global-ignores setting

Posted by Eric Gillespie <ep...@pretzelnet.org>.
Philip Martin <ph...@codematters.co.uk> writes:

> I believe the plan is to remove the hard-coded default
> altogether.

Oof, i hope not.  Even if it is, the code that writes out the
default config file needs to include these two patterns.

--  
Eric Gillespie <*> 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

Re: Default global-ignores setting

Posted by Philip Martin <ph...@codematters.co.uk>.
Eric Gillespie <ep...@pretzelnet.org> writes:

> The default global-ignores setting has '*.rej' and '*~', but not
> '.*.rej' and '.*~'.  Can these be added to the default so that
> backup and diff rejects for dotfiles are also ignored?  I have
> fixed it in my .subversion/config, but this ought to be the
> default IMO.

I believe the plan is to remove the hard-coded default altogether.

-- 
Philip Martin

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