ClearCase,使用动态视图将特定文件夹映射到驱动器 [英] ClearCase, Mapping specific folders into Drives, using dynamic views

查看:93
本文介绍了ClearCase,使用动态视图将特定文件夹映射到驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将目录映射到它自己的驱动器中((我知道使用诸如映射网络驱动器, subst之类的Windows工具是可以实现的),但是使用这些工具,映射的驱动器不再是MVFS ...

I need to map a directory into it's own drive, (i know it's achivable using windows tools like "Map network drive", "subst"), but using these tools, the mapped drives aren't MVFS anymore...

我正在寻找一种将某些动态视图中的MVFS文件夹映射到其自己的驱动器的方法,或者可以选择配置配置规范来过滤除特定文件夹之外的所有内容,例如,配置配置规范,以便:

I'm looking for a way to map MVFS folders in some dynamic view to it's own drive, or alternativly, configure a config spec to filter everything except a specific folder, for example, configure a config spec so that:

M:\some_dynamic_view\some_folder\some_nested_folder
将被映射到:

M:\some_dynamic_view\some_folder\some_nested_folder would be mapped to :

K:\some_nested_folder

K:\some_nested_folder

有什么想法吗?

感谢

(需要将文件夹映射到驱动器是因为Windows上的clearcase路径长度有限制)。

(The need to map folders into drives is because of the clearcase path length limitation on windows).

推荐答案

我主要使用快照视图,所以我认为我不能使用m:\path_to_view解决方案。经过多年在监视器上大喊 doh后,我写了这个批处理文件,以免我每次想运行cleartool命令时都必须将目录更改回视图的原始位置。

I mainly use snapshot views so I don't think I can use the m:\path_to_view solution. After many years of shouting "doh" at my monitor I wrote this batch file to save me having to change directory back to the original location of the view every time I wanted to run a cleartool command.

@echo off
rem ct.bat by Paul Douglas
setlocal
setlocal enabledelayedexpansion
set currentDirectory=%cd:~2,8189%
set currentDrive=%cd:~0,1%

for /f "delims=" %%a in ('subst') do (
set thisDrive=%%a
set thisDrive=!thisDrive:~0,1!
set targetFolder=%%a
set targetFolder=!targetFolder:~8,8183!
if "!thisDrive!"=="%currentDrive%" (
  pushd !targetFolder!%currentDirectory% 
  call cleartool %1 %2 %3 %4 %5 %6 %7 %8 %9 
  popd 
  goto :eof
)
)

call cleartool %1 %2 %3 %4 %5 %6 %7 %8 %9

这篇关于ClearCase,使用动态视图将特定文件夹映射到驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆