Mercurial > hg
view tests/test-eol.out @ 11335:3201ff1459dd
dagparser: parses and formats DAGs as concise text
As discussed during the sprint. See the doc comment and doctests
for specification and examples. This is used in subsequent patches
to export revlog and changelog DAGs, and to generate a repo with
a given changelog DAG.
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Thu, 10 Jun 2010 11:48:15 +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