Bug 535151 (RHQ-1877) - Should clean (or generate uniformly) .xml files with regards to CRLF
Summary: Should clean (or generate uniformly) .xml files with regards to CRLF
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHQ-1877
Product: RHQ Project
Classification: Other
Component: Build System
Version: unspecified
Hardware: All
OS: All
low
medium
Target Milestone: ---
: ---
Assignee: RHQ Project Maintainer
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-28 05:30 UTC by Corey Welton
Modified: 2011-05-24 01:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)
ctrlm.txt (19.13 KB, text/plain)
2009-03-28 05:35 UTC, Corey Welton
no flags Details

Description Corey Welton 2009-03-28 05:30:00 UTC
I'm putting this under "Build System" because this is probably something that can be done as a release engineering task.  

The vast majority of our xml files are generated with a standard 'CR'.  However, a small subset of these have the full, dos/window style CRLF in them.  This is a slight annoyance when having to edit one of these xml files on a unix system.   I am not sure if the inverse is noticeable in Windows.

One example is $SERVERROOT/jbossas/server/default/deploy/rhq.ear/rhq-portal.war/WEB-INF/web.xml.  

In either case, our xml should probably be clean/uniform in one style or the other.  This can probably be done on the build system, by piping every xml file through `dos2unix` (or unix2dos, should such be the desire...)


I'm attaching a text file containing the results, against a recent build, of the following cmd sequence:

for i in `find -name *\.xml`; do echo "$i:"; grep -c "^M" $i; done

(The ^M is generated in *nix by typing "Ctrl-V Ctrl-M")

The output is a list of all xml files as they exist on my build, with a number 'n', where 'n' equals the total number of CRLFs in that xml document.



Comment 1 Corey Welton 2009-04-28 21:03:24 UTC
proposed addition:

(from within $ROOT on the build tree):

for i in `find -name *\.xml`; do dos2unix $i; done;

Comment 2 Red Hat Bugzilla 2009-11-10 20:48:37 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1877
Imported an attachment (id=368681)


Comment 3 wes hayutin 2010-02-16 17:10:17 UTC
mass add of key word FutureFeature to help track

Comment 4 John Mazzitelli 2011-03-25 19:04:19 UTC
we are all now working with LF EOL characters in the code base. I just ran that script from the root of my git repo and found no ^M chars in any .xml.

From the distro, there is only one file that has this now, that's:

./jbossas/server/default/deploy/rhq.ear/jboss-remoting-servlet-invoker-2x.r3040.jon.war/WEB-INF/web.xml:

which is a separately packaged WAR (its the JBoss/Remoting WAR that we had patched to fix a particular bug in JBoss/Remoting). Customers/users will never want to look in the war, let alone mess with that .xml file, so this is OK.

All other xml files have LF EOLs.

Comment 5 Mike Foley 2011-04-19 12:50:56 UTC
spot checked .xml files in the 04/29/2011 release.  verified.

Comment 6 Corey Welton 2011-05-24 01:17:25 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 7 Corey Welton 2011-05-24 01:17:25 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 8 Corey Welton 2011-05-24 01:17:25 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 9 Corey Welton 2011-05-24 01:17:28 UTC
Bookkeeping - closing bug - fixed in recent release.


Note You need to log in before you can comment on or make changes to this bug.