在一行中获取SVN签入日期和评论

时间:2019-02-04 11:50:01

标签: svn

svn log -l1

返回:

r82357 | Billy Murphy | 2019-01-27 11:24:40 +0000 (Fri, 25 Jan 2019) | 1 line

API-41: Added new method in existing class for validation

我不在乎作者。只有日期和评论。我有什么办法可以得到那一行?

1 个答案:

答案 0 :(得分:0)

您可以尝试以下PowerShell代码段:

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)

    NotificationCenter.default.addObserver(self, selector: #selector(applicationDidEnterBackground), name: UIApplication.didEnterBackgroundNotification, object: nil)
}

override func viewDidDisappear(_ animated: Bool) {
    super.viewDidDisappear(animated)

    NotificationCenter.default.removeObserver(self, name: UIApplication.didEnterBackgroundNotification, object: nil)
}

@objc private func applicationDidEnterBackground() {

    //Do your stuff here
}

它打印日志消息和最近3次提交的日期。这是一个示例:

$x = [xml](svn log https://svn.apache.org/repos/asf/subversion/trunk -l 3 --xml)

$x.log.logentry | Format-List -Property @{n='Date'; e={($_.Date)}}, @{n='Log message'; e={($_.msg)}}

您还可以将Date : 2019-01-31T21:28:04.122821Z Log message : * subversion/libsvn_client/wc_editor.c (svn_client__wc_copy_mods): Remove the WC locking, now that the WC editor does it, following r1852559. Date : 2019-01-31T19:36:52.166250Z Log message : Comment out a failing swig-rb test. Issue 4805, "delta path editor binding broken for root path". * subversion/bindings/swig/ruby/test/test_delta.rb (test_path_driver): Comment out (as no XFail mechanism is available). Date : 2019-01-31T16:51:48.130607Z Log message : Improve backward compatibility for svn_delta_path_driver2(). This ensures the input array is not modified, and changes the behaviour to be less surprising. * subversion/include/svn_delta.h, subversion/libsvn_delta/deprecated.c (svn_delta_path_driver2): Add back slash prefixes if any, rather than the first, of the inputs had one. Duplicate the array if modifying it. cmdlet替换为Format-List,输出将有所不同:

Select-Object