我想运行hg status并显示更改后的文件的完整路径?
为什么?因为我想显示对 3 个不同存储库的更改,并且默认情况下 hg 显示相对于存储库根的更改。
hg status手册页中没有任何内容表明 Mercurial 直接支持这一点。
来点sed魔法怎么样?
$ pwd
/var/www/mysite
$ hg st
A static/logo.png
M static/style.css
? temp.txt
$ hg st | sed -e "s~^\(.\) ~\1 ${PWD}/~g"
A /var/www/mysite/static/logo.png
M /var/www/mysite/static/style.css
? /var/www/mysite/temp.txt
Run Code Online (Sandbox Code Playgroud)
您可以使用 shell 别名(在手册中描述)来让 Mercurial 执行此操作,而不是常规的hg st。
| 归档时间: |
|
| 查看次数: |
570 次 |
| 最近记录: |