Punching Link Files

I have two projects A and B. I have a constants.java file in A. I want to save a mirror copy of this in B. so that when .java constants ever change their automatic changes in B. Are there any workouts in Perforce.Help me in advance thanks

+3
source share
4 answers

You cannot do this automatically with Perforce, but you can easily configure the cron job (or build job if you have a CI system like Jenkins ) to use the p4 integrate command to merge any changes into B.

+1
source

-, A B A, , , Perforce :

, , Perforce, . , p4 submit script.

constants.java?

+1

, -, SVN svn:externals.

, Perforce , . Perforce, .

/root
   /project-A
      file1
   /project-B
      link-to-file1

-B, . Perforce , . Unix.

0

perforce (aka client) clientview. / - . / , p4 client. project-b, :

//depot/project-a/files/constant.java //project-b-client/files/constant.java

, , .

:
, -a project-b, :
 - /. , . , - .
 - , , perforce, , "constant.java" .
 - , (, ). , "constant.java"?

There are likely to be more problems with this approach. I rather recommend either integrating the file from a to b, or vice versa, or (in a more complex environment) placing the file (perhaps this is not only the source file, but also a jar or a large lib library) in the artifact repository. Then the projects get it from there (through the dependency manager). See ivy or maven or gradle , for example.

These alternatives are certainly much more effort, but in a slightly complex software project they are definitely worth it.

0
source

All Articles