문제

find . -type f -print | p4 -x - add

This adds all files from $PWD and its sub directories, but it prints the message can't add existing file for files already in perforce.

How do I add only new files which are not in P4?

도움이 되었습니까?

해결책

For Perforce versions 12.1 and above, you can use the command p4 reconcile, which will reconcile any added, deleted, or edited files outside of Perforce. To use it specifically to add files, type p4 reconcile -a.

Just a note though, it doesn't do any harm to do the command you are doing. It issues a warning for any files already existing, but that's it. It will still add the files that don't currently exist in Perforce. Your command is the way I have done it until the p4 reconcile command was created.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top