##// END OF EJS Templates
test-commit: test unset date is not read as epoch origin
Patrick Mezard -
r6719:42dbf954 default
parent child Browse files
Show More
@@ -1,106 +1,110 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 echo % commit date test
3 echo % commit date test
4 hg init test
4 hg init test
5 cd test
5 cd test
6 echo foo > foo
6 echo foo > foo
7 hg add foo
7 hg add foo
8 HGEDITOR=true hg commit -m ""
8 HGEDITOR=true hg commit -m ""
9 hg commit -d '0 0' -m commit-1
9 hg commit -d '0 0' -m commit-1
10 # An empty date was interpreted as epoch origin
11 echo foo >> foo
12 hg commit -d '' -m commit-no-date
13 hg tip --template '{date|isodate}\n' | grep '1970'
10 echo foo >> foo
14 echo foo >> foo
11 hg commit -d '1 4444444' -m commit-3
15 hg commit -d '1 4444444' -m commit-3
12 hg commit -d '1 15.1' -m commit-4
16 hg commit -d '1 15.1' -m commit-4
13 hg commit -d 'foo bar' -m commit-5
17 hg commit -d 'foo bar' -m commit-5
14 hg commit -d ' 1 4444' -m commit-6
18 hg commit -d ' 1 4444' -m commit-6
15 hg commit -d '111111111111 0' -m commit-7
19 hg commit -d '111111111111 0' -m commit-7
16
20
17 echo % commit added file that has been deleted
21 echo % commit added file that has been deleted
18 echo bar > bar
22 echo bar > bar
19 hg add bar
23 hg add bar
20 rm bar
24 rm bar
21 hg commit -d "1000000 0" -m commit-8
25 hg commit -d "1000000 0" -m commit-8
22 hg commit -d "1000000 0" -m commit-8-2 bar
26 hg commit -d "1000000 0" -m commit-8-2 bar
23
27
24 hg -q revert -a --no-backup
28 hg -q revert -a --no-backup
25
29
26 mkdir dir
30 mkdir dir
27 echo boo > dir/file
31 echo boo > dir/file
28 hg add
32 hg add
29 hg -v commit -d '0 0' -m commit-9 dir
33 hg -v commit -d '0 0' -m commit-9 dir
30
34
31 echo > dir.file
35 echo > dir.file
32 hg add
36 hg add
33 hg commit -d '0 0' -m commit-10 dir dir.file
37 hg commit -d '0 0' -m commit-10 dir dir.file
34
38
35 echo >> dir/file
39 echo >> dir/file
36 mkdir bleh
40 mkdir bleh
37 mkdir dir2
41 mkdir dir2
38 cd bleh
42 cd bleh
39 hg commit -d '0 0' -m commit-11 .
43 hg commit -d '0 0' -m commit-11 .
40 hg commit -d '0 0' -m commit-12 ../dir ../dir2
44 hg commit -d '0 0' -m commit-12 ../dir ../dir2
41 hg -v commit -d '0 0' -m commit-13 ../dir
45 hg -v commit -d '0 0' -m commit-13 ../dir
42 cd ..
46 cd ..
43
47
44 hg commit -d '0 0' -m commit-14 does-not-exist
48 hg commit -d '0 0' -m commit-14 does-not-exist
45 ln -s foo baz
49 ln -s foo baz
46 hg commit -d '0 0' -m commit-15 baz
50 hg commit -d '0 0' -m commit-15 baz
47 touch quux
51 touch quux
48 hg commit -d '0 0' -m commit-16 quux
52 hg commit -d '0 0' -m commit-16 quux
49 echo >> dir/file
53 echo >> dir/file
50 hg -v commit -d '0 0' -m commit-17 dir/file
54 hg -v commit -d '0 0' -m commit-17 dir/file
51 cd ..
55 cd ..
52
56
53 echo % partial subdir commit test
57 echo % partial subdir commit test
54 hg init test2
58 hg init test2
55 cd test2
59 cd test2
56 mkdir foo
60 mkdir foo
57 echo foo > foo/foo
61 echo foo > foo/foo
58 mkdir bar
62 mkdir bar
59 echo bar > bar/bar
63 echo bar > bar/bar
60 hg add
64 hg add
61 hg ci -d '1000000 0' -u test -m commit-subdir-1 foo
65 hg ci -d '1000000 0' -u test -m commit-subdir-1 foo
62 hg ci -d '1000001 0' -u test -m commit-subdir-2 bar
66 hg ci -d '1000001 0' -u test -m commit-subdir-2 bar
63 echo % subdir log 1
67 echo % subdir log 1
64 hg log -v foo
68 hg log -v foo
65 echo % subdir log 2
69 echo % subdir log 2
66 hg log -v bar
70 hg log -v bar
67 echo % full log
71 echo % full log
68 hg log -v
72 hg log -v
69 cd ..
73 cd ..
70
74
71 echo % dot and subdir commit test
75 echo % dot and subdir commit test
72 hg init test3
76 hg init test3
73 cd test3
77 cd test3
74 mkdir foo
78 mkdir foo
75 echo foo content > foo/plain-file
79 echo foo content > foo/plain-file
76 hg add foo/plain-file
80 hg add foo/plain-file
77 hg ci -d '1000000 0' -u test -m commit-foo-subdir foo
81 hg ci -d '1000000 0' -u test -m commit-foo-subdir foo
78 echo modified foo content > foo/plain-file
82 echo modified foo content > foo/plain-file
79 hg ci -d '2000000 0' -u test -m commit-foo-dot .
83 hg ci -d '2000000 0' -u test -m commit-foo-dot .
80 echo % full log
84 echo % full log
81 hg log -v
85 hg log -v
82 echo % subdir log
86 echo % subdir log
83 cd foo
87 cd foo
84 hg log .
88 hg log .
85 cd ..
89 cd ..
86 cd ..
90 cd ..
87
91
88 cd ..
92 cd ..
89 hg init issue1049
93 hg init issue1049
90 cd issue1049
94 cd issue1049
91 echo a > a
95 echo a > a
92 hg ci -Ama
96 hg ci -Ama
93 echo a >> a
97 echo a >> a
94 hg ci -mb
98 hg ci -mb
95 hg up 0
99 hg up 0
96 echo b >> a
100 echo b >> a
97 hg ci -mc
101 hg ci -mc
98 HGMERGE=true hg merge
102 HGMERGE=true hg merge
99 echo % should fail because we are specifying a file name
103 echo % should fail because we are specifying a file name
100 hg ci -mmerge a
104 hg ci -mmerge a
101 echo % should fail because we are specifying a pattern
105 echo % should fail because we are specifying a pattern
102 hg ci -mmerge -I a
106 hg ci -mmerge -I a
103 echo % should succeed
107 echo % should succeed
104 hg ci -mmerge
108 hg ci -mmerge
105
109
106 exit 0
110 exit 0
General Comments 0
You need to be logged in to leave comments. Login now