linux cont配置svn,SVN命令用于创建包含内容的远程文件夹和文件(SVN commands to create remote folders and files with content)...

SVN命令用于创建包含内容的远程文件夹和文件(SVN commands to create remote folders and files with content)

我目前正在处理我的应用程序的安装脚本( .cmd文件)。 使用时,此脚本应创建一个cmd,它在远程SVN存储库中创建文件夹和文件。 我使用的当前命令是:

svn mkdir -m“Setup”“。$ svn_root_repository。”/ NEW_FOLDER1“

其中$svn_root_repository是远程SVN存储库。该命令在存储库中创建新文件夹NEW_FOLDER1 ,到目前为止没问题。

使用该命令,我直接进行提交。 我真正想要的是一次创建和提交多个文件夹(也包含内容的文件)。 有没有办法在飞行中创建它们?

我想要创建文件夹的存储库与.cmd文件(当前包含svn命令)的位置不同,所以我不能使用svn add ,因为据我所知svn add了在同一个存储库中。 或者是否有类似可选参数的东西?

I currently work on a setup script (.cmd file) for my application. When used, this script shall create a cmd, which creates folders and files in a remote SVN repository. The current command I use is:

svn mkdir -m "Setup" ".$svn_root_repository."/NEW_FOLDER1"

where $svn_root_repository is a remote SVN repository.That command creates the new folder NEW_FOLDER1 in the repository, no problem so far.

With that command I do a commit directly. What I really want is to create and commit multiple folders at once (also files with content). Is there a way to create them on-the-fly?

The repository I want to create the folders in is NOT the same as where the .cmd file (which currently contains the svn commands) lies, so I can't use svn add, because svn add adds, as far as I know, only in the same repository. Or is there something like an optional parameter?

原文:https://stackoverflow.com/questions/18695596

更新时间:2020-05-17 15:05

相关问答

假设我在目录~/local_dir/myNewApp有代码,我想把它放在“ https://svn.host/existing_path/myNewApp ”下(同时可以忽略一些二进制文件,供应商库等)。 在存储库中创建一个空文件夹svn mkdir https://svn.host/existing_path/myNewApp 转到项目的父目录cd ~/local_dir 查看本地文件夹中的空目录。 不要害怕 - 您本地的文件不会被删除。 svn co https://svn.host/exis

...

您应该能够像这样明确地使用文件系统提供程序: ls filesystem::\\server\d$\log

You should be able to use the filesystem provider explicitly like this: ls filesystem::\\server\d$\log

经过一段时间的反复试验,我找到了正确的语法。 要将代码上传到远程: C:\some\random\path\to\TortoiseSVN\bin\TortoiseMerge.exe -base "!^!" -mine "!"

要将代码下载到本地: C:\some\random\path\to\TortoiseSVN\bin\TortoiseMerge.exe -mine "!^!" -base "!"

"!^!" 表示本地文件, "!" 代表远程文件。 请记住,在TortoiseMerge中,

...

不,你不能用Git做到这一点。 在Git中,每个提交都被视为一个原子实体; 你无法挑选和选择推送的特定提交的部分。 如果要分解存储库,以便某些东西只在本地跟踪,而某些东西被推送到服务器,则应为每个部分使用单独的存储库,可能使用Git子模块链接在一起。 No, you can't do this with Git. In Git, each commit is treated as one atomic entity; you can't pick and choose parts of a par

...

forfiles在/C选项之后执行命令行,当前迭代的目录作为工作目录。 /S选项也是如此。 引用@file返回纯(引用)文件名; 引用@relpath返回相对于给定根的路径(在/P选项后面,默认为当前目录)。 所以你可以试试这样的东西(注意cmd /C前缀是cmd -internal命令所必需的,例如move , echo或if ;大写的ECHO只显示将在没有的情况下执行的move命令行): forfiles /S /D -90 /C "cmd /C if @isdir==FALSE ECHO m

...

您可以使用glob()仅根据下面的GLOB_ONLYDIR标志选择文件夹。 并使用basename()来获取文件夹名称。 $a = glob("../language/*", GLOB_ONLYDIR ); // $a has only folders

foreach($a as $file){

echo(basename($file));

}

You can use glob() to select only folders simply as per below with GLOB_

...

我认为这样做你想要的: @ECHO OFF

SETLOCAL

set "basepath=C:\Users\Desktop\Main\"

set "filter=*.txt"

set "targetpath=C:\Users\Desktop\final_location\"

echo scanning %basepath%%filter%

for %%i in ("%basepath%%filter%") do (

for /F "tokens=1,2,3 delims=@)" %%a i

...

我认为你的问题是指定一个通配符。 您可以使用带有斜杠的目录中的递归副本来避免此困难: scp -r root@64.211.219.95:/var/www/ root@42.11.37.153:/var/www/project_dir

scp命令可以从您喜欢的任何服务器运行,不限于源计算机或目标计算机。 I presume that your problem is with specifying a wildcard. You can avoid this difficulty using a

...

在VS2012和其他版本中,确保在解决方案资源管理器中选择了“显示所有文件”选项。 这将显示项目中的所有内容,子文件夹和文件。 如果您使用任何源代码控制,请确保右键单击要添加的文件夹或文件,然后从弹出菜单中选择“包含在项目中”。 相反的情况也适用于“从项目中排除”。 当我第一次进入VS时,我遇到了这个问题,并且在通过Windows资源管理器添加内容时非常沮丧,但却无法看到解决方案资源管理器中显示的内容。 in VS2012 and others, make sure that you have t

...

这听起来像svn import可能会成功吗? http://svnbook.red-bean.com/en/1.7/svn.tour.importing.html#svn.tour.importing.import It sounds like svn import might do the trick? http://svnbook.red-bean.com/en/1.7/svn.tour.importing.html#svn.tour.importing.import

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值