Okay all you Mercurial experts, I need some help!
One of the differences between the Mercurial and Subversion 2.6 branches were the line endings for various Windows files. This change is not appropriate for 2.6, which is in security-fix only mode. I reverted these changes in the Mercurial 2.6 branch, but now I can't push it.
I asked around on #python-dev and it was suggested that I add some entries into .hgeol, which I've done:
Doc/make.bat = CRLF Tools/buildbot/*.bat = CRLF Tools/msi/merge.py = CRLF PC/VS7.1/*.bat = CRLF PC/VS8.0/*.bat = CRLF
Yet the push still fails with the errors below. I don't know how to deal with the pretxnchangegroup.eol hook. Any and all assistance will be greatly appreciated.
Cheers, -Barry
% hg push pushing to ssh://hg@hg.python.org/cpython searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 5 changesets with 70 changes to 38 files remote: error: pretxnchangegroup.eol hook failed: Doc/make.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS7.1/build_ssl.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build_env.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build_pgo.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build_ssl.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/env.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/idle.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/rt.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/build-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/build.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/buildmsi.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/clean-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/clean.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/external-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/external-common.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/external.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/test-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/test.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/msi/merge.py in 03e488b5c009 should not have CRLF line endings remote: transaction abort! remote: rollback completed remote: abort: Doc/make.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS7.1/build_ssl.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build_env.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build_pgo.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/build_ssl.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/env.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/idle.bat in 03e488b5c009 should not have CRLF line endings remote: PC/VS8.0/rt.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/build-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/build.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/buildmsi.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/clean-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/clean.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/external-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/external-common.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/external.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/test-amd64.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/buildbot/test.bat in 03e488b5c009 should not have CRLF line endings remote: Tools/msi/merge.py in 03e488b5c009 should not have CRLF line endings
On Fri, 20 May 2011 21:09:02 -0400, Barry Warsaw <barry@python.org> wrote:
I asked around on #python-dev and it was suggested that I add some entries into .hgeol, which I've done:
Doc/make.bat = CRLF Tools/buildbot/*.bat = CRLF Tools/msi/merge.py = CRLF PC/VS7.1/*.bat = CRLF PC/VS8.0/*.bat = CRLF
Yet the push still fails with the errors below. I don't know how to deal w=
Did you push the .hgeol change first? That seemed to be necessary when I ran into something like this. (But I'm no hg expert, so I could be all wet on this.)
--David
One of the differences between the Mercurial and Subversion 2.6 branches were the line endings for various Windows files. This change is not appropriate for 2.6, which is in security-fix only mode. I reverted these changes in the Mercurial 2.6 branch, but now I can't push it.
For the 2.5 branch, I just accepted that hg and svn will differ in the EOL representation of some files. So when comparing trees, use diff -w or -b.
Regards, Martin
On May 20, 2011, at 09:22 PM, R. David Murray wrote:
On Fri, 20 May 2011 21:09:02 -0400, Barry Warsaw <barry@python.org> wrote:
I asked around on #python-dev and it was suggested that I add some entries into .hgeol, which I've done:
Doc/make.bat = CRLF Tools/buildbot/*.bat = CRLF Tools/msi/merge.py = CRLF PC/VS7.1/*.bat = CRLF PC/VS8.0/*.bat = CRLF
Yet the push still fails with the errors below. I don't know how to deal w=
Did you push the .hgeol change first?
I just did.
That seemed to be necessary when I ran into something like this. (But I'm no hg expert, so I could be all wet on this.)
Splish splash! :) I'm still getting the same failures, even after pushing the .hgeol change only (in 2.6), then merging that back to my cpython clone. Anybody have any other ideas?
I'd like to do this right, but if it can't be done, I'll live with the line ending changes in the hg repo.
-Barry
On May 21, 2011, at 08:11 AM, Martin v. Löwis wrote:
One of the differences between the Mercurial and Subversion 2.6 branches were the line endings for various Windows files. This change is not appropriate for 2.6, which is in security-fix only mode. I reverted these changes in the Mercurial 2.6 branch, but now I can't push it.
For the 2.5 branch, I just accepted that hg and svn will differ in the EOL representation of some files. So when comparing trees, use diff -w or -b.
Yeah, after my latest hg debacle, this is the only sane way to go. Just in case it isn't obvious, the eol hook prevents pushing any changeset where the files have CRLF. It doesn't have to be on tip.
This means if you commit a change w/CRLF and then in a later changeset revert it, you will still not be able to push. Yeah, I found out the hard way. ;)
Here's what the devguide has to say about this:
"Under Windows, you should also enable the eol extension, which will fix any Windows-specific line endings your text editor might insert when you create or modify versioned files. The public repository has a hook which will reject all changesets having the wrong line endings, so enabling this extension on your local computer is in your best interest."
Note: this doesn't necessary pertain just to Windows developers. Also, the description of this hook should include more details, such as the above restriction on *any* changeset, and perhaps instructions on how to install the hook locally so you can't paint yourself into a corner like I did.
Many thanks to Ezio, Georg, and RDM on #python-dev for helping me unfubar myself. It required multiple 'hg export|hg import' with some manual trimming of diffs to replay the relevant changes into a fresh repo.
Fun time had by all! -Barry
participants (3)
-
"Martin v. Löwis"
-
Barry Warsaw
-
R. David Murray