2012-04-17 53 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 &