Mercurial > hg
comparison tests/test-churn.t @ 46430:b84c3d43ff2e
churn: count lines that look like diff headers but are not
Previously, churn cannot count added lines that start with "++ " or removed
lines that start with "-- ".
Differential Revision: https://phab.mercurial-scm.org/D9929
author | Aay Jay Chan <aayjaychan@itopia.com.hk> |
---|---|
date | Sat, 30 Jan 2021 18:30:11 +0800 |
parents | 81e4f039a0cd |
children |
comparison
equal
deleted
inserted
replaced
46429:e61c2dc6e1c2 | 46430:b84c3d43ff2e |
---|---|
193 alltogether 11 ********************************************************* | 193 alltogether 11 ********************************************************* |
194 $ hg churn -T 'alltogether' | 194 $ hg churn -T 'alltogether' |
195 alltogether 11 ********************************************************* | 195 alltogether 11 ********************************************************* |
196 | 196 |
197 $ cd .. | 197 $ cd .. |
198 | |
199 count lines that look like headings but are not | |
200 | |
201 $ hg init not-headers | |
202 $ cd not-headers | |
203 $ cat > a <<EOF | |
204 > diff | |
205 > @@ -195,3 +195,21 @@ | |
206 > -- a/tests/test-churn.t | |
207 > ++ b/tests/test-churn.t | |
208 > EOF | |
209 $ hg ci -Am adda -u user1 | |
210 adding a | |
211 $ hg churn --diffstat | |
212 user1 +4/-0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
213 $ hg rm a | |
214 $ hg ci -Am removea -u user1 | |
215 $ hg churn --diffstat | |
216 user1 +4/-4 +++++++++++++++++++++++++++--------------------------- |