Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71B9910615 for ; Mon, 1 Jul 2013 18:01:39 +0000 (UTC) Received: (qmail 48293 invoked by uid 500); 1 Jul 2013 18:01:37 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 48242 invoked by uid 500); 1 Jul 2013 18:01:37 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 48234 invoked by uid 99); 1 Jul 2013 18:01:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 18:01:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tucu@cloudera.com designates 209.85.216.53 as permitted sender) Received: from [209.85.216.53] (HELO mail-qa0-f53.google.com) (209.85.216.53) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2013 18:01:33 +0000 Received: by mail-qa0-f53.google.com with SMTP id g10so2235177qah.19 for ; Mon, 01 Jul 2013 11:01:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=oS9s+rVv5AlpUYPL6KEfVlVvH9FVgp6pLsoyLjiq7b4=; b=EORWTzp2dMqg9hBgjdYUFkZIyU+lRk6CCiMOh4+KXyhuLZ+G1MtoflUDrw2rXE+pvU xwpRkcVdeL6vQ1OYaYDvoq7uydqmY8jbXeBFhKYo7Kw5n6dD6vpvzJ45fGMxw8O9ZTga SVJZmOgZufYUhmSXMsxVg9cMsz9hra4sphPsfvZ4woUd+QpzHEK/06PNeHQwsq0jX2l+ cYjoPHP0NVhb0xOt3kEbqeGbwjV1AD2Xte1xozicAwEq4Qpx9M4/uj0AVj06y1NNsRuj iuKjdsywMUXC4PSEYI5Wz3XJe+ibjqgzR7OnpuoP2DBRrulh8i1NVFebOZgFCa28e32m vlTA== X-Received: by 10.224.121.77 with SMTP id g13mr34514033qar.49.1372701672238; Mon, 01 Jul 2013 11:01:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.61.41 with HTTP; Mon, 1 Jul 2013 11:00:42 -0700 (PDT) In-Reply-To: References: From: Alejandro Abdelnur Date: Mon, 1 Jul 2013 11:00:42 -0700 Message-ID: Subject: Re: git line endings trouble since recent trunk To: "common-dev@hadoop.apache.org" Content-Type: multipart/alternative; boundary=089e0149cda48e849c04e077037c X-Gm-Message-State: ALoCoQnQ0SPvUEa9yqL+P1JtIPRkRp/2iBdYJiHYYBmMmZseBJWSIMTZFsLzLeNlfqLpbcfFqpfH X-Virus-Checked: Checked by ClamAV on apache.org --089e0149cda48e849c04e077037c Content-Type: text/plain; charset=ISO-8859-1 why not just add a precommit hook in svn to reject commits with CRLF? On Mon, Jul 1, 2013 at 10:51 AM, Raja Aluri wrote: > I added a couple of links that discusses 'line endings' when I added > .gitattributes in this JIRA. > HADOOP-8912 > > I am just reproducing them here. > > 1. http://git-scm.com/docs/gitattributes#_checking_out_and_checking_in > 2. > > http://stackoverflow.com/questions/170961/whats-the-best-crlf-handling-strategy-with-git > > -- > Raja > > > On Mon, Jul 1, 2013 at 10:42 AM, Colin McCabe >wrote: > > > On Sat, Jun 29, 2013 at 5:18 PM, Luke Lu wrote: > > > The problem is due to relnotes.py generating the html containing some > > CRLF > > > (from JIRA) and the release manager not using git-svn, which caused the > > > html with mixed eol getting checked in. The problem would then manifest > > for > > > git users due to text=auto in .gitattributes (see HADOOP-8912) that > auto > > > converts CRLF to LF, hence the persistent modified status of the > > > releasenotes.html for a fresh checkout. > > > > > > Adding svn:eol-style=native would only fix half the problem. We need to > > fix > > > relnotes.py to avoid generating html with mixed eols (by normalizing > > > everything to LF or native). > > > > While I agree that it would be nice to fix relnotes.py, it seems to me > > that setting svn:eol-style=native should fix the problem completely. > > Files with this attribute set are stored internally by subversion with > > all newlines as LF, and converted to CRLF as needed. After all, > > eol-style=native would not be very useful if it only applied on > > checkout. Windows users would be constantly checking in CRLF in that > > case. > > > > I'm not an svn expert, though, and I haven't tested the above. > > > > Colin > > > > > > > > > > > > > On Fri, Jun 28, 2013 at 1:03 PM, Colin McCabe > >wrote: > > > > > >> Clarification: svn:eol-style = native causes the files to contain > > >> whatever the native platform used to check out the code uses. I think > > >> just setting this property on all the HTML files should resolve this > > >> and future problems. > > >> > > >> patch posted. > > >> C. > > >> > > >> On Fri, Jun 28, 2013 at 12:56 PM, Colin McCabe < > cmccabe@alumni.cmu.edu> > > >> wrote: > > >> > I think the fix for this is to set svn:eol-style to "native" on this > > >> > file. It's set on many other files, just not on this one: > > >> > > > >> > cmccabe@keter:~/hadoopST/trunk> svn propget svn:eol-style > > >> > ./hadoop-project-dist/README.txt > > >> > native > > >> > cmccabe@keter:~/hadoopST/trunk> svn propget svn:eol-style > > >> > ./hadoop-hdfs-project/hadoop-hdfs/src/main/docs/releasenotes.html > > >> > cmccabe@keter:~/hadoopST/trunk> > > >> > > > >> > It might also be a good idea to run dos2unix on it. > > >> > > > >> > I thought that in general we wanted to have 'LF' everywhere, so > > >> > perhaps we should add this to the patch.sh script to prevent this > from > > >> > re-occurring. > > >> > > > >> > Colin > > >> > > > >> > > > >> > On Fri, Jun 28, 2013 at 12:27 PM, Sandy Ryza < > sandy.ryza@cloudera.com > > > > > >> wrote: > > >> >> I haven't been able to find a solution. Just filed > > >> >> https://issues.apache.org/jira/browse/HADOOP-9675. > > >> >> > > >> >> > > >> >> On Fri, Jun 28, 2013 at 12:19 PM, Omkar Joshi < > > ojoshi@hortonworks.com > > >> >wrote: > > >> >> > > >> >>> Sandy... did you fix this? any jira to track? me too facing same > > >> problem.. > > >> >>> > > >> >>> Thanks, > > >> >>> Omkar Joshi > > >> >>> *Hortonworks Inc.* > > >> >>> > > >> >>> > > >> >>> On Fri, Jun 28, 2013 at 11:54 AM, Zhijie Shen < > > zshen@hortonworks.com> > > >> >>> wrote: > > >> >>> > > >> >>> > Have the same problem here, have to edit the patch manually to > > >> exclude > > >> >>> the > > >> >>> > changes in releasenotes.html > > >> >>> > > > >> >>> > > > >> >>> > On Fri, Jun 28, 2013 at 11:01 AM, Sandy Ryza < > > >> sandy.ryza@cloudera.com > > >> >>> > >wrote: > > >> >>> > > > >> >>> > > Has anybody else been having trouble with line endings since > > >> pulling > > >> >>> > trunk > > >> >>> > > recently? > > >> >>> > > > > >> >>> > > > > hadoop-common-project/hadoop-common/src/main/docs/releasenotes.html > > >> >>> > > shows up as modified even though I haven't touched it, and I > > can't > > >> >>> check > > >> >>> > it > > >> >>> > > out or reset to a previous version to make that go away. The > > only > > >> >>> thing > > >> >>> > I > > >> >>> > > can do to neutralize it is to put it in a dummy commit, but I > > have > > >> to > > >> >>> do > > >> >>> > > this every time I switch branches or rebase. > > >> >>> > > > > >> >>> > > This appears to have began after the release notes commit > > >> >>> > > (8c5676830bb176157b2dc28c48cd3dd0a9712741), and must be due > to > > a > > >> line > > >> >>> > > endings change. > > >> >>> > > > > >> >>> > > -Sandy > > >> >>> > > > > >> >>> > > > >> >>> > > > >> >>> > > > >> >>> > -- > > >> >>> > Zhijie Shen > > >> >>> > Hortonworks Inc. > > >> >>> > http://hortonworks.com/ > > >> >>> > > > >> >>> > > >> > > > -- Alejandro --089e0149cda48e849c04e077037c--