〖LINUX〗SVN log shows only one row of methods per log record

Source: Internet
Author: User

VI ~/.BASHRC, add a function

1 Svnlog () {2SVN log"[email protected]"|awk-F < (Cat<<EOF3#!/usr/bin/awk-F4 5# Convert the"SVN log"Output into a one liner format,whichis easier togrep6# or useinchScripts. Pipe"SVN log"Into this script7 8# when we get a line this starts with a revision number, put the datainchvariables9/^r[0-9]+/ {Tenrev=\$1 Oneuser=\$3 A     Date=\$5 -      Time=\$6 -lines= - the } -  -# anything that isn't A revision line, a separator line or an empty line - # would be a part of the commit message. Concatenate these into the comment variable +! (/^r[0-9+]/ || /^-+$/ || /^$/) { -Comment = Comment \$0 + } A  at # with every separator line, output what we stored before and reset the comment variable -# to skip the first line we also checkifWe've already stored a revision -/^-+$/&&Rev { -Print Rev" | "User" | " Date " | "  Time " | "Comment -Comment ="" - } in EOF - ) to}

The awk Regular expression reference is: https://gist.github.com/plexus/1485222

How to use: Svnlog-l 10

〖LINUX〗SVN log shows only one row of methods per log record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.