~ubuntu-branches/ubuntu/precise/mercurial/precise-updates

« back to all changes in this revision

Viewing changes to tests/test-eol-hook.t

  • Committer: Bazaar Package Importer
  • Author(s): Javi Merino
  • Date: 2011-03-06 16:01:58 UTC
  • mto: (28.1.2 sid) (1.1.14)
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20110306160158-y94pzpmtd7b1xgjk
Tags: upstream-1.8
ImportĀ upstreamĀ versionĀ 1.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
  $ cat > .hgeol <<EOF
22
22
  > [patterns]
23
23
  > mixed.txt = BIN
 
24
  > crlf.txt = CRLF
24
25
  > **.txt = native
25
26
  > EOF
26
27
  $ hg add .hgeol
61
62
  adding manifests
62
63
  adding file changes
63
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