Jump to content


Can I provide diffrent p4 branch path in a symlink file?

symlink branching

  • Please log in to reply
1 reply to this topic

#1 saurabh

saurabh

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 10 February 2014 - 11:54 AM

Hi,

I need to provide different p4 branch path in my current branch as a symbolic link. For eg.

Current working branch: //depot/ws/trunk/

Source p4 branch: //depot/ws/main/

and I need to create a symbolic link such as:

link -> //depot/ws/main/

which I need to add in my current directory i.e. trunk.

Is that permissible? If yes, can I use this link to access files in source directory in read-only mode? For e.g.

If there is a script named script.sh under //depot/ws/main/ , can I execute it using the following command from //depot/ws/trunk/:

sh link/script.sh

Thanks,
Saurabh

#2 P4Matt

P4Matt

    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 10 February 2014 - 06:31 PM

As long as you only map a given file once that should be fine. Do you want to use an OS symlink, or would you like to map the file into your workspace? If it's the latter all you should have to do is add a line to your workspace like:

//depot/ws/main/script.sh //my-client/depot/ws/trunk/link/script.sh

In this case it will not be a symlink; you'll get a very real copy of the file that you can use and edit. It's is not a read-only copy though. You can change the file and submit those changes.





Also tagged with one or more of these keywords: symlink, branching

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users