Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-4
On Mon, Aug 07, 2017 at 12:39:53PM -0400, John Harvey wrote:

> I can think of one other option, although it's a little messier.  There
> could be a CI job that detects and corrects these situations when they
> occur.  I don't think it would be that painful to set up, although the
> downside to such a thing is that it basically continues the back-and-forth
> model that strk referenced.
>
> It's worth noting that since this situation has occurred, it's causing some
> of my builds that use the git repo to fail.  Currently, "git clone"
> followed by "git checkout" does not work due to the famous "files would be
> overwritten by checkout" error.  For now, I can get around it with "git
> checkout --force", but it's worth noting that there could be other users
> similarly affected.

Just a note: `git checkout --force` does not work with git version
2.1.4, which is the version running on the system playing the now
broken svn->git mirroring system.

--strk;
_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Regina Obe
Strk,

> On Mon, Aug 07, 2017 at 02:12:21PM -0700, Regina Obe wrote:
>> New Revision: 15541
>>
>> Modified:
>>    trunk/extras/tiger_geocoder/upgrade_geocoder.bat
>> Log:
>> adds trailing white space.

> Uhm ?
> Are you intentionally adding trailing white spaces ?
> Why ?
> Note that .editorconfig requests to drop them...

That was a typo in my commit log-  it should have read "Add final new line".

 After you committed I tested again, made a minor change by taking out the pause line and then adding it back and resaving in my editor.
What I noticed after I compared was that my editor insisted on adding a new line (CRLF) at the end of the file, but all new line feeds were CRLF as they should be.
I committed that after noticing we do have a rule in editorconfig that says this.

insert_final_newline = true

Now the question I have is if you had edited the file with your editor, why did the file not have a new line at the end?  When that was something our editorconfig rule says it should have.


> BTW, reading the diff it actually looks to me that you are
> instead stripping CRs again with this commit :(

> --strk;
Okay this doesn't look like what I'm seeing as mentioned about

Thanks,
Regina

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: extras/tiger_geocoder/upgrade_geocoder.bat and CRLF

Sandro Santilli-4
In reply to this post by Sandro Santilli-4
On Tue, Aug 08, 2017 at 10:36:55AM +0200, Sandro Santilli wrote:

> On Tue, Aug 08, 2017 at 10:28:03AM +0200, Sandro Santilli wrote:
> > On Mon, Aug 07, 2017 at 05:11:33PM -0400, Regina Obe wrote:
> > > Disregard my note.  Maybe I was catching things mid change or I had a typo in my testing.
> > >
> > > Strk latest commit for .editorconfig works for me.  CRLF is preserved.
> >
> > Great, thanks Mateusz for the finding and Regina for the testing.
> > And thanks to editorconfig.org people for the great tool !
>
> Unfortunately things seem to be broken again as of r15541
> What happened Regina ? Did editorconfig not kick in this time ?
> Does "svn diff" show no change when you do change those line endings ?

I've installed subversion to try at understanding this issue.
On the SVN side, checking out the file results in a file with CRLF.
On the GIT side, checking out the file results in a file with only LF,
which is automatically injected CR after download, becoming the same
as the SVN checkout.

The difference is that on the SVN side you see no difference (`svn
diff` shows no diffs) while on the GIT side you do see the difference.

My suspect is that SVN is just ignoring the line ending, intentionally
hiding what's on the server side and always showing CRLF on the client
side. Maybe if the file was marked as a binary file rather than text
file things would be different.

I don't see how could an SVN only user possibly see what's being
committed at this point :(

According to
http://svnbook.red-bean.com/en/1.7/svn.advanced.props.file-portability.html
the `svn:eol-style` setting value 'CRLF' (what is in current use
for `extras/tiger_geocoder/upgrade_geocoder.bat`) should ensure server
side has `CRLF`.

At this point I'm guessing it is the GIT side messing things up,
some wrong configuration in .gitattribute ?

--strk;

_______________________________________________
postgis-devel mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/postgis-devel