Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#172 CVSIGnore how to use

open
nobody
None
5
2014-07-10
2012-07-11
Hongning
No

This is not a bug , but there is not much documentation on the cvsignore checklist, how do you use it. Can it be used so that you could give a directory list to ignore?

Discussion

  • Joachim Eibl
    Joachim Eibl
    2012-07-11

    When checking cvsignore several antipatterns are added
    - from a .cvsignore file in the same directory,
    - from the .cvsignore file in the home directory,
    - from the CVSIGNORE environment variable,
    - and from this list
    ". .. core RCSLOG tags TAGS RCS SCCS .make.state "
    ".nse_depinfo # .# cvslog. , CVS CVS.adm .del- .a .olb .o .obj "
    "
    .so .Z ~ .old .elc .ln .bak .BAK .orig .rej .exe _$ $"
    The patterns match both files and directories and work in addition to other file and directory antipatterns.
    Joachim

     
  • NetVicious
    NetVicious
    2014-07-08

    For me don't works as defined.

    The patterns need to be in a new line each one, separated by a space or tab ?

     
  • NetVicious
    NetVicious
    2014-07-10

    Hi!

    Looking on the source fileaccess.cpp the parsing of the cvsignore it's as this:

    • These are ALWAYS ignored: . .. core RCSLOG tags TAGS RCS SCCS .make.state .nse_depinfo #* .#* cvslog.* ,* CVS CVS.adm .del-* *.a *.olb *.o *.obj *.so *.Z *~ *.old *.elc *.ln *.bak *.BAK *.orig *.rej *.exe _$* *$"

    Note: The same list was posted by Joachin in the first post of this thread but SourceForge editor eats * if you don't escapes they when writing on the editor.

    • The .cvsignore file on the home directory of the user. Expressions should be separated by a space
    • The CVSIGNORE environment variable. Expressions should be separated by a space
    • The .cvsignore file on the current folder of the comparison. The expressions on THIS file could be on a single line or in multiple lines (each one with only one expression of with more than one separated by spaces or tabs).

    For ignore all files with the log extension you should write *.log as expression. You could use the ? metacharacter too.

    If you have a .cvsignore on a descendant folder it's expressions will override all the expressions writed on the parents folders .cvsignore files.

    Example. The * mark means it has a .csvignore file

    • A (*)
      • B (*)
        • C (*)
      • D

    On the D folder will act the A/.cvsignore
    On the C folder will act ONLY ITS .cvsignore (path A/B/C/.cvsignore), the expressions on B or A folder won't be used.
    On the B folder will act ONLY ITS .cvsignore. Ignoring the A one.
    On the A folder will act ITS .cvsignore

    The result of the .cvsignore files acts like the file doesn't exists on the file system. So if you're comparing two folders and the files are in both folders you need to create the .cvsignore file in both folders to full ignore it files.

    Now it seems to work for me ;-)

     
    Last edit: NetVicious 2014-07-10