⑴ svn不小心ignore了怎麼辦
對於TortoiseSVN,可能版本會有區別,可嘗試:右鍵文件夾\文件夾,選擇菜單:TortoiseSVN->Removefromignorelist(從忽略列表中刪除)或右鍵文件夾\文件夾,選擇菜單:TortoiseSVN->Add(添加)以下操作要謹慎:右鍵文
⑵ linux 下的svn怎麼設置忽略文件
在源代碼工作目錄下執行如下命令:
$ svn propedit svn:ignore .注意:請別漏掉最後的點(.表示當前目錄)
打開的文件就是忽略列表文件了(默認是空的),每一行是一項。在該文件中逐行輸入需要忽略掉的文件或目錄正則表達式,例如:
*.obj
debug
release
⑶ 如何用命令行實現TortoiseSVN命令
TortoiseSVN是一個GUI客戶端,這個自動化指導為你展示了讓TortoiseSVN對話框顯示並收集客戶輸入,如果你希望編寫不需要輸入的腳本,你應該使用官方的Subversion命令行客戶端。
TortoiseSVN的GUI程序叫做TortoiseProc.exe。所有的命令通過參數/command:asdf指定,其中asdf是必須的命令名(命令名詳見」表 1. 有效命令及選項列表「)。大多數此類命令至少需要一個路徑參數,使用/path:"some\path"指定。在下面的命令表格中,命令引用的是/command:asdf參數,餘下的代表了/path:"some\path"參數。
因為一些命令需要一個目標路徑的列表(例如提交一些特定的文件),/path參數可以接收多個路徑,使用*分割。
TortoiseSVN 使用臨時文件在 shell 擴展和主程序之間傳遞多個參數。從 TortoiseSVN 1.5.0 開始,廢棄/notempfile參數,不再需要增加此參數。
The progress dialog which is used for commits, updates and many more commands usually stays open after the command has finished until the user presses theOK button. This can be changed by checking the corresponding option in the settings dialog. But using that setting will close the progress dialog, no matter if you start the command from your batch file or from the TortoiseSVN context menu.
To specify a different location of the configuration file, use the parameter /configdir:"path\to\config\directory". This will override the default path, including any registry setting.
如果想在進度對話框執行完畢後自動關閉,而又不必設置永久性的參數,可以傳遞/closeonend參數。
/closeonend:0 不自動關閉對話框
/closeonend:1 如果沒發生錯誤則自動關閉對話框
/closeonend:2 如果沒發生錯誤和沖突則自動關閉對話框
/closeonend:3如果沒有錯誤、沖突和合並,會自動關閉
下面的列表列出了所有可以使用TortoiseProc.exe訪問的命令,就像上面的描述,必須使用/command:asdf的形式,在列表中,因為節省空間的關系省略了/command的前綴。
表 1. 有效命令及選項列表
命令
描述
:about 顯示關於對話框。如果沒有給命令也會顯示。
:log 打開日誌對話框,/path 指定了顯示日誌的文件或目錄,另外還有三個選項可以設置: /startrev:xxx、/endrev:xxx和/strict
:checkout 打開檢出對話框,/path指定了目標路徑,而/url制定了檢出的URL。
:import 打開導入對話框,/path 指定了數據導入路徑。
:update 將工作副本的/path更新到HEAD,如果給定參數/rev,就會彈出一個對話框詢問用戶需要更新到哪個修訂版本。為了防止指定修訂版本號/rev:1234的對話框,需要選項/nonrecursive和/ignoreexternals。
:commit 打開提交對話框,/path 指定了目標路徑或需要提交的文件列表,你也可以使用參數 /logmsg 給提交窗口傳遞預定義的日誌信息,或者你不希望將日誌傳遞給命令行,你也可以使用/logmsgfile:path,path 指向了保存日誌信息的文件。為了預先填入bug的ID(如果你設置了集成bug追蹤屬性),你可以使用/bugid:"the bug id here"完成這個任務。
:add 將/path的文件添加到版本控制 。
:revert 恢復工作副本的本地修改,/path說明恢復哪些條目。
:cleanup 清理中斷和終止的操作,將工作副本的/path解鎖。
:resolve 將/path指定文件的沖突標示為解決,如果給定/noquestion,解決不會向用戶確認操作。
:repocreate 在/path創建一個版本庫。
:switch 打開選項對話框。/path 指定目標目錄。
:export 將/path的工作副本導出到另一個目錄,如果/path指向另一個未版本控制目錄,對話框會詢問要導出到/path的URL。
:merge Opens the merge dialog. The /path specifies the target directory. For merging a revision range, the following options are available: /fromurl:URL, /revrange:string. For merging two repository trees, the following options are available: /fromurl:URL, /tourl:URL, /fromrev:xxx and /torev:xxx. These pre-fill the relevant fields in the merge dialog.
:mergeall Opens the merge all dialog. The /path specifies the target directory.
: Brings up the branch/tag dialog. The /path is the working to branch/tag from. And the /url is the target URL. You can also specify the /logmsg switch to pass a predefined log message to the branch/tag dialog. Or, if you don't want to pass the log message on the command line, use /logmsgfile:path, where path points to a file containing the log message.
:settings 打開設置對話框。
:remove 從版本控制里移除/path中的文件。
:rename 重命名/path的文件,會在對話框中詢問新文件,為了防止一個步驟中詢問相似文件,傳遞/noquestion。
:diff Starts the external diff program specified in the TortoiseSVN settings. The /path specifies the first file. If the option /path2 is set, then the diff program is started with those two files. If /path2 is omitted, then the diff is done between the file in /path and its BASE. To explicitly set the revision numbers use /startrev:xxx and /endrev:xxx. If/blame is set and /path2 is not set, then the diff is done by first blaming the files with the given revisions.
:showcompare
Depending on the URLs and revisions to compare, this either shows a unified diff (if the option unified is set), a dialog with a list of files that have changed or if the URLs point to files starts the diff viewer for those two files.
The options url1, url2, revision1 and revision2 must be specified. The options pegrevision, ignoreancestry, blame and unified are optional.
:conflicteditor Starts the conflict editor specified in the TortoiseSVN settings with the correct files for the conflicted file in /path.
:relocate 打開重定位對話框,/path指定了重定位的工作副本路徑。
:help 打開幫助文件
:repostatus 打開為修改檢出對話框,/path 指定了工作副本目錄。
:repobrowser Starts the repository browser dialog, pointing to the URL of the working given in /path or /path points directly to an URL. An additional option /rev:xxx can be used to specify the revision which the repository browser should show. If the /rev:xxx is omitted, it defaults to HEAD. If /path points to an URL, the /projectpropertiespath:path/to/wcspecifies the path from where to read and use the project properties.
:ignore 將/path中的對象加入到忽略列表,也就是將這些文件添加到 svn:ignore 屬性。
:blame
為 /path 選項指定的文件打開追溯對話框。
如果設置了 /startrev 和 /endrev 選項,不會顯示詢問追溯范圍對話框,直接使用這些選項中的版本號。
如果設置了 /line:nnn 選項,TortoiseBlame 會顯示指定行數。
也支持 /ignoreeol,/ignorespaces 和 /ignoreallspaces 選項。
:cat 將/path指定的工作副本或URL的文件保存到/savepath:path,修訂版本號在/revision:xxx,這樣可以得到特定修訂版本的文件。
:createpatch 創建/path下的補丁文件。
:revisiongraph 顯示/path目錄下的版本變化圖。
:lock Locks a file or all files in a directory given in /path. The 'lock' dialog is shown so the user can enter a comment for the lock.
:unlock Unlocks a file or all files in a directory given in /path.
:rebuildiconcache Rebuilds the windows icon cache. Only use this in case the windows icons are corrupted. A side effect of this (which can't be avoided) is that the icons on the desktop get rearranged. To suppress the message box, pass /noquestion.
:properties 顯示 /path 給出的路徑之屬性對話框。
Examples (which should be entered on one line):
TortoiseProc.exe /command:commit
/path:"c:\svn_wc\file1.txt*c:\svn_wc\file2.txt"
/logmsg:"test log message" /closeonend:0
TortoiseProc.exe /command:update /path:"c:\svn_wc\" /closeonend:0
TortoiseProc.exe /command:log /path:"c:\svn_wc\file1.txt"
/startrev:50 /endrev:60 /closeonend:0
⑷ SVN添加忽略後,怎麼解除被忽略的文件
如果用的客戶端是TortoiseSVN,對這個文件夾點右鍵,選擇右鍵菜單: TortoiseSVN——從忽略列表中刪除,然後就可以了,很簡單的。 如果顯示鎖定的話,你可以嘗試對上層文件夾執行一次清理操作,右鍵菜單: TortoiseSVN——清理
⑸ svn忽略文件中,括弧內有recursively與沒有,有什麼區別(如下圖)
svn忽略文件中,括弧內有recursively與沒有,有什麼區別?第一步:點擊eclipse中的文件-->新建-->動態網頁-->命名一個自己要建的項目名稱(建設名字為project)。第二步:在第一步中新建的項目上右鍵-->導入-->現有項目到工作空間中-->選擇需要導入的文件系統-->點擊完成。導出過程第一步:在需要導出的項目上右鍵-->導出-->文件系統(假設導出到桌面上)第二步:將導出的文件系統文件中修改工程裡面project這個文件。用記事本打開,修改一下<projectDescription>,<name>projectname</name>中的projectname改為需要導入的名字例如project,然後將整個導出的文件系統文件夾重命名為project,最後執行導入的過程。--------------開始填坑------------1、假如未執行步驟二,若果導入導出的項目在一個workspace中,會報某些項目因位於工作空間目錄中而被隱藏的錯誤。2、使用eclipse進行項目開發,有的時候需要修改項目的名稱,可是在eclipse中部署到tomcat中訪問的時候仍然只能使用舊的項目名稱進行訪問。 比如原來項目的名稱是test,現在我在eclipse中改成了newtest,可是Path仍然是test,這個時候只能通過http://localhost:8080/test進行訪問。遇到這種情況,在你所部署項目的.settings目錄下,找到名字為org.eclipse.wst.common.component的文件,文件是xml格式的。把其中所有涉及到原項目名稱的地方都修改為你最新的項目名稱。最後在eclipse中點擊項目-->清理,重構一下項目即可。
⑹ svn如何設置svn:ignore
svn help 中有 propset propget propdel proplist propedit五個關於prop,也就是svn屬性的設置。
在當前的svn工作拷貝下,svn status有些文件總是提示? 很煩人,所以希望通過設置svn:ignore來避免這種無聊的提示,試了幾下命令,不行,還是看看 svn help propedit吧,終於弄懂了。
一下是svn的這個幫助信息:
復制代碼
propset (pset, ps): Set the value of a property on files, dirs, or revisions.
usage: 1. propset PROPNAME PROPVAL PATH...
2. propset PROPNAME --revprop -r REV PROPVAL [TARGET]
1. Changes a versioned file or directory property in a working .
2. Changes an unversioned property on a repository revision.
(TARGET only determines which repository to access.)
The value may be provided with the --file option instead of PROPVAL.
Note: svn recognizes the following special versioned properties
but will store any arbitrary properties set:
svn:ignore - A newline separated list of file glob patterns to ignore.
svn:keywords - Keywords to be expanded. Valid keywords are:
URL, HeadURL - The URL for the head version of the object.
Author, LastChangedBy - The last person to modify the file.
Date, LastChangedDate - The date/time the object was last modified.
Rev, Revision, - The last revision the object changed.
LastChangedRevision
Id - A compressed summary of the previous
4 keywords.
Header - Similar to Id but includes the full URL.
svn:executable - If present, make the file executable. Use
'svn propdel svn:executable PATH...' to clear.
svn:eol-style - One of 'native', 'LF', 'CR', 'CRLF'.
svn:mime-type - The mimetype of the file. Used to determine
whether to merge the file, and how to serve it from Apache.
A mimetype beginning with 'text/' (or an absent mimetype) is
treated as text. Anything else is treated as binary.
svn:externals - A newline separated list of mole specifiers,
each of which consists of a URL and a relative directory path,
similar to the syntax of the 'svn checkout' command:
http://example.com/repos/zig foo/bar
A revision to check out can optionally be specified to pin the
external to a known revision:
-r25 http://example.com/repos/zig foo/bar
To unambiguously identify an element at a path which has been
deleted (possibly even deleted multiple times in its history),
an optional peg revision can be appended to the URL:
-r25 http://example.com/repos/zig@42 foo/bar
Relative URLs are indicated by starting the URL with one
of the following strings:
../ to the parent directory of the extracted external
^/ to the repository root
// to the scheme
/ to the server root
The ambiguous format 'relative_path relative_path' is taken as
'relative_url relative_path' with peg revision support.
Lines in externals definitions starting with the '#' character
are considered comments and are ignored.
Subversion 1.4 and earlier only support the following formats
where peg revisions can only be specified using a -r modifier
and where URLs cannot be relative:
foo http://example.com/repos/zig
foo/bar -r 1234 http://example.com/repos/zag
Use of these formats is discouraged. They should only be used if
interoperability with 1.4 clients is desired.
svn:needs-lock - If present, indicates that the file should be locked
before it is modified. Makes the working file read-only
when it is not locked. Use 'svn propdel svn:needs-lock PATH...'
to clear.
The svn:keywords, svn:executable, svn:eol-style, svn:mime-type and
svn:needs-lock properties cannot be set on a directory. A non-recursive
attempt will fail, and a recursive attempt will set the property
only on the file children of the directory.
有效選項:
-F [--file] ARG : 從文件 ARG 讀取屬性值
--encoding ARG : 將ARG的值視為字元編碼
-q [--quiet] : 不列印信息,或只列印概要信息
-r [--revision] ARG : ARG (一些命令也接受ARG1:ARG2范圍)
版本參數可以是如下之一:
NUMBER 版本號
'{' DATE '}' 在指定時間以後的版本
'HEAD' 版本庫中的最新版本
'BASE' 工作副本的基線版本
'COMMITTED' 最後提交或基線之前
'PREV' COMMITTED的前一版本
--targets ARG : 傳遞文件 ARG 內容為附件參數
-R [--recursive] : 向下遞歸,與 --depth=infinity 相同
--depth ARG : 限制操作深度是 ARG ('empty', 'files',
'immediates', 或 'infinity')
--revprop : 在版本屬性上操作(使用-r參數)
--force : 強制操作運行
--changelist [--cl] ARG : 只能對修改列表 ARG 的成員操作
全局選項:
--username ARG : 指定用戶名稱 ARG
--password ARG : 指定密碼 ARG
--no-auth-cache : 不要緩存用戶認證令牌
--non-interactive : 不要交互提示
--trust-server-cert : accept SSL server certificates from unknown
certificate authorities without prompting (but only
with '--non-interactive')
--config-dir ARG : 從目錄 ARG 讀取用戶配置文件
--config-option ARG : 以下屬格式設置用戶配置選項:
FILE:SECTION:OPTION=[VALUE]
例如:
servers:global:http-library=serf
復制代碼
復制代碼
ayanmw@ayanmw-desktop:/data/gps-svn/trunk/GPSServer$ svn propset svn:ignore "*.class
*.o
*.out
.gdbinit
.cproject
.project
" .
設置屬性 「svn:ignore」 於 「.」
ayanmw@ayanmw-desktop:/data/gps-svn/trunk/GPSServer$ svn plist
「.」 上的屬性:
svn:ignore
svn:mergeinfo
ayanmw@ayanmw-desktop:/data/gps-svn/trunk/GPSServer$ svn pget svn:ignore
*.class
*.o
*.out
.gdbinit
.cproject
.project
復制代碼
開始我自己嘗試的時候 由於沒有加上路徑. 以為默認會有這個呢。。總提示錯誤,也不提示具體錯誤,直接讓看help。後來加了. 路徑 就OK了!
⑺ 項目與svn同步時發生錯誤怎麼解決
需要對項目目錄進行清理。
⑻ svn 命令 .svnignore 寫法
function __construct($info=array()){
$this->host = $info['h'];
$this->name = $info['u'];
$this->pass = $info['pwd'];
$this->table = $info['dbname'];
$this->connect();
}