Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on September 12, 2014, 05:03:09 pm

Title: Can any dev look at the file ccmanager.h
Post by: ollydbg on September 12, 2014, 05:03:09 pm
I see it has mixed EOL in the file, can you confirm this? If so, it should be fixed. Thanks.
Title: Re: Can any dev look at the file ccmanager.h
Post by: stahta01 on September 12, 2014, 05:30:45 pm
Confirmed around the prototype for void CallSmartIndentCCDone(cbEditor* ed);

Edit: Based on my other CPP files; it is correct right before and after CallSmartIndentCCDone prototype and the rest of the file is wrong.
I am on a Windows 7 system.

On SVN trunk 9916.

Edit2: Looks like file is missing svn:eol-style of native like most other headers have set.

Tim S.
Title: Re: Can any dev look at the file ccmanager.h
Post by: stahta01 on September 28, 2014, 08:48:09 pm
I think the SVN commands on windows to fix this problem is:

Code
    unix2dos "src/include/ccmanager.h"
    svn propset svn:eol-style native src/include/ccmanager.h

Followed by a SVN Commit, of course.

Code
Index: src/include/ccmanager.h
===================================================================
--- src/include/ccmanager.h (revision 9927)
+++ src/include/ccmanager.h (working copy)

Property changes on: src/include/ccmanager.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property

Tim S.
 
Title: Re: Can any dev look at the file ccmanager.h
Post by: ollydbg on September 29, 2014, 02:52:11 am
Hi, Tim, thanks.
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)
Title: Re: Can any dev look at the file ccmanager.h
Post by: stahta01 on September 29, 2014, 02:59:41 am
Hi, Tim, thanks.
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)

While I know SVN much better than I know Git; I would only call my status as early intermediate skill level. You would likely need a expert to confirm that there is a way or is not a way to do it for a folder or file type.

Tim S.
Title: Re: Can any dev look at the file ccmanager.h
Post by: MortenMacFly on September 29, 2014, 07:59:02 am
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)
I think you wouldn't want to handle EOL blindly for files in a folder probably even recursively. It makes me wonder that GIT allows you to do so... ???
Title: Re: Can any dev look at the file ccmanager.h
Post by: ollydbg on September 29, 2014, 09:03:38 am
I have just commit the change. An idea way of setting EOL property is that we can set the EOL for all the .h and .cpp files in a folder, so that we don't need to set those EOL property for each single files. Not sure SVN can do this.  :)
I think you wouldn't want to handle EOL blindly for files in a folder probably even recursively. It makes me wonder that GIT allows you to do so... ???
I'm not an git export, but it looks like git can set EOL depend on file extension, see:
gitattributes(5) (https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html)
Quote
End-of-line conversion

While git normally leaves file contents alone, it can be configured to normalize line endings to LF in the repository and, optionally, to convert them to CRLF when files are checked out.

Here is an example that will make git normalize .txt, .vcproj and .sh files, ensure that .vcproj files have CRLF and .sh files have LF in the working directory, and prevent .jpg files from being normalized regardless of their content.

*.txt           text
*.vcproj        eol=crlf
*.sh            eol=lf
*.jpg           -text

Title: Re:
Post by: MortenMacFly on September 29, 2014, 09:31:00 pm
Oh well yes, that makes sense.I thought it would be on a plain folder...