Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在我们有一个命令which_repo address/to/file.js可以检测svn文件使用的 repo 并在屏幕上显示答案。看起来像:
which_repo address/to/file.js
svn
myrepo/address/to/file.js
之后我应该输入svn blame cvs/myrepo/address/to/file. 我从which_repo答案中复制的字符串的结尾。
svn blame cvs/myrepo/address/to/file
which_repo
如何编写将在一个步骤中执行此操作的函数,例如:
blame address/to/file.js
创建一个脚本blame:
blame
#!/bin/bash svn blame "cvs/$(which_repo "$1")"