How to search history in Perforce [duplicate] - perforce

This question already has answers here:
How do you search the text of changelist descriptions in Perforce?
(8 answers)
Closed 9 years ago.
It seems that there are no way to do that in P4V.
I can use 'Submitted Changelist'and but it's quite cumbersome and there I can only search by User & Workspace.
I'd like to search the history by description.
Is there any easy way to do that?

If you are on Windows, P4Win has a "Find string" menu item that works on all the fields in the Submitted Changelists - very handy.
You can also do what you want from the command line, by piping the output of p4 changes through grep or something similar.

Related

How to list files in perforce changelist without diffs? [duplicate]

This question already has answers here:
How to list all the files changed by a perforce change list
(5 answers)
Closed 4 years ago.
p4 describe <changelist>
shows files in changelist with diffs. Is it possible to list just names of changed files using p4 command?
p4 describe -s changelist
p4 describe documentation:
-s Display a shortened output that excludes the diffs of the files that were updated.

Efficiently editing content near the top of a very large file on Linux [duplicate]

This question already has answers here:
Working with huge files in VIM
(10 answers)
How to edit multi-gigabyte text files? Vim doesn't work =( [closed]
(15 answers)
Closed 6 years ago.
I have a db dump file that is over 5 gigs in size and I'm looking to do a quick edit to the create database and use database command. This dump is provided to me.
I've been using vim to do this from the command line, but it takes a while to load. I'm able to use less to read very quickly. Is there a way to edit the file without having to wait several minutes for the full file to load in vim? This can be a param passed to vim, or different common way to edit files from command line.
I'm looking for a general solution that I can apply to other large files too, so would like a linux command that would allow me to edit the top of the file quickly.
You can use cat:
cat file_with_create_cmd db_dump > new_dump
If you want to use that in a subsequent command instead of writing it to a file, you may use process substitution:
process_dump <(cat file_with_create_cmd db_dump)

converting hidden files in to normal files in linux [duplicate]

This question already has answers here:
Renaming multiples files with a bash loop
(3 answers)
Closed 8 years ago.
I have a directory, let's say its name is direct in which has multiple files whose names are .xyz, .abc, .klm and .etk4 etc. Is there a way to make all those hidden files visible at the same time instead of one by one? I know this question has been asked before here but I did not get the answer. I hope somebody can explain it to me in a simple way since I am not much familiar with linux.
for file in .[^.]*
do
mv "${file}" "${file#.}"
done
${var#prefix} expands to the value of $var with the initial prefix removed.

How do I see the changes made in a particular module by someone in his/her changelist [duplicate]

This question already has answers here:
p4v does not show the complete list of checked out files
(3 answers)
Closed 8 years ago.
A coworker submitted a gigantic changelist (>1000 files) as part of a refactoring, and perforce just shows it as 'There are 1000 files in this changelist'.
I'd like to see the changes he made to all files in a folder/module via Perforce p4merge or IntelliJ's perforce integration/diff tool.
In P4V go to Edit->Preferences and select "Server Data" settings at the left.
Increase setting "Maximun number of files displayed per changelist*:" to desired value (e.g. put more than 1000 for the example above) and save settings.
*After limit is reached, changelist and resolve dialogs show plain text list of files

What is the p4 command equivalent to something like svn status [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to find untracked files in a Perforce tree? (analogue of svn status)
I want to know what p4 command that will show me which files have changed, which files are not checked in, etc.
If you're using perforce properly, "p4 opened" is what you're looking for. It will tell you what files you have opened for change. If you want to be able to change files locally, THEN open them for edit (or delete, etc.,) then you're walking out of the usage patterns that perforce expects users to abide by and you're treading on dangerous ground.
Perforce does provide mechanisms that will allow you to detect these things - if you're going to insist on working this way. "p4 fstat" will allow you to get the expected md5sum for a file from the server. Comparing that with the local md5sum will tell you if the file has changed. You could, alternatively, compare file dates - if the modification date on your local machine does not match that given by fstat, you can be fairly certain that it has changed, but to be certain, you'd have to do the md5sum check.
In the upcoming 2012.1 release there a new command named p4 status that will do the equivalent to that as if you were using SVN.
p4 status
src/tools/this.rb - reconcile to edit //depot/stuff/src/tools/this.rb#3
src/tools/that.rb - reconcile to add //depot/stuff/src/tools/that.rb#1
src/tools/other.rb - reconcile to delete //depot/stuff/src/tools/other.rb#2
For more information, read the announcement on the Perforce Blog.
While awaiting the official 2012.1 release you have basically two options:
Do it yourself using the command line
Use P4Vs "Reconcile Offline Work"
More details can be found in the Perforce KB.

Resources