Plastic Command Line: How do I "Undelete" all files? - plasticscm

I'm trying to undelete all .wav files in a work space. I've got code to filter all the wave files that were deleted by using:
cm hist <sound folders> --format={1}
to get all the changesets affecting my sound folders and then filtering through log outputs
cm log cs:<changeset>
for the D deleted file names. Now that I have the names, I intended to use
cm undelete
but it's asking for revid or itemid and cs information I don't have and can't seem to query since the item is deleted.
I'm hoping there is an awesome command line that might allow me to undelete all files of a certain type. If this is possible from plastic PCM or Plastic Gluon, that is an option also.
Thanks!

When running the "cm log" command, you can get the revision ids of the items to undelete. This revid is necessry to undelete the items with the "cm undelete" command.
cm log cs:1 --itemformat="{newline} {revid} {shortstatus} {path}"

Related

How can i compare 2 fpr files in fortify for new "Critcal" violations

I want to compare 2 FPR files in Fortify to check for new "critical" violations.
What I have got so far is get the count of the critical issues of the 2 FPR files and see if that count has changed.
FPRUtility.bat -project [Your .fpr file] -information -search -query "[fortify priority order]:critical"
Or another idea is to generate a PDF/XML file out of the FPR files and compare or take the diff of 2 files using any Linux command line utility to check for new "critical" issues.
Is there any better way to do this?

How can I export the data from the results table in Image J Pendant Drop plugin?

I am using the pendant drop plug in (http://www.msc.univ-paris-diderot.fr/~daerr/misc/pendent_drop.html) to get the surface tension of droplets. It produces a table of results in a window called Results, however, it does not have the usual file, save as etc options. Also, when I try the getResults and nResults command in macro it doesnt give me any results and says the number of results is .
Do I need to edit the plug in to be able to output the results? My aim is to output the results as a csv file.
Pendent Drop is an ImageJ2-style plugin that generates a SciJava Table. In an up-to-date Fiji installation, you can save such tables using File > Export > Table....
The macro functions getResults and nResults do not work on those tables, because they require an ImageJ1 ResultsTable window.
See also this topic on the image.sc forum. In general, questions like this one are much better asked on https://forum.image.sc (see also the description of the imagej tag).

I want to know Complete project line of code in TFS project collection

Team,
Could you please help on the advise.
I want to know how to calculate the line of code for my TFS project collection. I need for entire instance to calculate the line of code.
Please advise. Thank you
Note: I'm assuming you're using TFVC, not Git.
You should be able to get this from the data warehouse (Tfs_Warehouse) assuming you have Reporting Services configured.
There is a Code Churn table. I believe you should be able to sum the NetLinesAdded field to get the total number of lines of code.
The Analysis Cube has a Total Lines field, as well.
However, you can also get this information from your file system with PowerShell, for example:
(gci -Path 'C:\Users\Daniel\Source\Repos\' -rec -Include '*.cs' | select-string .).Count
This comes with the caveat that "lines of code" is, in almost every single case, a totally meaningless, worthless number.

Vimdiff equivalent for Select Lines

When used as a mergetool for Git, what is the equivalent in vimdiff to kdiff3's "Select Lines(s) From A/B/C"? Is there a shortcut for that like Ctrl+1/2/3 in kdiff3?
Based on the Vim Reference Manual section for vimdiff, there are no built-in commands with the full functionality of Ctrl+1/2/3 in vimdiff. What I mean by "full functionality" is that in kdiff3 you could do the commands Ctrl+2, Ctrl+3, Ctrl+1 in that order, and in the merged version you end up with the diff lines from buffer B followed by the lines from buffer C followed by the lines from buffer A.
There is, however, a command for performing a more limited version of the functionality available in kdiff3. If you only want to use lines from one of your input files, then the command [count]do is available, where [count] is typically 1,2, or 3 depending on which vim buffer you want to pull the lines from. (do stands for "diff obtain".)
For example, if you had the following merge situation:
then you could move your cursor to the merge conflict in the bottom buffer and type 1do if you wanted "monkey", 2do if you wanted "pig", or 3do if you wanted "whale".
If you do need to grab lines from multiple buffers when merging with vimdiff, then my recommendation would be to set the Git config option merge.conflictstyle to diff3 (git config merge.conflictstyle diff3) so that the common ancestor appears in the merged buffer of the file, as shown in the screenshot above. Then just move the lines around to your liking using vim commands and delete the diff notations and any unused lines.

TFS Cube - Total Lines of Code appears incorrect?

I'm using the TFS cube as documented here and am getting a curious result for 'total lines'. If I look at a file inside of visual studio, I see that a file is perhaps 42 lines long (total, comments, whitespace, and all). However, when I ask the TFS cube for that same information, it tells me that the file is almost - but not exactly - twice its size.
I have my pivot table set up as follows:
Report Filter includes a specific team project, and is filtered on file extension (.cs)
Row labels set to Filename.Parent_ID
Values set to 'Total Lines'
I've looked at the MSDN guidance here and can't see what I've done wrong, other than noting that I have not selected an individual build (if i do so, I get no results).
Edit: As it may be relevant, I'm using TFS 2008 SP1 with SQL 2005 standard. There is a note on the MSDN page which cautions me that SQL 2005 Standard does not support perspectives, and 'the cube elements from all perspectives reside in the team system data cube'. I'm not sure what that means for this problem, if anything.
Check your linebreaks in the files : does numbers change if you convert files between windows/linux line endings?
Please add lines with 60, 90, 150, 200 characters and check how many added lines will be reported. Might be some work-wrapping.

Resources