2012-04-17 30 views
1

我需要在服務器上執行一些svn更新。是否可以在不移動目錄的情況下執行svn updatesvn更新而不移動到該目錄

只是想保持整潔,而不是圍繞cd'ing遍佈服務器:-)

預先感謝您

回答

2

是的,只是

svn update /path/to/dir/to/update 

作品就好了。更新它時不需要在目錄中。

同樣,您可以更新單個文件。

svn update /path/to/dir/to/update/config.ini 

(上顛覆1.6.17測試)

1
$ svn help update 

update (up): Bring changes from the repository into the working copy. 
usage: update [PATH...] 

    If no revision is given, bring working copy up-to-date with HEAD rev. 
    Else synchronize working copy to revision given by -r. 

    For each updated item a line will start with a character reporting the 
    action taken. These characters have the following meaning: 

,所以像

SVN更新的/ home/naishe /工作區

將工作

+1

@Dogsbody,闡述這樣的回答:'SVN help'會給你SVN的命令列表。 'snv help '或'svn --help'然後將幫助您執行該特定命令。 – 2012-04-17 13:53:07

0

一個分機拉你,因爲我喜歡你的問題。假設您正在處理的目錄列表是a,b,c ... z。

你可以做到這一點的話,你一些額外的線路:

爲DIR在A B C ... Z;做 svn update $ DIR; done

(Bash語法)。如果你很着急,並希望這些更新同時發生(將要求目錄在不同的樹中,即它們在其父目錄中沒有共同的.svn)將在後臺運行更新!

for DIR in a b c ... z;做 SVN更新$ DIR &