comparison tests/test-commit.t @ 28864:b0811a9fe67c

date: fix boundary check of negative integer
author Florent Gallaire <fgallaire@gmail.com>
date Tue, 12 Apr 2016 00:30:28 +0200
parents 87c6ad2251d8
children d83ca854fa21
comparison
equal deleted inserted replaced
28863:6e06fbee9244 28864:b0811a9fe67c
29 [255] 29 [255]
30 $ hg commit -d '-111111111111 0' -m commit-7 30 $ hg commit -d '-111111111111 0' -m commit-7
31 abort: date exceeds 32 bits: -111111111111 31 abort: date exceeds 32 bits: -111111111111
32 [255] 32 [255]
33 $ echo foo >> foo 33 $ echo foo >> foo
34 $ hg commit -d '1901-12-13 20:45:53 +0000' -m commit-7-2 34 $ hg commit -d '1901-12-13 20:45:52 +0000' -m commit-7-2
35 $ echo foo >> foo 35 $ echo foo >> foo
36 $ hg commit -d '-2147483647 0' -m commit-7-3 36 $ hg commit -d '-2147483648 0' -m commit-7-3
37 $ hg log -T '{rev} {date|isodatesec}\n' -l2 37 $ hg log -T '{rev} {date|isodatesec}\n' -l2
38 3 1901-12-13 20:45:53 +0000 38 3 1901-12-13 20:45:52 +0000
39 2 1901-12-13 20:45:53 +0000 39 2 1901-12-13 20:45:52 +0000
40 $ hg commit -d '1901-12-13 20:45:52 +0000' -m commit-7 40 $ hg commit -d '1901-12-13 20:45:51 +0000' -m commit-7
41 abort: date exceeds 32 bits: -2147483648 41 abort: date exceeds 32 bits: -2147483649
42 [255] 42 [255]
43 $ hg commit -d '-2147483648 0' -m commit-7 43 $ hg commit -d '-2147483649 0' -m commit-7
44 abort: date exceeds 32 bits: -2147483648 44 abort: date exceeds 32 bits: -2147483649
45 [255] 45 [255]
46 46
47 commit added file that has been deleted 47 commit added file that has been deleted
48 48
49 $ echo bar > bar 49 $ echo bar > bar
65 $ hg -v commit -m commit-9 dir 65 $ hg -v commit -m commit-9 dir
66 committing files: 66 committing files:
67 dir/file 67 dir/file
68 committing manifest 68 committing manifest
69 committing changelog 69 committing changelog
70 committed changeset 4:76aab26859d7 70 committed changeset 4:1957363f1ced
71 71
72 $ echo > dir.file 72 $ echo > dir.file
73 $ hg add 73 $ hg add
74 adding dir.file 74 adding dir.file
75 $ hg commit -m commit-10 dir dir.file 75 $ hg commit -m commit-10 dir dir.file
89 $ hg -v commit -m commit-13 ../dir 89 $ hg -v commit -m commit-13 ../dir
90 committing files: 90 committing files:
91 dir/file 91 dir/file
92 committing manifest 92 committing manifest
93 committing changelog 93 committing changelog
94 committed changeset 5:9a50557f1baf 94 committed changeset 5:a31d8f87544a
95 $ cd .. 95 $ cd ..
96 96
97 $ hg commit -m commit-14 does-not-exist 97 $ hg commit -m commit-14 does-not-exist
98 abort: does-not-exist: * (glob) 98 abort: does-not-exist: * (glob)
99 [255] 99 [255]
113 $ hg -v commit -m commit-17 dir/file 113 $ hg -v commit -m commit-17 dir/file
114 committing files: 114 committing files:
115 dir/file 115 dir/file
116 committing manifest 116 committing manifest
117 committing changelog 117 committing changelog
118 committed changeset 6:4b4c75bf422d 118 committed changeset 6:32d054c9d085
119 119
120 An empty date was interpreted as epoch origin 120 An empty date was interpreted as epoch origin
121 121
122 $ echo foo >> foo 122 $ echo foo >> foo
123 $ hg commit -d '' -m commit-no-date 123 $ hg commit -d '' -m commit-no-date