5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

svn diff と diffstat で、変更,更新を考慮したSLOCを考える

Posted at

新規アプリは単純に wc -l で行数(ステップ数)を数えれば良いですが、変更がある場合、単純にdiffを取得すると 差分は2行として数えられます。

で、diffstatのファイル毎出力の追加分と、削除分の多い方を合計すればよい気がします。
なんとなく...

$ svn diff -r 1144:1140 https://example.com/repos/xing/trunk | diffstat -f 4                                 
 lib/Xing/Model/Summary/HExportStream.pm |    9     3     6     0 +++------
 lib/Xing/Model/Summary/HJuchuu.pm       |   16     8     8     0 ++++++++--------
 tmpl/HSummary/SummaryList.html          |   12     6     6     0 ++++++------
 3 files changed, 17 insertions(+), 20 deletions(-)

1行目は、追加:3行 + 削除:6行 = 合計:9行 を表しています

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?