How to exclude folder from stream temporarily then include it later on - perforce

I want to download a stream to a workspace and exclude certain folder(because it's too large)
then when I am done downloading I want to download it to my workspace
so
1- how to exclude a folder from stream
2- how to include the same folder without messing anything

If you only want to exclude it from your initial sync operation, you don't necessarily need to modify the stream at all. (Modifying the stream may potentially impact other workspaces using the same stream, which you don't want.)
Edit your client to point at the new stream (in this instance you don't want to use p4 switch since that auto-syncs the new stream), and then sync only the folders that you need (i.e. enumerate all the top-level folders except for the big folder in your sync command).
The next time you do an unrestricted sync, it will pick up everything that hasn't been downloaded, including the big folder that you avoided the first time around.

Related

azure data factory: iterate over millions of files

Previously I had a problem on how to merge several JSON files into one single file,
which I was able to resolve it with the answer of this question.
At first, I tried with just some files by using wild cards in the file name in the connection section of the input dataset. But when I remove the file name, theory tells me that all of the files in all folders would be loaded recursively as I checked the copy recursively option, in the source section of the copy activity.
The problem is that when I manually trigger the pipeline after removing the file name from the input of the data set, only some of the files get loaded and the task ends successfully but only loading around 400+ files, each folder has 1M+ files, I want to create BIG csv files by merging all the small JSON files of the source (I already was able to create csv file by mapping the schemas in the copy activity).
It is probably stopping due to a timeout or out of memory exception.
One solution is to loop over the contents of the directory using
Directory.EnumerateFiles(searchDir)
This way you can process all the files without having the list / contents of all files in memory at the same time.

SFTP uploads file saved in Sublime Text, despite its parent folder being regex ignored

I'm setting up a development workflow using Sublime Text 3 and the SFTP add-on. Within sftp-config.json I have appended the following two rules to the "ignore_regexes" key:
... "/src/", "/node_modules/"
Whenever I choose Sync Local->Remote, this successfully ignores these folders and all their contents. They have no place on the remote server. Further up, in sftp-config.json, i also have the following rule:
"upload_on_save": true,
This is because I'll be working on a number of PHP and JavaScript files, that I don't want to have to manually upload every time I save (there's going to be a lot of saving going on).
However:
The problem is that every time I save a file inside any directory under src, it uploads it along with every parent folder up until src. This is not what I want!
Clearly, the upload rule is overriding the ignore rule - and probably for good reason. So what do I need to do, in order to ignore every save for every file and folder within src etc, while still allowing files outside these folders to be automatically uploaded when saved?

after a merge down between a parent and child stream,if I rollback a specific folder, I cant see the mergedown option anymore between the two streams

In my local stream workplace, I first did a merge down from a parent stream and then used rollback to revert the merge down on a specific folder.
The rollback worked on that folder, however since the child dev stream and the parent stream are different again, I dont see a merge down option again (say I want to merge down the two streams again).
Why cant I see the merge down option again?

Perforce streams, exclude files from merge/copy

I have following perforce streams structure: main branch and 2 development branches linked to it dev_v1 and dev_v2. Both development streams has some build control files where version specific variables are located. Any change in these files will be reflected in Perforce Streams Graph and the system will ask me to merge them into main and then from main into other development branch.
How to exclude specific set of files in Perforce so that in case of any change the system will no show any difference between streams and will not ask to merge/copy them.
If those build files should never be integrated you should set that path in the stream view to be 'isolate' instead of public. That will add the files to client views for that stream, but will exclude them from any generate branch maps. That will cause them to fall out of the integration calculation and Perforce will stop trying to integrate them.
Isolate was specifically put in streams to handle build files that are unique to each stream, so this is the perfect use.
When you merge you can select which change lists you want to include in the merge, and which you want to exclude. If you are using P4V when you get into the merge window you can choose which changelists to merge into the other code line. Most of our items are set up as streams...if you are a using a standard depot the functionality to should be similar...if you have troubles let me know I can set up another depot on my dev server.

Instancing files in Perforce across multiple locations

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.
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.

Resources