首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何根据文件名获取MKS项目详情?

如何根据文件名获取MKS项目详情?
EN

Stack Overflow用户
提问于 2014-12-10 20:05:20
回答 2查看 1.3K关注 0票数 0

有没有办法在MKS命令行界面中获取文件所在的项目?我是MKS的CLI脚本新手,找不到任何合适的结果。

我想要的就是

->命令->项目路径/project.pj

任何帮助都是非常感谢的。

EN

回答 2

Stack Overflow用户

发布于 2015-08-05 21:35:37

带有特定配置的命令si locate可以返回注册文件的项目。此功能仅在DB后端存储库中可用,不能与RCS存储库一起使用。

如果您想获取该文件所在的项目,则必须确保MKS存储库中只存在一个同名文件,否则将获取该文件所在的所有项目。

您可以使用此命令,它对我来说工作得很好,或者您可以根据需要进行自定义

代码语言:javascript
复制
si locate –hostname=%mks_Hostname% --port=%msk_Port% --user=%mks_User% --depth=all --devpathscope=all --exactmatch --listfields=devpath,name,project,checkpoints,dates --memberbyname="%Filename%"

si locate帮助

代码语言:javascript
复制
Usage: si locate options... current or former member/subproject; options are:
    --[no]casesensitive  Make search case sensitive (default is --nocasesensitive for case insensitive servers)
    --depth=[current|build|all]  How much historical data should be encompassed in the search
    --devpathscope=[this|others|all]  Which devpaths should be encompassed in the search
    --distinct=[project|devpath|registeredproject]  In distinct mode, what output should be displayed
    --[no]exactmatch  Match search string exactly (default is --noexactmatch)
    --height=value  The height in pixels of the windows
    --[no]limittoactivepaths  Limit search to active projects
    --listfields=field1[:width1],field2[:width2]... where fieldn can be any of: checkpoints,configPath,dates,devpath,flatPath,name,project,registeredproject,revisions
    --memberbyname=value  The search string for Locate member by name
    --mode=[distinct|list]  Output mode
    --numberofresults=value  The maximum number of results to return
    --projectscope=[this|others|all]  Which projects should be encompassed in the search
    -r value  lookup a single revision (for members)
    --revision=value  lookup a single revision (for members)
    --subprojectbyname=value  The search string for Locate subproject by name
    --width=value  The width in pixels of the windows
    -x value  The x location in pixels of the window
    -y value  The y location in pixels of the window
    --devpath=value  The development path (to refer variant projects)
    --[no]failOnAmbiguousProject  Whether to abort when multiple projects correspond to a flat project string.
    -P value  The name of the target project
    --project=value  The name of the target project
    --projectRevision=value  The project revision (to refer build projects)
    -S value  The name of the sandbox (can be used as project redirector)
    --sandbox=value  The name of the sandbox (can be used as project redirector)
    -?  Shows the usage for a command
    --[no]batch  Control batch mode (no user interaction in batch mode)
    --cwd=value  Act as if command executed in specified directory
    --forceConfirm=[yes|no]  Specify an answer to all confirmation questions
    -g  User interaction should happen via the GUI
    --gui  User interaction should happen via the GUI
    --hostname=value  Hostname of server
    -N  Responds to all confirmations with "no"
    --no  Responds to all confirmations with "no"
    --password=value  Credentials (e.g., password) to login with
    --port=value  TCP/IP port number of server
    --quiet  Control status display
    --settingsUI=[gui|default]  Control UI for command options
    --status=[none|gui|default]  Control status display
    --usage  Shows the usage for a command
    --user=value  Username to login to server with
    -Y  Responds to all confirmations with "yes"
    --yes  Responds to all confirmations with "yes"
票数 1
EN

Stack Overflow用户

发布于 2016-09-01 19:53:17

至于si locate:

假设您的当前目录在已注册沙箱的树中的某个位置,您可以只记住

代码语言:javascript
复制
si locate filename

例如

代码语言:javascript
复制
c:\>my_sandboxes\prjA\src>si locate main.c

你可能会得到多个结果/答案。如果项目有变体和/或归档在多个项目中共享,则服务器。

如果你想要Member->Locate from the gui的所有复杂功能,你应该阅读一些参考资料,例如。SourceCLIReference_Integrity_10_4.pdf或类似的已经提到过的。

代码语言:javascript
复制
si locate help
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27400575

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档