Re: svnignore?
On 12/29/2017 7:57 AM, Bo Berglund wrote: What is the equivalent of the CVS .cvsignore file? I have a lot of files that I don't want to get into the repository because they are only temporary files created by the compiler every time I do almost anything in the IDE. These are ignored when we use CVS by the use of a global cvsignore setting plus .cvsignore files in projects that need some more files ignored. My main cvsignore file has something like 40-50 entries.. I tried to study the svnbook on this matter but the closest I get is to use: svn propedit svn:ignore But this seems to be an exercise to be done on directory levels and my IDE creates a lot of directories that are not versioned to begin with... Is there no way to make a global setting on the client side such that the known files types will be ignored from svn? If it matters I use the SmartSvn program as a user interface on my development PC. It was recommended for users wanting a GUI interface like we had for CVS. Tell Subversion to ignore temporary files in a working copy by editing the "global-ignores" line in the file "config". On Windows systems this is in "AppData\Roaming\Subversion" within the user's home directory; on Linux systems this is in ".subversion" within the user's home directory. These are global per user, not per working copy. For example, my "global-ignores" line for Windows is: global-ignores = *.obj *.lib *.ciz *.map *.exe *.bak *.pdb *.ilk *.idb Note that these directories are not present for a given user until that person has run some Subversion command on the machine. "svn --version" should be enough. -- David Chapman dcchap...@acm.org Chapman Consulting -- San Jose, CA EDA Software Developer, Expert Witness www.chapman-consulting-sj.com
Re: svnignore?
On Dec 29, 2017, at 11:24, David Chapman wrote: > On 12/29/2017 7:57 AM, Bo Berglund wrote: >> What is the equivalent of the CVS .cvsignore file? >> >> I have a lot of files that I don't want to get into the repository >> because they are only temporary files created by the compiler every >> time I do almost anything in the IDE. These are ignored when we use >> CVS by the use of a global cvsignore setting plus .cvsignore files in >> projects that need some more files ignored. >> My main cvsignore file has something like 40-50 entries.. >> >> I tried to study the svnbook on this matter but the closest I get is >> to use: >> svn propedit svn:ignore >> But this seems to be an exercise to be done on directory levels and my >> IDE creates a lot of directories that are not versioned to begin >> with... >> Is there no way to make a global setting on the client side such that >> the known files types will be ignored from svn? >> >> If it matters I use the SmartSvn program as a user interface on my >> development PC. It was recommended for users wanting a GUI interface >> like we had for CVS. >> >> > > Tell Subversion to ignore temporary files in a working copy by editing the > "global-ignores" line in the file "config". On Windows systems this is in > "AppData\Roaming\Subversion" within the user's home directory; on Linux > systems this is in ".subversion" within the user's home directory. These are > global per user, not per working copy. > > For example, my "global-ignores" line for Windows is: > > global-ignores = *.obj *.lib *.ciz *.map *.exe *.bak *.pdb *.ilk *.idb > > Note that these directories are not present for a given user until that > person has run some Subversion command on the machine. "svn --version" > should be enough. As of Subversion 1.8, you can configure svn:global-ignores in the repository as well. http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html "Subversion 1.8 provides a more powerful version of the svn:ignore property, the svn:global-ignores property. Like the svn:ignore property,svn:global-ignores can only be set on a directory and contains file patterns Subversion uses to determine ignorable objects.[21] These ignore patterns are also appended to any patterns defined in the global-ignores runtime configuration option together with any svn:ignore defined patterns. Unlike svn:ignore however, the svn:global-ignores property is inheritable [22] and applies to all paths under the directory on which the property is set, not just the immediate children of the directory."
Re: svnignore?
On Fri, 29 Dec 2017 09:24:10 -0800, David Chapman wrote: >On 12/29/2017 7:57 AM, Bo Berglund wrote: >> Is there no way to make a global setting on the client side such that >> the known files types will be ignored from svn? >> > >Tell Subversion to ignore temporary files in a working copy by editing >the "global-ignores" line in the file "config". On Windows systems this >is in "AppData\Roaming\Subversion" within the user's home directory; on >Linux systems this is in ".subversion" within the user's home >directory. These are global per user, not per working copy. > >For example, my "global-ignores" line for Windows is: > >global-ignores = *.obj *.lib *.ciz *.map *.exe *.bak *.pdb *.ilk *.idb > OK, I found it in the location you specified! But if I add the content of my cvsignore file to the config file as a whitespace separated list on one line that line becomes VERY log (over 600 chars). Can I put the info in separate lines? And by the way the config file is organized in sections so one has to enter the data in the [miscellany] section. -- Bo Berglund Developer in Sweden
Re: svnignore?
On Fri, 29 Dec 2017 19:05:06 +0100, Bo Berglund wrote: >On Fri, 29 Dec 2017 09:24:10 -0800, David Chapman >wrote: >But if I add the content of my cvsignore file to the config file as a >whitespace separated list on one line that line becomes VERY log (over >600 chars). >Can I put the info in separate lines? > It turns out that enabling this option by removing the # character makes SmartSvn barf when I want to check out a project! So it is necessary also to remove all whitespace *before* the global-ignores text. After this whitespace is permissible. This is how my file looks now for ignores (the ignore globs are all on one line, the newsreader has added the line breaks): [miscellany] ### Set global-ignores to a set of whitespace-delimited globs ### which Subversion will ignore in its 'status' output, and ### while importing or adding files and directories. ### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'. global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.a *.aps *.bak *.BAK *.bpt *.bro *.bsc *.cdb *.cfg *.cgl *.class *.compiled *.clw *.db *.dbg *.dcu *.DCU *.ddp *.dsk *.dti *.err *.exp *.gid *.gz*.identcache *.ilk *.jar *.lnk *.local *.log *.lps *.lrt *.mod *.MOD *.ncb *.NCB *.ocx *.OPT *.opt *.pch *.pjt *.plg *.PLG *.pdb *.PDB *.ppu *.o *.obj *.OBJ *.or *.rsj *.rst *.sbr *.scc *.SID *.sln *.tar *.tds *.tlh*.tli *.trg *.vbw *.zip __history bak *.~* .#* I guess it is not valid to split the list on several lines in they config file? -- Bo Berglund Developer in Sweden
Re: svnignore?
On 12/29/2017 10:55 AM, Bo Berglund wrote: On Fri, 29 Dec 2017 19:05:06 +0100, Bo Berglund wrote: On Fri, 29 Dec 2017 09:24:10 -0800, David Chapman wrote: But if I add the content of my cvsignore file to the config file as a whitespace separated list on one line that line becomes VERY log (over 600 chars). Can I put the info in separate lines? It turns out that enabling this option by removing the # character makes SmartSvn barf when I want to check out a project! So it is necessary also to remove all whitespace *before* the global-ignores text. After this whitespace is permissible. This is how my file looks now for ignores (the ignore globs are all on one line, the newsreader has added the line breaks): [miscellany] ### Set global-ignores to a set of whitespace-delimited globs ### which Subversion will ignore in its 'status' output, and ### while importing or adding files and directories. ### '*' matches leading dots, e.g. '*.rej' matches '.foo.rej'. global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.a *.aps *.bak *.BAK *.bpt *.bro *.bsc *.cdb *.cfg *.cgl *.class *.compiled *.clw *.db *.dbg *.dcu *.DCU *.ddp *.dsk *.dti *.err *.exp *.gid *.gz*.identcache *.ilk *.jar *.lnk *.local *.log *.lps *.lrt *.mod *.MOD *.ncb *.NCB *.ocx *.OPT *.opt *.pch *.pjt *.plg *.PLG *.pdb *.PDB *.ppu *.o *.obj *.OBJ *.or *.rsj *.rst *.sbr *.scc *.SID *.sln *.tar *.tds *.tlh*.tli *.trg *.vbw *.zip __history bak *.~* .#* I guess it is not valid to split the list on several lines in they config file? I tried to use a backslash character as a line continuation for "global-ignores" and it did not work. Apparently you are stuck with a very long line here. I don't know if anyone else has complained about it or if an enhancement request would be seen favorably by the Subversion developers. You could shorten the line a bit by reducing the number of spaces between words, and on Windows the names should be case-insensitive so that you can remove entries that differ only in case. -- David Chapman dcchap...@acm.org Chapman Consulting -- San Jose, CA EDA Software Developer, Expert Witness www.chapman-consulting-sj.com
Re: svnignore?
On Dec 29, 2017, at 12:55, Bo Berglund wrote: > I guess it is not valid to split the list on several lines in they > config file? I've never heard of that being possible.
Re: svnignore?
Ryan Schmidt wrote on Fri, 29 Dec 2017 14:05 -0600: > > On Dec 29, 2017, at 12:55, Bo Berglund wrote: > > > I guess it is not valid to split the list on several lines in they > > config file? > > I've never heard of that being possible. It doesn't seem to be (to my surprise), but the following does work: [miscellany] gi1 = foo1 foo2 gi2 = bar1 bar2 global-ignores = %(gi1)s %(gi2)s That's equivalent to [miscellany] global-ignores = foo1 foo2 bar1 bar2 .
Re: svnignore?
On 30.12.2017 00:27, Daniel Shahaf wrote: > Ryan Schmidt wrote on Fri, 29 Dec 2017 14:05 -0600: >> On Dec 29, 2017, at 12:55, Bo Berglund wrote: >> >>> I guess it is not valid to split the list on several lines in they >>> config file? >> I've never heard of that being possible. > It doesn't seem to be (to my surprise), but the following does work: > > [miscellany] > gi1 = foo1 foo2 > gi2 = bar1 bar2 > global-ignores = %(gi1)s %(gi2)s > > That's equivalent to > > [miscellany] > global-ignores = foo1 foo2 bar1 bar2 > > . Yes and this also works: [miscellany] global-ignores = foo1 foo2 bar1 bar2 Note the space at the beginning of the continuation lines. The syntax of Subversion config files is compatible with https://docs.python.org/2/library/configparser.html -- Brane
Re: svnignore?
On 12/29/2017 8:56 PM, Branko Čibej wrote: On 30.12.2017 00:27, Daniel Shahaf wrote: Ryan Schmidt wrote on Fri, 29 Dec 2017 14:05 -0600: On Dec 29, 2017, at 12:55, Bo Berglund wrote: I guess it is not valid to split the list on several lines in they config file? I've never heard of that being possible. It doesn't seem to be (to my surprise), but the following does work: [miscellany] gi1 = foo1 foo2 gi2 = bar1 bar2 global-ignores = %(gi1)s %(gi2)s That's equivalent to [miscellany] global-ignores = foo1 foo2 bar1 bar2 . Yes and this also works: [miscellany] global-ignores = foo1 foo2 bar1 bar2 Note the space at the beginning of the continuation lines. The syntax of Subversion config files is compatible with https://docs.python.org/2/library/configparser.html Is this documented in The Book? I was looking at http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html today and it made no mention of this. -- David Chapman dcchap...@acm.org Chapman Consulting -- San Jose, CA EDA Software Developer, Expert Witness www.chapman-consulting-sj.com
Re: svnignore?
On 30.12.2017 06:23, David Chapman wrote: > On 12/29/2017 8:56 PM, Branko Čibej wrote: >> On 30.12.2017 00:27, Daniel Shahaf wrote: >>> Ryan Schmidt wrote on Fri, 29 Dec 2017 14:05 -0600: On Dec 29, 2017, at 12:55, Bo Berglund wrote: > I guess it is not valid to split the list on several lines in they > config file? I've never heard of that being possible. >>> It doesn't seem to be (to my surprise), but the following does work: >>> >>> [miscellany] >>> gi1 = foo1 foo2 >>> gi2 = bar1 bar2 >>> global-ignores = %(gi1)s %(gi2)s >>> >>> That's equivalent to >>> >>> [miscellany] >>> global-ignores = foo1 foo2 bar1 bar2 >>> >>> . >> Yes and this also works: >> >> [miscellany] >> global-ignores = >> foo1 foo2 >> bar1 bar2 >> >> >> Note the space at the beginning of the continuation lines. The syntax of >> Subversion config files is compatible with >> https://docs.python.org/2/library/configparser.html > > Is this documented in The Book? I was looking at > http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html > today and it made no mention of this. I don't know if it's documented. Omissions should be reported to the book authors, see the "Feedback/Contributing" section here: http://svnbook.red-bean.com/ -- Brane
Re: svnignore?
On Sat, 30 Dec 2017 05:56:17 +0100, Branko ?ibej wrote: > >Yes and this also works: > >[miscellany] >global-ignores = > foo1 foo2 > bar1 bar2 This is what I tried and failed because I did not realize that it is not enough to just remove the comment char from the template config file to activate a value line, one must remove everything before the identifier. It must start at column 1... >Note the space at the beginning of the continuation lines. The syntax of >Subversion config files is compatible with >https://docs.python.org/2/library/configparser.html So here the leading whitespace on continuation lines is 4 characters wide. It seems like the requirement is one or more leading spaces for a line to be recognized as a continuation. The example uses 4 space characters but afaict this example is legal (4, 2, 3 whitespace chars and a comment line): global-ignores = pop1 pop2 foo1 foo2 bar1 bar2 # Added these values too: chuck1 chuck2 -- Bo Berglund Developer in Sweden
Re: svnignore?
Bo Berglund wrote on Sat, 30 Dec 2017 08:51 +0100: > On Sat, 30 Dec 2017 05:56:17 +0100, Branko ?ibej > wrote: > > > > >Yes and this also works: > > > >[miscellany] > >global-ignores = > > foo1 foo2 > > bar1 bar2 Are you sure? I couldn't get continuation lines to take effect regardless of what I tried. (With/without text after the "=", with/without backslash, with single tab or single space at the start of the continuation line...)
Re: svnignore?
On 30.12.2017 09:31, Daniel Shahaf wrote: > Bo Berglund wrote on Sat, 30 Dec 2017 08:51 +0100: >> On Sat, 30 Dec 2017 05:56:17 +0100, Branko ?ibej >> wrote: >> >>> Yes and this also works: >>> >>> [miscellany] >>> global-ignores = >>> foo1 foo2 >>> bar1 bar2 > Are you sure? I couldn't get continuation lines to take effect > regardless of what I tried. (With/without text after the "=", > with/without backslash, with single tab or single space at the start of > the continuation line...) Don't know what you were trying but see parse_option() and parse_value_continuation_lines() in subversion/libsvn_subr/config_file.c. -- Brane
Re: svnignore?
Branko Čibej wrote on Sat, 30 Dec 2017 10:09 +0100: > Don't know what you were trying [[[ % cat ~/.subversion/config [miscellany] global-ignores = bar foo % touch foo bar ]]] > but see parse_option() and > parse_value_continuation_lines() in subversion/libsvn_subr/config_file.c. (lldb) p ctx->value->data (char *) $2 = 0x77e1d310 "bar oo" And if I «touch ./oo» then ./oo gets ignored and ./foo doesn't. We've got an off-by-one somewhere. Cheers, Daniel
Re: svnignore?
On Sat, 30 Dec 2017 08:31:05 +, Daniel Shahaf wrote: >Bo Berglund wrote on Sat, 30 Dec 2017 08:51 +0100: >> On Sat, 30 Dec 2017 05:56:17 +0100, Branko ?ibej >> wrote: >> >> > >> >Yes and this also works: >> > >> >[miscellany] >> >global-ignores = >> > foo1 foo2 >> > bar1 bar2 > >Are you sure? I couldn't get continuation lines to take effect >regardless of what I tried. (With/without text after the "=", >with/without backslash, with single tab or single space at the start of >the continuation line...) > I have now edited my file and it now looks as follows (actual line breaks): global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.a *.aps *.bak.clw *.db *.dbg *.dcu *.ddp *.dsk *.dti *.err *.exp *.gid *.gz *.identcache *.ilk *.jar *.lnk *.local *.log *.lps *.lrt *.mod *.ncb *.ocx *.opt *.pch *.pjt *.plg *.pdb *.ppu *.obj *.or *.rsj *.rst *.sbr *.scc *.sln *.tar *.tds *.tlh *.tli *.trg *.vbw *.zip __history bak *.~* .#* When I create a new file in a non-versioned directory with extension .jar (3rd continuation line above) then SmartSVN does not show it unless I change the display filter to show also ignored files. So I am pretty sure the local version does work with line continuation. -- Bo Berglund Developer in Sweden
Re: svnignore?
Bo Berglund wrote on Sat, 30 Dec 2017 11:25 +0100: > So I am pretty sure the local version does work with line > continuation. The bug exists only in 1.10 pre-releases; it doesn't exist in 1.9.x. You've found a regression. :-)