tests/test-eol-clone.t
changeset 43207 4aa9f3a1c1df
parent 43206 7699d9237a67
child 46314 95a615dd77bf
equal deleted inserted replaced
43206:7699d9237a67 43207:4aa9f3a1c1df
    19   $ printf "first\r\nsecond\r\nthird\r\n" > a.txt
    19   $ printf "first\r\nsecond\r\nthird\r\n" > a.txt
    20   $ hg commit --addremove -m 'checkin'
    20   $ hg commit --addremove -m 'checkin'
    21   adding .hgeol
    21   adding .hgeol
    22   adding a.txt
    22   adding a.txt
    23 
    23 
    24 Test commit of removed .hgeol - currently it seems to live on as zombie
    24 Test commit of removed .hgeol and how it immediately makes the automatic
    25 (causing "filtering a.txt through tolf") after being removed ... but actually
    25 changes explicit and committable.
    26 it is just confusing use of tip revision.
       
    27 
    26 
    28   $ cd ..
    27   $ cd ..
    29   $ hg clone repo repo-2
    28   $ hg clone repo repo-2
    30   updating to branch default
    29   updating to branch default
    31   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    30   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
    39   second
    38   second
    40   third
    39   third
    41   $ hg remove .hgeol
    40   $ hg remove .hgeol
    42   $ touch a.txt *  # ensure consistent st dirtyness checks, ignoring dirstate timing
    41   $ touch a.txt *  # ensure consistent st dirtyness checks, ignoring dirstate timing
    43   $ hg st -v --debug
    42   $ hg st -v --debug
    44   filtering a.txt through tolf
    43   M a.txt
    45   R .hgeol
    44   R .hgeol
    46   $ hg commit -m 'remove eol'
    45   $ hg commit -m 'remove eol'
    47   $ hg exp
    46   $ hg exp
    48   # HG changeset patch
    47   # HG changeset patch
    49   # User test
    48   # User test
    50   # Date 0 0
    49   # Date 0 0
    51   #      Thu Jan 01 00:00:00 1970 +0000
    50   #      Thu Jan 01 00:00:00 1970 +0000
    52   # Node ID c60b96c20c7de8c821127b548c34e5b170bcf9fe
    51   # Node ID 3c20c2d90333b6ecdc8f7aa8f9b73223c7c7a608
    53   # Parent  90f94e2cf4e24628afddd641688dfe4cd476d6e4
    52   # Parent  90f94e2cf4e24628afddd641688dfe4cd476d6e4
    54   remove eol
    53   remove eol
    55   
    54   
    56   diff -r 90f94e2cf4e2 -r c60b96c20c7d .hgeol
    55   diff -r 90f94e2cf4e2 -r 3c20c2d90333 .hgeol
    57   --- a/.hgeol	Thu Jan 01 00:00:00 1970 +0000
    56   --- a/.hgeol	Thu Jan 01 00:00:00 1970 +0000
    58   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    57   +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59   @@ -1,2 +0,0 @@
    58   @@ -1,2 +0,0 @@
    60   -[patterns]
    59   -[patterns]
    61   -**.txt = native
    60   -**.txt = native
       
    61   diff -r 90f94e2cf4e2 -r 3c20c2d90333 a.txt
       
    62   --- a/a.txt	Thu Jan 01 00:00:00 1970 +0000
       
    63   +++ b/a.txt	Thu Jan 01 00:00:00 1970 +0000
       
    64   @@ -1,3 +1,3 @@
       
    65   -first
       
    66   -second
       
    67   -third
       
    68   +first\r (esc)
       
    69   +second\r (esc)
       
    70   +third\r (esc)
    62   $ hg push --quiet
    71   $ hg push --quiet
    63   $ cd ..
    72   $ cd ..
    64 
    73 
    65 Test clone of repo with .hgeol in working dir, but no .hgeol in default
    74 Test clone of repo with .hgeol in working dir, but no .hgeol in default
    66 checkout revision tip. The repo is correctly updated to be consistent and have
    75 checkout revision tip. The repo is correctly updated to be consistent and have
    73   $ hg clone repo repo-3 -v --debug
    82   $ hg clone repo repo-3 -v --debug
    74   linked 7 files
    83   linked 7 files
    75   updating to branch default
    84   updating to branch default
    76   resolving manifests
    85   resolving manifests
    77    branchmerge: False, force: False, partial: False
    86    branchmerge: False, force: False, partial: False
    78    ancestor: 000000000000, local: 000000000000+, remote: c60b96c20c7d
    87    ancestor: 000000000000, local: 000000000000+, remote: 3c20c2d90333
    79   calling hook preupdate.eol: hgext.eol.preupdate
    88   calling hook preupdate.eol: hgext.eol.preupdate
    80    a.txt: remote created -> g
    89    a.txt: remote created -> g
    81   getting a.txt
    90   getting a.txt
    82   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    91   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
    83   $ cd repo-3
    92   $ cd repo-3
    84 
    93 
    85   $ cat a.txt
    94   $ cat a.txt
    86   first
    95   first\r (esc)
    87   second
    96   second\r (esc)
    88   third
    97   third\r (esc)
    89 
    98 
    90 Test clone of revision with .hgeol
    99 Test clone of revision with .hgeol
    91 
   100 
    92   $ cd ..
   101   $ cd ..
    93   $ hg clone -r 0 repo repo-4
   102   $ hg clone -r 0 repo repo-4