view tests/test-eol.out @ 12403:ba8850911703

test-serve: fix test for binding to low named port on solaris Solaris do not know the service called http, so we use echo instead. Trying to define KILLQUIETLY when running the hgserve function didn't set the value within the function. Now we set the variable before calling the function.
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 25 Sep 2010 02:35:32 +0200
parents 0bb67503ad4b
children
line wrap: on
line source

% setup LF repository
adding .hgeol
adding a.txt

% hg clone repo repo-LF
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
% printrepr.py a.txt
first
second
third
% hg cat a.txt
first
second
third
% printrepr.py a.txt
first
second
third
fourth
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first
 second
 third
+fourth
% switching encoding from '\n' to '\r\n'
% hg diff only reports a single changed line:
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first
 second
 third
+fourth
% reverting back to LF format
first
second
third
% hg commit of inconsistent .txt file marked as binary (should work)
% hg commit of inconsistent .txt file marked as native (should fail)
abort: inconsistent newline style in a.txt

% hg commit --config eol.only-consistent=False (should work)
% hg commit of binary .txt file marked as native (binary files always okay)
% hg clone repo repo-CRLF
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
% printrepr.py a.txt
first\r
second\r
third\r
% hg cat a.txt
first
second
third
% printrepr.py a.txt
first\r
second\r
third\r
fourth\r
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first
 second
 third
+fourth
% switching encoding from '\r\n' to '\n'
% hg diff only reports a single changed line:
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first
 second
 third
+fourth
% reverting back to CRLF format
first\r
second\r
third\r
% hg commit of inconsistent .txt file marked as binary (should work)
% hg commit of inconsistent .txt file marked as native (should fail)
abort: inconsistent newline style in a.txt

% hg commit --config eol.only-consistent=False (should work)
% hg commit of binary .txt file marked as native (binary files always okay)
% setup CRLF repository
adding .hgeol
adding a.txt

% hg clone repo repo-LF
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
% printrepr.py a.txt
first
second
third
% hg cat a.txt
first\r
second\r
third\r
% printrepr.py a.txt
first
second
third
fourth
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first\r
 second\r
 third\r
+fourth\r
% switching encoding from '\n' to '\r\n'
% hg diff only reports a single changed line:
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first\r
 second\r
 third\r
+fourth\r
% reverting back to LF format
first
second
third
% hg commit of inconsistent .txt file marked as binary (should work)
% hg commit of inconsistent .txt file marked as native (should fail)
abort: inconsistent newline style in a.txt

% hg commit --config eol.only-consistent=False (should work)
% hg commit of binary .txt file marked as native (binary files always okay)
% hg clone repo repo-CRLF
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
% printrepr.py a.txt
first\r
second\r
third\r
% hg cat a.txt
first\r
second\r
third\r
% printrepr.py a.txt
first\r
second\r
third\r
fourth\r
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first\r
 second\r
 third\r
+fourth\r
% switching encoding from '\r\n' to '\n'
% hg diff only reports a single changed line:
diff --git a/a.txt b/a.txt
--- a/a.txt
+++ b/a.txt
@@ -1,3 +1,4 @@
 first\r
 second\r
 third\r
+fourth\r
% reverting back to CRLF format
first\r
second\r
third\r
% hg commit of inconsistent .txt file marked as binary (should work)
% hg commit of inconsistent .txt file marked as native (should fail)
abort: inconsistent newline style in a.txt

% hg commit --config eol.only-consistent=False (should work)
% hg commit of binary .txt file marked as native (binary files always okay)

# setup LF repository
adding unix.txt
adding win.txt
# setting repository-native EOLs to LF
adding .hgeol

% hg clone mixed mixed-LF
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% hg status (eol extension not yet activated)
% hg status (eol activated)
M win.txt
% hg commit
% hg status

% hg clone mixed mixed-CRLF
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% hg status (eol extension not yet activated)
% hg status (eol activated)
M win.txt
% hg commit
% hg status

# setup CRLF repository
adding unix.txt
adding win.txt
# setting repository-native EOLs to CRLF
adding .hgeol

% hg clone mixed mixed-LF
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% hg status (eol extension not yet activated)
% hg status (eol activated)
M unix.txt
% hg commit
% hg status

% hg clone mixed mixed-CRLF
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
% hg status (eol extension not yet activated)
% hg status (eol activated)
M unix.txt
% hg commit
% hg status