0
0

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.

subversion のログをきれいに出力(powershell版)

Last updated at Posted at 2020-03-22

この記事では

subversionのログを出す時にpowershellで整える方法を紹介します。

想定シーン

windows環境でsubversionのログを出力し、比較・精査したい時

解決したい課題

普通にログを出すと次のように --------- が表示されます。
これを取り除きたい

>svn log -q 
------------------------------------------------------------------------
r15 | user1 | 2020-03-22 17:34:24 +0900 (日, 22 3 2020)
------------------------------------------------------------------------
r14 | user1 | 2020-03-08 19:15:54 +0900 (日, 08 3 2020)
------------------------------------------------------------------------
r13 | user1 | 2020-03-08 19:13:23 +0900 (日, 08 3 2020)
------------------------------------------------------------------------

方法

linuxでは普通にgrep -vだが、
powershellではgrepの代わりにSelect-String (文字列) -NotMatchを使う。

svn log -q | Select-String "^-" -NotMatch 
(実行結果)
r15 | user1 | 2020-03-22 17:34:24 +0900 (日, 22 3 2020)
r14 | user1 | 2020-03-08 19:15:54 +0900 (日, 08 3 2020)
r13 | user1 | 2020-03-08 19:13:23 +0900 (日, 08 3 2020)
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?