在 Unix 上的 Perforce 中,如何添加符号链接目录?
我在 Unix 中创建了一个符号链接目录,我想将其添加到 perforce。
(这个问题与 Unix 上的符号链接有关。Windows 符号链接的行为可能与 Unix 非常不同。)
- ../blah/dir1 是源目录,其中包含 Perforce 中已有的文件
- dir2 是我要签入的源目录的符号链接
ln -s ../blah/dir1 dir2
如果我在 p4v GUI 中右键单击“dir2”,它将添加将 ../blah/dir1 下的每个文件作为新文件(即使这些文件已经在 Perforce 中)并 fubar 所有内容。
如果我从命令行执行“p4 add dir2”,它会将 ../blah/dir1 下的每个文件添加为新文件(即使这些文件已经在 Perforce 中)并关闭所有内容。
正确的语法是什么?
I have created a symbolic link directory in Unix and I would like to add it to perforce.
(this question relates to symlinks on Unix. Windows symbolic links can have very different behaviour from Unix.)
- ../blah/dir1 is the source directory, which contains files that are already in Perforce
- dir2 is the symlink to the source directory that I want to check in
ln -s ../blah/dir1 dir2
If I right-click on "dir2" in the p4v GUI, it will add every file under ../blah/dir1 as a new file (even if these files are already in Perforce) and fubar everything.
If I do a "p4 add dir2" from the command line, it will add every file under ../blah/dir1 as a new file (even if these files are already in Perforce) and fubar everything.
What is the correct syntax?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 -t 选项设置符号链接类型,从 shell 添加符号链接。
Add the symbolic link from the shell using the -t option to set the symlink type.
Perforce 能够自行检测符号链接,无需在命令中添加特殊选项。只需像下面这样的常规命令就足以满足需要
Perforce is able to detect symlinks itself and no special options need to be added in the command. Just regular command like following suffices the need