comparison tests/test-commit.t @ 12156:4c94b6d0fb1c

tests: remove unneeded -d flags Many tests fixed the commit date of their changesets at '1000000 0' or similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is the default run-tests.py installs. Removing the unnecessary flag removes some clutter and will hopefully make it clearer what the tests are really trying to test. Some tests did not even change their output when the dates were changed, in which case the -d flag was truly irrelevant. Dates used in sequence (such as '0 0', '1 0', etc...) were left alone since they may make the test easier to understand.
author Martin Geisler <mg@lazybytes.net>
date Thu, 02 Sep 2010 23:22:51 +0200
parents 6f58430dfdd0
children 4134686b83e1
comparison
equal deleted inserted replaced
12155:94ad12aa0530 12156:4c94b6d0fb1c
21 commit added file that has been deleted 21 commit added file that has been deleted
22 22
23 $ echo bar > bar 23 $ echo bar > bar
24 $ hg add bar 24 $ hg add bar
25 $ rm bar 25 $ rm bar
26 $ hg commit -d "1000000 0" -m commit-8 26 $ hg commit -m commit-8
27 nothing changed 27 nothing changed
28 $ hg commit -d "1000000 0" -m commit-8-2 bar 28 $ hg commit -m commit-8-2 bar
29 abort: bar: file not found! 29 abort: bar: file not found!
30 30
31 $ hg -q revert -a --no-backup 31 $ hg -q revert -a --no-backup
32 32
33 $ mkdir dir 33 $ mkdir dir
87 $ mkdir bar 87 $ mkdir bar
88 $ echo bar > bar/bar 88 $ echo bar > bar/bar
89 $ hg add 89 $ hg add
90 adding bar/bar 90 adding bar/bar
91 adding foo/foo 91 adding foo/foo
92 $ hg ci -d '1000000 0' -m commit-subdir-1 foo 92 $ hg ci -m commit-subdir-1 foo
93 $ hg ci -d '1000001 0' -m commit-subdir-2 bar 93 $ hg ci -m commit-subdir-2 bar
94 94
95 subdir log 1 95 subdir log 1
96 96
97 $ hg log -v foo 97 $ hg log -v foo
98 changeset: 0:6ef3cb06bb80 98 changeset: 0:f97e73a25882
99 user: test 99 user: test
100 date: Mon Jan 12 13:46:40 1970 +0000 100 date: Thu Jan 01 00:00:00 1970 +0000
101 files: foo/foo 101 files: foo/foo
102 description: 102 description:
103 commit-subdir-1 103 commit-subdir-1
104 104
105 105
106 106
107 subdir log 2 107 subdir log 2
108 108
109 $ hg log -v bar 109 $ hg log -v bar
110 changeset: 1:f2e51572cf5a 110 changeset: 1:aa809156d50d
111 tag: tip 111 tag: tip
112 user: test 112 user: test
113 date: Mon Jan 12 13:46:41 1970 +0000 113 date: Thu Jan 01 00:00:00 1970 +0000
114 files: bar/bar 114 files: bar/bar
115 description: 115 description:
116 commit-subdir-2 116 commit-subdir-2
117 117
118 118
119 119
120 full log 120 full log
121 121
122 $ hg log -v 122 $ hg log -v
123 changeset: 1:f2e51572cf5a 123 changeset: 1:aa809156d50d
124 tag: tip 124 tag: tip
125 user: test 125 user: test
126 date: Mon Jan 12 13:46:41 1970 +0000 126 date: Thu Jan 01 00:00:00 1970 +0000
127 files: bar/bar 127 files: bar/bar
128 description: 128 description:
129 commit-subdir-2 129 commit-subdir-2
130 130
131 131
132 changeset: 0:6ef3cb06bb80 132 changeset: 0:f97e73a25882
133 user: test 133 user: test
134 date: Mon Jan 12 13:46:40 1970 +0000 134 date: Thu Jan 01 00:00:00 1970 +0000
135 files: foo/foo 135 files: foo/foo
136 description: 136 description:
137 commit-subdir-1 137 commit-subdir-1
138 138
139 139
145 $ hg init test3 145 $ hg init test3
146 $ cd test3 146 $ cd test3
147 $ mkdir foo 147 $ mkdir foo
148 $ echo foo content > foo/plain-file 148 $ echo foo content > foo/plain-file
149 $ hg add foo/plain-file 149 $ hg add foo/plain-file
150 $ hg ci -d '1000000 0' -m commit-foo-subdir foo 150 $ hg ci -m commit-foo-subdir foo
151 $ echo modified foo content > foo/plain-file 151 $ echo modified foo content > foo/plain-file
152 $ hg ci -d '2000000 0' -m commit-foo-dot . 152 $ hg ci -m commit-foo-dot .
153 153
154 full log 154 full log
155 155
156 $ hg log -v 156 $ hg log -v
157 changeset: 1:d9180e04fa8a 157 changeset: 1:95b38e3a5b2e
158 tag: tip 158 tag: tip
159 user: test 159 user: test
160 date: Sat Jan 24 03:33:20 1970 +0000 160 date: Thu Jan 01 00:00:00 1970 +0000
161 files: foo/plain-file 161 files: foo/plain-file
162 description: 162 description:
163 commit-foo-dot 163 commit-foo-dot
164 164
165 165
166 changeset: 0:80b572aaf098 166 changeset: 0:65d4e9386227
167 user: test 167 user: test
168 date: Mon Jan 12 13:46:40 1970 +0000 168 date: Thu Jan 01 00:00:00 1970 +0000
169 files: foo/plain-file 169 files: foo/plain-file
170 description: 170 description:
171 commit-foo-subdir 171 commit-foo-subdir
172 172
173 173
174 174
175 subdir log 175 subdir log
176 176
177 $ cd foo 177 $ cd foo
178 $ hg log . 178 $ hg log .
179 changeset: 1:d9180e04fa8a 179 changeset: 1:95b38e3a5b2e
180 tag: tip 180 tag: tip
181 user: test 181 user: test
182 date: Sat Jan 24 03:33:20 1970 +0000 182 date: Thu Jan 01 00:00:00 1970 +0000
183 summary: commit-foo-dot 183 summary: commit-foo-dot
184 184
185 changeset: 0:80b572aaf098 185 changeset: 0:65d4e9386227
186 user: test 186 user: test
187 date: Mon Jan 12 13:46:40 1970 +0000 187 date: Thu Jan 01 00:00:00 1970 +0000
188 summary: commit-foo-subdir 188 summary: commit-foo-subdir
189 189
190 $ cd .. 190 $ cd ..
191 $ cd .. 191 $ cd ..
192 192