Re: [opensource-dev] Help prevent DOS line endings...

2011-02-02 Thread Oz Linden (Scott Lawrence)
On 2011-02-01 15:33, Discrete Dreamscape wrote:
 Possible cover-all solution: use Mercurial's eol extension. It's 
 worked pretty well for me so far, and handily autofixed all the DOS 
 endings in a particular fork I looked at in one go. It works much like 
 the autoprops configuration does in Subversion; hopefully with less pain.

 Enable it (should be included by default in all recent versions, dunno 
 about Tortoise) by adding the following section and options to your 
 system-wide or repo-local .hgrc file:

 [extensions]
 eol =

 Then add a .hgeol file to the root of the repository (it can be 
 versioned and thus easily distributed!), and fill it with whatever 
 standard Mercurial pattern entries are needed, like so:

 [patterns]
 **.py = native
 **.txt = native
 **.h = native
 **.cpp = native
 **Makefile = LF

 As soon as this file exists and the extension is active for you, 
 further hg commands will immediately treat any non-conforming 
 line-endings as modifications to your current working copy. Hope this 
 is helpful; if so, it could be added to that page as well.

I considered adding that, but didn't know whether some of the 
windows-specific files might be broken by it (if so, they too could be 
configured).   Does anyone know?

Could always put this into a test repo and run a TeamCity build
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] Help prevent DOS line endings...

2011-02-02 Thread Discrete Dreamscape
This is from the help page on the extension:


The optional [repository] section specifies the line endings to use for
files stored
in the repository. It has a single setting, native, which determines the
storage line
endings for files declared as native in the [patterns] section. It can
be set to
LF or CRLF. The default is LF. For example, this means that on
Windows, files
configured as native (CRLF by default) will be converted to LF when
stored in the
repository. Files declared as LF, CRLF, or BIN in the [patterns]
section are
always stored as-is in the repository.

Example versioned .hgeol file:

  [patterns]
  **.py = native
  **.vcproj = CRLF
  **.txt = native
  Makefile = LF
  **.jpg = BIN

  [repository]
  native = LF


So if a file pattern is specifically declared to have Windows line-endings,
it should remain that way for everyone and in the repository.. probably
worth some quick testing.


Discrete


On Wed, Feb 2, 2011 at 3:06 PM, Oz Linden (Scott Lawrence) o...@lindenlab.com
 wrote:

 On 2011-02-01 15:33, Discrete Dreamscape wrote:

 Possible cover-all solution: use Mercurial's eol extension. It's worked
 pretty well for me so far, and handily autofixed all the DOS endings in a
 particular fork I looked at in one go. It works much like the autoprops
 configuration does in Subversion; hopefully with less pain.

 Enable it (should be included by default in all recent versions, dunno
 about Tortoise) by adding the following section and options to your
 system-wide or repo-local .hgrc file:

 [extensions]
 eol =

 Then add a .hgeol file to the root of the repository (it can be
 versioned and thus easily distributed!), and fill it with whatever standard
 Mercurial pattern entries are needed, like so:

 [patterns]
 **.py = native
 **.txt = native
 **.h = native
 **.cpp = native
 **Makefile = LF

 As soon as this file exists and the extension is active for you, further
 hg commands will immediately treat any non-conforming line-endings as
 modifications to your current working copy. Hope this is helpful; if so, it
 could be added to that page as well.


 I considered adding that, but didn't know whether some of the
 windows-specific files might be broken by it (if so, they too could be
 configured).   Does anyone know?

 Could always put this into a test repo and run a TeamCity build

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Help prevent DOS line endings...

2011-02-01 Thread Celierra Darling
For those that have already followed the instructions there - the coding
standard says to prefer tabs, not spaces, which is the opposite of what the
page was instructing until just now.

Celi


On Tue, Feb 1, 2011 at 7:35 AM, Oz Linden (Scott Lawrence) o...@lindenlab.com
 wrote:

 Other than a few files that appear to be completely Windows specific,
 and I did not know for sure did not require them, I've converted all the
 DOS line endings in viewer-development back to plain linefeeds.  I'll be
 checking regularly for any that get added (hopefully before they get
 into the main repo) and advising the perpetrators of the error of their
 ways...

 So that I have a resource to direct them to, and to help prevent any new
 developers from committing this minor sin, we need a set of clear
 instructions on what Windows tools do this correctly and how to
 configure them to do so.   Please help by adding to:


 https://wiki.secondlife.com/wiki/How_to_avoid_DOS_line_endings_in_Windows_tools

 ___
 Policies and (un)subscribe information available here:
 http://wiki.secondlife.com/wiki/OpenSource-Dev
 Please read the policies before posting to keep unmoderated posting
 privileges

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Re: [opensource-dev] Help prevent DOS line endings...

2011-02-01 Thread Discrete Dreamscape
Possible cover-all solution: use Mercurial's eol extension. It's worked
pretty well for me so far, and handily autofixed all the DOS endings in a
particular fork I looked at in one go. It works much like the autoprops
configuration does in Subversion; hopefully with less pain.

Enable it (should be included by default in all recent versions, dunno about
Tortoise) by adding the following section and options to your system-wide or
repo-local .hgrc file:

[extensions]
eol =

Then add a .hgeol file to the root of the repository (it can be versioned
and thus easily distributed!), and fill it with whatever standard Mercurial
pattern entries are needed, like so:

[patterns]
**.py = native
**.txt = native
**.h = native
**.cpp = native
**Makefile = LF

As soon as this file exists and the extension is active for you, further hg
commands will immediately treat any non-conforming line-endings as
modifications to your current working copy. Hope this is helpful; if so, it
could be added to that page as well.


Discrete


On Tue, Feb 1, 2011 at 1:54 PM, Celierra Darling celie...@gmail.com wrote:

 For those that have already followed the instructions there - the coding
 standard says to prefer tabs, not spaces, which is the opposite of what the
 page was instructing until just now.

 Celi


 On Tue, Feb 1, 2011 at 7:35 AM, Oz Linden (Scott Lawrence) 
 o...@lindenlab.com wrote:

 Other than a few files that appear to be completely Windows specific,
 and I did not know for sure did not require them, I've converted all the
 DOS line endings in viewer-development back to plain linefeeds.  I'll be
 checking regularly for any that get added (hopefully before they get
 into the main repo) and advising the perpetrators of the error of their
 ways...

 So that I have a resource to direct them to, and to help prevent any new
 developers from committing this minor sin, we need a set of clear
 instructions on what Windows tools do this correctly and how to
 configure them to do so.   Please help by adding to:


 https://wiki.secondlife.com/wiki/How_to_avoid_DOS_line_endings_in_Windows_tools

 ___
 Policies and (un)subscribe information available here:
 http://wiki.secondlife.com/wiki/OpenSource-Dev
 Please read the policies before posting to keep unmoderated posting
 privileges



 ___
 Policies and (un)subscribe information available here:
 http://wiki.secondlife.com/wiki/OpenSource-Dev
 Please read the policies before posting to keep unmoderated posting
 privileges

___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges