Integrate streams from different depots. Some files not integrate - perforce

I have following structure:
DepotA have streams main (mainline stream) and dev (development stream) as mains' child.
DepotB have streams main (mainline stream) and dev (development stream) as mains' child.
I populated //DepotA/dev. //DepotB/dev is empty. Now I'm trying to merge //DepotA/dev/... to //DepotB/dev/.... I can't do this with p4v - I simply have weird error. But I can do it with command line. But after merge the streams are different - I checked the sizes of the folders on my machine - //DepotA/dev is 43Gb but //DepotB/dev is 18Gb. Where're other files? Why they didn't merged?

I suspect some of the size difference is due to the fact that files have not yet been changed in '//DepotB/dev', so lazy copies have been created.
These are simply pointers to the original files. Physical files are created once the source or targets are changed.
It can be tricky to investigate integration issues without taking a detailed look at the history, so I recommend you contact Perforce Support, if you have further questions:
http://www.perforce.com/support-services

Related

How share and import data between two mainline streams in perforce

I have a mainline stream //depot/stream_mainline_1/...
I need to create another mainline stream //depot/stream_mainline_2/...
where I need to import(read only) some of the folders and share the some other folders in newly created mainline stream.
Let’s say //depot/stream_mainline_1/... contains two folders;
test_folder1 -> Need to import this folder
test_folder2 -> Need to share this folder
I know we can import the data like below while creating the new mainline stream(//depot/stream_mainline_2/..)
view:
import test_folder1/... //depot/stream_mainline_1/test_folder1/...
Can someone please help me to know the steps to share the test_folder2?
Thanks in advance.
By definition there should only be one mainline stream in a stream hierarchy; each mainline is essentially the root of the tree, and everything else in the tree ultimately either branches or imports content from the mainline. If you have multiple mainlines, you have multiple stream hierarchies that are not related to one another, but that's not what you're trying to do here.
Whether you make your new stream a development or release stream depends on whether it's more or less "firm" than the mainline, i.e. whether its checkin policy is more or less strict.
Either way, you want to make the new stream a child of the mainline, and then you can simply list the path you want to import and the path you want to share, like this:
Parent: //depot/stream_mainline_1
Paths:
import test_folder1/...
share test_folder2/...

Does ActiveStorage use the checksum for anything?

In a very real sense, my question is actually 'can I skip generating a checksum', but answering that question rests on the above question.
To give you some background, I'm (finally) converting from Paperclip to ActiveStorage, and one of the pains of my particular conversion process is that I'm storing a decent sized number of fairly large files -- in addition to normal sized thumbnail images, I'm also storing large multimedia files, some in excess of 10GBs (currently poking at a 15GB file).
The basic conversion process has me downloading the file to generate a checksum, and a few other minor details that could be done with a head request instead of downloading the full file. We also copy the file from it's old 'home' to its new 'home', but that is done as an S3 to S3 copy, and doesn't take as long as downloading and uploading.
I'd love to skip the download & generate checksum process -- or at least, put it off for another day, as a cleanup step that isn't important to what we're actually doing.
So the question is: does the checksum actually do anything in ActiveStorage, or is it just a 'nice-to-have' feature that would allow me to, for example, publish the checksum if someone wanted to verify their version?
Found in code Rails
Prior to uploading, we compute the checksum, which is sent to the
service for transit integrity validation. If the checksum does not
match what the service receives, an exception will be raised.
You can create your own checksum without downloading the file:
Found in code Rails
def compute_checksum_in_chunks(io)
OpenSSL::Digest::MD5.new.tap do |checksum|
while chunk = io.read(5.megabytes)
checksum << chunk
end
io.rewind
end.base64digest
end

Stream definition: Ignore all files but one filetype

We have a server with a depot that does not allow committing files which are in a client mapping therefore I need a stream configuration.
Now I struggle with a task which I would assume should be simple:
We have a very large stream with lots of different file types and I would like to check out the entire stream but get only a certain file type.
Can this be done with perforce without black-listing every file type in question?
Edit: Sorry that I (for some reason omitted) so many information in my question.
I am already setting up a virtual stream where the UI gives me three nice fields:
Paths – where I can enter import, share isolate paths
Remapping – ignored in my case
Ignored – here I can enter wildcards to ignore directories or files
I was hoping that by creating a virtual stream I actually could define the file types I want, e.g. I could write an import statement like
import RootDir/....txt //Depot/mainline/RootDir/....txt (note the 4 dots, 3 for perforce and the other as a "wildcard"
however the stream definition does not support this and only allows me to write
import RootDir/... //Depot/mainline/RootDir/...
Since I was not able to find a way to white list the files I wanted I only knew a way to blacklist all things I did not want but I would like to avoid that because my Ignored list would be dozens of entries long.
Now I will look into that sync hint because I could use the full stream spec without filter and only sync the files I need on disk, which might be very good.
There are a few different things going on in your question but this seems the most like a statement of what you're trying to do so I'm going to zero in on it:
I would like to check out the entire stream but get only a certain
file type.
If by "check out" you mean you only want to sync that file type to your local workspace:
p4 sync ....TXT
If by "check out" you mean you want to open only that file type for edit:
p4 edit ....TXT
ANY operation in Perforce that operates on files accepts an arbitrary file path, because Perforce tracks all of its state per-file. This is true whether you're using classic clients or streams.
There needs to be some mechanism for telling the Helix (Perforce) server that you only want to retrieve certain files from the stream.
Virtual Streams may be a good fit here, as they allow you to filter the view of an existing stream.
This means you can sync only the files you want and when you submit you will be submitting directly back to the stream your virtual stream is based on.
More information is available here:
https://www.perforce.com/perforce/doc.current/manuals/p4v/p4v_virtual_streams.html

How to close file resources in pyglet

This is definitely a repeat of this question, but seeing as how that has gotten 0 replies in 3 months, and I can't seem to find an answer. The question ought to be simple: once you're done with a file (say, a video or a sound) in pyglet, how do you go about closing that file? I have an application which has to iterate over a few hundred thousand files, processing each one in turn. For obvious reasons, I am getting OSError: Too many open files. Is there a way to force-close pyglet's files?
For sound or video files you can close the current source with the Player delete() method.
You can also load the resource directly into memory instead of streaming from disk by setting the streaming argument to false in the load call:
pyglet.media.load(filename, streaming=False)
If all else fails, try forcing the garbage collector with python.gc.collect().

GDBM file import and export

I am migrating a system from the old server (Slackware) to the new one (Redhat). The system includes some .gdbm files. I find out that on my new server, when running
WEB_SERVICES = file.gdbm
tie( %webservices, 'GDBM_File', $WEB_SERVICES, O_RDONLY, 0 )
the %webservices turns out to be empty. But this was working fine on my old server.
So my question is, are .gdbm files able to be simply transferred (using scp command) from one server to another (different operating system and different version of gdbm)?
Also I read the documents http://www.gnu.org.ua/software/gdbm/manual/gdbm.html#SEC12, which says .gdbm files need to be converted into flat format before sending over the network. But still I'm not sure how to do it.
Please help, thanks in advance!
On the old system, GDBM-tie to the hash, dump the hash. Move the dump to the new system. Read the dump into a hash, tie to GDBM to write it.
For dumping, use a platform independent serialisation format (Sereal is best), or if the dump needs to be human readable, Data::Dumper or similar for writing and Data::Undump for reading.

Resources