[英]How do I get MKS project details based on filename?
無論如何,要獲得在MKS命令行界面中存在該文件的項目? 我是MKS的CLI腳本的新手,無法找到任何正確的結果。
我想要的就是
-> [命令] [文件名]-> [項目路徑] /project.pj
任何幫助是極大的贊賞。
使用特定配置si locate
命令可以返回注冊文件的一個或多個項目。 此功能僅適用於DB后端存儲庫 ,不適用於RCS存儲庫 。
如果要獲取文件所在的項目,則必須確保MKS存儲庫中僅存在一個具有該名稱的文件,否則,將獲取該文件所在的所有項目。
您可以使用此命令,該命令對我來說效果很好,也可以根據需要進行自定義
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找到幫助
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"
至於si找到:
只要您當前的目錄位於已注冊沙箱的樹中,您就可以記住
si locate filename
例如
c:\>my_sandboxes\prjA\src>si locate main.c
您可能會獲得多個結果/答案,例如。 如果項目具有變體和/或歸檔在多個項目中共享,則服務器。
如果您希望從gui中獲得Member-> Locate的所有復雜功能,則可以閱讀一些參考資料,例如。 SourceCLIReference_Integrity_10_4.pdf或類似已經提到的。
si locate help
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.