0
votes

Maybe some Perforce gurus could provide some advice.

We have a depot, with a setting.xml file in central folder:

///depot/central/config/setting.xml 

and would like it to be instanced in several locations, like:

///depot/projectA/tool1/config/setting.xml
///depot/customerB/tool2/config/setting.xml

The benefit is for maintenance. the setting.xml file only has to be updated once in //depot/central, then all files in the other places get updated as well, so we don't have to get into each place, duplicate it again and again.

AlienBrain has a feature called 'shortcuts', does Perforce have something similar?

We've tried use the OS' symbolic links feature, but it didn't behave the way expected -- cloned files still need to be checked-out first, then check them in again -- this makes the cloned files own their own revisions against the original one.

It's better to just keep the original and cloned files have the same revisions. so if submitting a new revision to setting.xml(5/5)(which makes it to be setting.xml(6/6)), the cloned files as this point still remains setting.xml(5/6). Thus, people on projectA & customerB can simply sync to the latest version.

Thanks.

1

1 Answers

0
votes

You can use the Perforce client spec to map files from the depot into your workspaces, which should do almost exactly what you're looking for.

For example, your client spec for tool 1 would be something like:

//depot/projectA/tool1/... //workspace_for_tool1/...
//depot/central/config/setting.xml //workspace_for_tool1/config/setting.xml

And your client spec for tool 2 would be something like:

//depot/customerB/tool2/... //workspace_for_tool2/...
//depot/central/config/setting.xml //workspace_for_tool2/config/setting.xml

The main downside of this approach is that you need to make this change in every client spec, and you need some infrastructure dedicated to propagating client specs to new workspaces.