tests/test-eol.out
branchstable
changeset 11249 0bb67503ad4b
equal deleted inserted replaced
11246:8f5ad12db28e 11249:0bb67503ad4b
       
     1 % setup LF repository
       
     2 adding .hgeol
       
     3 adding a.txt
       
     4 
       
     5 % hg clone repo repo-LF
       
     6 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
     7 % printrepr.py a.txt
       
     8 first
       
     9 second
       
    10 third
       
    11 % hg cat a.txt
       
    12 first
       
    13 second
       
    14 third
       
    15 % printrepr.py a.txt
       
    16 first
       
    17 second
       
    18 third
       
    19 fourth
       
    20 diff --git a/a.txt b/a.txt
       
    21 --- a/a.txt
       
    22 +++ b/a.txt
       
    23 @@ -1,3 +1,4 @@
       
    24  first
       
    25  second
       
    26  third
       
    27 +fourth
       
    28 % switching encoding from '\n' to '\r\n'
       
    29 % hg diff only reports a single changed line:
       
    30 diff --git a/a.txt b/a.txt
       
    31 --- a/a.txt
       
    32 +++ b/a.txt
       
    33 @@ -1,3 +1,4 @@
       
    34  first
       
    35  second
       
    36  third
       
    37 +fourth
       
    38 % reverting back to LF format
       
    39 first
       
    40 second
       
    41 third
       
    42 % hg commit of inconsistent .txt file marked as binary (should work)
       
    43 % hg commit of inconsistent .txt file marked as native (should fail)
       
    44 abort: inconsistent newline style in a.txt
       
    45 
       
    46 % hg commit --config eol.only-consistent=False (should work)
       
    47 % hg commit of binary .txt file marked as native (binary files always okay)
       
    48 % hg clone repo repo-CRLF
       
    49 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    50 % printrepr.py a.txt
       
    51 first\r
       
    52 second\r
       
    53 third\r
       
    54 % hg cat a.txt
       
    55 first
       
    56 second
       
    57 third
       
    58 % printrepr.py a.txt
       
    59 first\r
       
    60 second\r
       
    61 third\r
       
    62 fourth\r
       
    63 diff --git a/a.txt b/a.txt
       
    64 --- a/a.txt
       
    65 +++ b/a.txt
       
    66 @@ -1,3 +1,4 @@
       
    67  first
       
    68  second
       
    69  third
       
    70 +fourth
       
    71 % switching encoding from '\r\n' to '\n'
       
    72 % hg diff only reports a single changed line:
       
    73 diff --git a/a.txt b/a.txt
       
    74 --- a/a.txt
       
    75 +++ b/a.txt
       
    76 @@ -1,3 +1,4 @@
       
    77  first
       
    78  second
       
    79  third
       
    80 +fourth
       
    81 % reverting back to CRLF format
       
    82 first\r
       
    83 second\r
       
    84 third\r
       
    85 % hg commit of inconsistent .txt file marked as binary (should work)
       
    86 % hg commit of inconsistent .txt file marked as native (should fail)
       
    87 abort: inconsistent newline style in a.txt
       
    88 
       
    89 % hg commit --config eol.only-consistent=False (should work)
       
    90 % hg commit of binary .txt file marked as native (binary files always okay)
       
    91 % setup CRLF repository
       
    92 adding .hgeol
       
    93 adding a.txt
       
    94 
       
    95 % hg clone repo repo-LF
       
    96 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
    97 % printrepr.py a.txt
       
    98 first
       
    99 second
       
   100 third
       
   101 % hg cat a.txt
       
   102 first\r
       
   103 second\r
       
   104 third\r
       
   105 % printrepr.py a.txt
       
   106 first
       
   107 second
       
   108 third
       
   109 fourth
       
   110 diff --git a/a.txt b/a.txt
       
   111 --- a/a.txt
       
   112 +++ b/a.txt
       
   113 @@ -1,3 +1,4 @@
       
   114  first\r
       
   115  second\r
       
   116  third\r
       
   117 +fourth\r
       
   118 % switching encoding from '\n' to '\r\n'
       
   119 % hg diff only reports a single changed line:
       
   120 diff --git a/a.txt b/a.txt
       
   121 --- a/a.txt
       
   122 +++ b/a.txt
       
   123 @@ -1,3 +1,4 @@
       
   124  first\r
       
   125  second\r
       
   126  third\r
       
   127 +fourth\r
       
   128 % reverting back to LF format
       
   129 first
       
   130 second
       
   131 third
       
   132 % hg commit of inconsistent .txt file marked as binary (should work)
       
   133 % hg commit of inconsistent .txt file marked as native (should fail)
       
   134 abort: inconsistent newline style in a.txt
       
   135 
       
   136 % hg commit --config eol.only-consistent=False (should work)
       
   137 % hg commit of binary .txt file marked as native (binary files always okay)
       
   138 % hg clone repo repo-CRLF
       
   139 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   140 % printrepr.py a.txt
       
   141 first\r
       
   142 second\r
       
   143 third\r
       
   144 % hg cat a.txt
       
   145 first\r
       
   146 second\r
       
   147 third\r
       
   148 % printrepr.py a.txt
       
   149 first\r
       
   150 second\r
       
   151 third\r
       
   152 fourth\r
       
   153 diff --git a/a.txt b/a.txt
       
   154 --- a/a.txt
       
   155 +++ b/a.txt
       
   156 @@ -1,3 +1,4 @@
       
   157  first\r
       
   158  second\r
       
   159  third\r
       
   160 +fourth\r
       
   161 % switching encoding from '\r\n' to '\n'
       
   162 % hg diff only reports a single changed line:
       
   163 diff --git a/a.txt b/a.txt
       
   164 --- a/a.txt
       
   165 +++ b/a.txt
       
   166 @@ -1,3 +1,4 @@
       
   167  first\r
       
   168  second\r
       
   169  third\r
       
   170 +fourth\r
       
   171 % reverting back to CRLF format
       
   172 first\r
       
   173 second\r
       
   174 third\r
       
   175 % hg commit of inconsistent .txt file marked as binary (should work)
       
   176 % hg commit of inconsistent .txt file marked as native (should fail)
       
   177 abort: inconsistent newline style in a.txt
       
   178 
       
   179 % hg commit --config eol.only-consistent=False (should work)
       
   180 % hg commit of binary .txt file marked as native (binary files always okay)
       
   181 
       
   182 # setup LF repository
       
   183 adding unix.txt
       
   184 adding win.txt
       
   185 # setting repository-native EOLs to LF
       
   186 adding .hgeol
       
   187 
       
   188 % hg clone mixed mixed-LF
       
   189 updating to branch default
       
   190 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   191 % hg status (eol extension not yet activated)
       
   192 % hg status (eol activated)
       
   193 M win.txt
       
   194 % hg commit
       
   195 % hg status
       
   196 
       
   197 % hg clone mixed mixed-CRLF
       
   198 updating to branch default
       
   199 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   200 % hg status (eol extension not yet activated)
       
   201 % hg status (eol activated)
       
   202 M win.txt
       
   203 % hg commit
       
   204 % hg status
       
   205 
       
   206 # setup CRLF repository
       
   207 adding unix.txt
       
   208 adding win.txt
       
   209 # setting repository-native EOLs to CRLF
       
   210 adding .hgeol
       
   211 
       
   212 % hg clone mixed mixed-LF
       
   213 updating to branch default
       
   214 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   215 % hg status (eol extension not yet activated)
       
   216 % hg status (eol activated)
       
   217 M unix.txt
       
   218 % hg commit
       
   219 % hg status
       
   220 
       
   221 % hg clone mixed mixed-CRLF
       
   222 updating to branch default
       
   223 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
   224 % hg status (eol extension not yet activated)
       
   225 % hg status (eol activated)
       
   226 M unix.txt
       
   227 % hg commit
       
   228 % hg status