如何列出 CVS 存储库中的所有模块?
是否有命令返回 CVS 存储库中包含的模块名称列表?
作为 CVS 的新手,我想应该有一些类似于
cvs -d /usr/local/cvs listmodules
我应该用什么替换 listmodules
来获取 CVS 存储库中所有模块的列表?
为了解决 Dewfy 的评论,cvs --help-commands
返回以下内容:
add 将新文件/目录添加到存储库 admin rcs 的管理前端 annotate 显示每行被修改的最后修订版本 checkout 签出源进行编辑 commit 将文件签入存储库 diff 显示修订版之间的差异 编辑 准备好编辑监视的文件 编辑者 查看谁正在编辑监视的文件 从CVS导出源,类似于checkout 历史记录 显示存储库访问历史记录 import 使用供应商分支将源导入 CVS init 创建 CVS 存储库(如果不存在) kserver Kerberos 服务器模式 log 打印出文件的历史信息 登录提示输入密码以验证服务器 注销 删除远程存储库的 .cvspass 中的条目 pserver 密码服务器模式 rannotate 显示模块每一行被修改的最后修订版本 rdiff 创建版本之间的“补丁”格式差异 release 表示某个模块不再使用 从存储库中删除条目 rlog 打印出模块的历史信息 rtag 添加符号标签到模块 服务器 服务器模式 status 显示检出文件的状态信息 tag 添加符号标签到文件的签出版本 unedit 撤消编辑命令 更新使工作树与存储库同步 version 显示当前 CVS 版本 手表 套装手表 观察者 查看谁正在观察文件
CVS 版本是1.11.22。
Is there a command that returns a list of module names contained within a CVS repository?
Being a newbie to CVS, I imagine that there should be something along the lines of
cvs -d /usr/local/cvs listmodules
What should I substitute listmodules
with to get a list of all modules within the CVS repository?
To address Dewfy's comment, cvs --help-commands
returns the following:
add Add a new file/directory to the repository admin Administration front end for rcs annotate Show last revision where each line was modified checkout Checkout sources for editing commit Check files into the repository diff Show differences between revisions edit Get ready to edit a watched file editors See who is editing a watched file export Export sources from CVS, similar to checkout history Show repository access history import Import sources into CVS, using vendor branches init Create a CVS repository if it doesn't exist kserver Kerberos server mode log Print out history information for files login Prompt for password for authenticating server logout Removes entry in .cvspass for remote repository pserver Password server mode rannotate Show last revision where each line of module was modified rdiff Create 'patch' format diffs between releases release Indicate that a Module is no longer in use remove Remove an entry from the repository rlog Print out history information for a module rtag Add a symbolic tag to a module server Server mode status Display status information on checked out files tag Add a symbolic tag to checked out version of files unedit Undo an edit command update Bring work tree in sync with repository version Show current CVS version(s) watch Set watches watchers See who is watching a file
The CVS version is 1.11.22.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如这个答案中已经描述的那样基本上有三种方法可以解决这个问题。哪一个适合您的情况首先取决于您在客户端和服务器上使用的 CVS 版本,其次取决于您对“模块”的定义。
如果您指的是 CVS 作者最初想到的模块,即作为
CVSROOT/modules
文件中的条目,则cvs co -c
或 < code>cvs co -s 会给你这个,两者之间的唯一区别是后者将按“状态”对输出进行排序。您可以在此处阅读有关模块文件的信息: http://cvsbook.red-bean.com/ cvsbook.html#modules如果您至少使用 CVS 1.12.8 或 CVSNT,并且您的模块想法更多地对应于存储库中的实际目录,那么
cvs ls
应该是最后,如果您确实需要远程目录列表,但您的服务器正在运行旧版本的 CVS,那么有一个技巧:首先执行“假”签出,然后模拟递归更新:
cvs -d [CVSROOT] co -l 。
cvs -n up -d
As already described in this answer there are basically three ways to go about this. Which one suits your situation depends firstly on what versions of CVS you are using on both client and server and secondly on your definition of "modules".
If you are referring to modules as they were originally thought of by the CVS authors, i.e. as entries in the
CVSROOT/modules
file thencvs co -c
orcvs co -s
will give you that, the only difference between the two being that the latter will sort the output by "status". You can read about the modules file here: http://cvsbook.red-bean.com/cvsbook.html#modulesIf you are using at least CVS 1.12.8 or CVSNT and your idea of modules corresponds more to actual directories inside the repository, then
cvs ls
should be what you want.Finally, if you are indeed after a remote directory listing but your server is running an older version of CVS, then there's the trick of first performing a "fake" checkout and then simulating a recursive update:
cvs -d [CVSROOT] co -l .
cvs -n up -d
使用以下内容:
根据此 http://www.cvsnt.org/manual/html/ ls.html 有同义词:dir、list、rls
当然,不要忘记通过以下方式查看所有可用命令:
Use following:
According to this http://www.cvsnt.org/manual/html/ls.html there are synonyms: dir,list,rls
And of course don't forgive to review all available commands by:
您可以运行
以列出 CVS >= 1.11 中的树(请参阅 cvs --version),或运行
以查看模块配置文件。
You can run
to list the tree in CVS >= 1.11 (see cvs --version), or run
to see the module configuration file.