vi ~/.bashrc,增加一个function

 svnlog(){
svn log "$@" | awk -f <(cat <<EOF
#!/usr/bin/awk -f # Convert the "svn log" output into a one liner format, which is easier to grep
# or use in scripts. Pipe "svn log" into this script # When we get a line that starts with a revision number, put the data in variables
/^r[-]+/ {
rev=\$
user=\$
date=\$
time=\$
lines=
} # Anything that isn't a revision line, a separator line or an empty line
# will be part of the commit message. Concatenate these into the comment variable
! (/^r[-+]/ || /^-+$/ || /^$/) {
comment = comment \$
} # With every separator line, output what we stored before and reset the comment variable
# To skip the first line we also check if we've already stored a revision
/^-+$/ && rev {
print rev " | " user " | " date " | " time " | " comment
comment = ""
}
EOF
)
}

awk正则表达式参考的是:https://gist.github.com/plexus/1485222

使用方法:svnlog -l 10

〖Linux〗svn log 每个日志记录只显示一行的方法的更多相关文章

  1. (转)解决ScrollView嵌套ListView或者GridView导致只显示一行的方法

    即动态获取ListView和GridView的高度 一.对于ListView ListView listview= new ListView(this); setListViewHeightBased ...

  2. ScrollView中嵌套GridView,ListView只显示一行的解决办法

    转载:http://blog.csdn.net/luohai859/article/details/39347583 关于为什么只显示一行,个人理解是:如果单独使用GridView和ListView, ...

  3. 解决lScrollView嵌套ListView只显示一行的问题,listvie显示全部的item

    ScrollView嵌套ListView只显示一行的问题 1.思路:给listview重新添加一个高度. listview的高度==listview.item的高度之和. 2.注意:关键是添加list ...

  4. RecyclerView, ListView 只显示一行内容 问题解决

    Adapter 中的data有多行,但是RecyclerView只显示一行. 原因出在item的layout xml, 用了自动生成的RelativeLayout, 她的默认高度height属性是ma ...

  5. ScrollView嵌套ListView只显示一行

    错误描述 ScrollView嵌套ListView中导致ListView高度计算不正确,只显示一行. 解决方法 重写ListView的onMeasure方法,代码如下. @Override publi ...

  6. NestedScrollView嵌套ListView时只显示一行的解决方法

    在使用CoordinatorLayout和AppBarLayout实现嵌套滑动的时候,出现listview没有嵌套滑动: 如果要实现嵌套滑动,则需要添加NestedScrollView,但是结果发现l ...

  7. ScrollView嵌套ListView只显示一行之计算的高度不正确的解决办法(转)

    ScrollView嵌套ListView只显示一行之计算的高度不正确的解决办法 分类: android应用开发2013-12-19 09:40 1045人阅读 评论(3) 收藏 举报 AndroidS ...

  8. 如何让div中的文字只显示一行,多余的文字隐藏并加上省略号(超链接形式)

    写页面的时候遇到了一个小小的问题,如何让div中一行超链接文字只显示一行,多余的文字隐藏并加上省略号,悬浮时隐藏的文字显示出来?解决问题时发现了css3的一个新标签  text-overflow  , ...

  9. Android recyclerview 只显示一行 宽度不适配

    最近学习recyclerview 遇到的问题 1.宽度不适配 正确写法 LayoutInflater.from(context).inflate(R.layout.item_view,parent,f ...

随机推荐

  1. centos7中使用yum安装tomcat以及它的启动、停止、重启

    centos7中使用yum安装tomcat 介绍 Apache Tomcat是用于提供Java应用程序的Web服务器和servlet容器. Tomcat是Apache Software Foundat ...

  2. MVC异步分页

    如图: 1: 控制器代码 // // GET: /AjaxUser/ shopEntities shop = new shopEntities(); public ActionResult Index ...

  3. JAVAWEB开发之HttpServletResponse和HttpServletRequest详解(下)(各种乱码、验证码、重定向和转发)

    HttpServletRequest获取请求头信息  (1)获取客户机请求头 String getHeader(String name) Enumeration<String> getHe ...

  4. webrequest HttpWebRequest webclient/HttpClient

    webrequest(abstract类,不可直接用) <--- (继承)---- HttpWebRequest(更好的控制请求) <--- (继承)---- webclient (简单快 ...

  5. Unreal Engine 4 减少编辑器的帧率

    默认的,打开UE4的编辑器,显卡会以全速渲染场景,在我的机器上.是120FPS. 整个机器就開始轰鸣了.资源占用太凶了.事实上全然不是必需这样,帧率在60左右就足够了. 那怎么改动呢,试了非常多办法. ...

  6. JavaScript:Array 对象

    ylbtech-JavaScript:Array 对象 1. 返回顶部 Array 对象 Array 对象用于在单个的变量中存储多个值. 创建 Array 对象的语法: new Array(); ne ...

  7. 7.1 服务暴露前的准备-ServiceBean的装配

    dubbo的服务暴露以第一章 第一个dubbo项目中的dubbo-demo-provider来讲述. 列出dubbo-demo-provider的xml配置: <?xml version=&qu ...

  8. tensorflow语义分割api使用(deeplab训练cityscapes)

    安装教程:https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/installation.md citysca ...

  9. python 听课笔记(二)

  10. AI 也开源:50 大开源 AI 项目 (转)

    这些开源AI项目专注于机器学习.深度学习.神经网络及其他应用场合. 自IT界早期以来,研制出能像人类那样“思考”的机器一直是研究人员的一大目标.在过去几年,计算机科学家们在人工智能(AI)领域已取得了 ...