tests/test-eol-hook.t
branchstable
changeset 13501 50b825c1adb1
parent 12423 10c3385fa89e
child 13519 43b3b761d9d1
equal deleted inserted replaced
13500:0348a66504ed 13501:50b825c1adb1
    19 
    19 
    20 Create repo
    20 Create repo
    21   $ cat > .hgeol <<EOF
    21   $ cat > .hgeol <<EOF
    22   > [patterns]
    22   > [patterns]
    23   > mixed.txt = BIN
    23   > mixed.txt = BIN
       
    24   > crlf.txt = CRLF
    24   > **.txt = native
    25   > **.txt = native
    25   > EOF
    26   > EOF
    26   $ hg add .hgeol
    27   $ hg add .hgeol
    27   $ hg commit -m 'Commit .hgeol'
    28   $ hg commit -m 'Commit .hgeol'
    28 
    29 
    59   searching for changes
    60   searching for changes
    60   adding changesets
    61   adding changesets
    61   adding manifests
    62   adding manifests
    62   adding file changes
    63   adding file changes
    63   added 2 changesets with 2 changes to 1 files
    64   added 2 changesets with 2 changes to 1 files
       
    65 
       
    66   $ printf "first\nsecond\nthird\n" > crlf.txt
       
    67   $ hg add crlf.txt
       
    68   $ hg commit -m 'LF crlf.txt'
       
    69   $ hg push ../main
       
    70   pushing to ../main
       
    71   searching for changes
       
    72   adding changesets
       
    73   adding manifests
       
    74   adding file changes
       
    75   added 1 changesets with 1 changes to 1 files
       
    76   error: pretxnchangegroup hook failed: crlf.txt should not have LF line endings
       
    77   transaction abort!
       
    78   rollback completed
       
    79   abort: crlf.txt should not have LF line endings
       
    80   [255]
       
    81 
       
    82   $ printf "first\r\nsecond\r\nthird\r\n" > crlf.txt
       
    83   $ hg commit -m 'CRLF crlf.txt (fixed)'
       
    84   $ hg push ../main
       
    85   pushing to ../main
       
    86   searching for changes
       
    87   adding changesets
       
    88   adding manifests
       
    89   adding file changes
       
    90   added 2 changesets with 2 changes to 1 files