How to browse each version of each element archived? - command-line

I am looking for a command line either for an algorithm (script) which allows to browse all the versions of each of the elements archived in a VOB UCM or Base Clearcase.
The command find allows to browse each of the elements accessible from an existing view. But It does not thus allow to browse elements uncatalogued.
It is more complicated than the browse of a tree because it is a question of browsing at once the tree of archived elements (files and directory). As well as the tree of branches and versions of every element.

ct find -all -nvis -print|gawk "{print \"cleartool lsvtree \"$0}"|cmd
(windows syntax, note: some double quotes may be needed around the $0 is the file has space in it)
That should list all versions (with the -nvis option to list elements not visible from the current view).
Since a find -all list only one version per element, you have to pass it to a command listing all versions.

Related

How to use perform a mkelem on view private files using the ClearCase Menu Editor

I'm working in a Windows dynamic view.
I am trying to create a tool shortcut using the ClearCase Menu Editor to automatically perform a 'mkelem' on all private files in my view.
I'm aware of 'cleartool lsprivate -other' to get a full path listing of all private files but I don't know how to feed that resulting list into the 'mkelem' command.
I'm also aware of the 'find' command and that at the end you can specific '-exec' to cause it to perform the additional action to be performed on the resulting list but once again I don't know what arguments to give to 'find' in order for it to only find view private files.
Can anyone help me with this?
Another approach I would consider/test is one I mentioned in "How can I use ClearCase to “add to source control …” recursively?", with clearfsimport.
I suspect clearfsimporting the view folder into the view itself should automatically add the private files, while keeping the existing files untouched. But, as commented, you would need to import in a new dynamic view (with same config spec) for that to work.
The problem with cleartool find is that it find versioned elements.
It can use %CLEARCASE_PN% or %CLEARCASE_XPN% as argument in its exec clause: that reference the pathname or extended pathname of already versioned element.
Well, it's complicated, because you would need to check out the parent directories before creating the elements.
Have you tried a command similar to this:
for /f "delims==" %x ('cleartool lsprivate -other') do #cleartool co -nc "%~px" & cleartool mkelem -mkpath -ci -c "autoadd" "%x" & cleartool ci -nc "%~px"
-mkpath makes any missing parts of the path to the elements at the same time the element is created. That should -- with appropriate massaging to make it work in a "cmd /c" or batch job do the basics... Of course, this also goves you 1 new version of the parent directory per new element.
If you're not averse to Perl, you can expand upon this by taking that list, making any needed directories, and them making the elements.

Is there a limited number of merge levels html help can retain index/search items for?

I created a RoboHelp html help project that merges three projects into a master project. Indexes and search terms work fine in the Master.chm. However, this Master.chm gets merged into another "Super-Master" application that my application is a plug-in for. After that merge, the sub help .chms items do NOT appear in index and search does not find them. Is there a limited number of "levels" merged help will allow index/search to work? Or is it more likely there is some other problem (ie. Super project doesn't use Binary index) or something?
Mostly it's the binary index. Please check following list of general tips from Rob Chandler's website:
All CHM files should be installed to the same folder.
You can install any number of Slave CHMs but the Master CHM must always be installed if you want the slaves to reference the master
Table Of Contents.
Each project must enable the "Binary Index" in order for index merge to work.
A binary index will not be created if you select 1.0 as the version in the Compatibility box > Compiler tab > Project Options
dialog or if the Create a binary index check box is cleared.
Rick Stone reminded that the Master index must contain at least one index term in order for the merge to work.
Similarly "Binary TOC" must be disabled otherwise merge will not work.
Include HHC works recursively, so you can have groups of optional modules. I.E. HHC files including HHC files that include other HHC
files and so on.
Merging of Index and ALink keywords. This does not work recursively, because they do not know about the TOC inclusions. If
you want to have a unified Index or cross-module ALinks you have to
tell every CHM file which others might be available belonging to the
same project. Again: Do not merge yourself.
Another idea: If you have identical keywords from several files, HTML Help uses the <title> tags in the list of targets. We extended
the title of each topic with the title of the module itself (the
"book"), leading to: <title>This fine topic title (This fine book
title)</title>.
An include statement in a HHC file can refer to a standalone HHC file. The HHC file should be placed in the same folder as the CHM
files.

vifm search files in subfolders

How can I search files just like with / command but recursively scanning subfolders?
Or maybe there are other approaches to get a list of files that match some pattern in the current folder including all subfolders.
:find command
There is :fin[d] command for that. Internally it invokes find utility (this is configurable via 'findprg' option), so you can do everything find is capable of. That said, in most cases the simple form of the command suffices:
:find *.sh
Note that by default argument is treated as regular file pattern (-name option of find), which is different from regular expressions accepted by /. For searching via regexp, use:
:find -regex '.*_.*'
If you want to scan only specific subfolders, just select them before running the command and search will be limited only to those directories.
:find command brings up a menu with search results. If you want to process them like regular files (e.g. delete, copy, move), hit b to change list representation.
Alternative that uses /
Alternatively you can populate current view with list of files in all subdirectories with command like (see %u):
:!find%u
and then use /, although this might be less efficient.

Ignore ELPA files in recentf

I update from ELPA/MELPA regularly. Unfortunately, the files the Emacs package manager manipulates show up in my recentf list, basically making it useless since it's always full from whatever files were updated, and not files that I actually care about. How can I fix this?
See user options recentf-exclude, recentf-keep, recentf-auto-cleanup, and command recentf-cleanup.
The first two options let you exclude and include files that satisfy certain predicates or whose names match certain patterns, respectively.

a command line or a script who is able to display each version of each element archived in a vob since the beginning?

For example,
I am in a vob called: avob
I add to source control a folder:
avob/afolder
I add to source control two files afile1 and afile2
avob/afolder/afile1
avob/afolder/afile2
I uncatalogued the file afile2
I add to source control afile3
avob/afolder/afile3
I would like (a command line or a script who is able to) display each version of each element archived since the beginning, here:
avob#version1
avob#version2
avob#version2/afile1#version1
avob#version2/afile2#version1
avob#version3
avob#version3/afile1#version1
avob#version4
avob#version4/afile1#version1
avob#version4/afile3#version1
The only command which could come close of what you are looking for would be
ct lshist vob:\yourVob
which would list all the events for all versions of all files (add to source control, rmname, merges, ...)
But that would involve a lot of parsing of a huge log file if your vob has a few years of history...
A script could scan the entire VOB for all its elements/history and generate a report.
If you wanted to script it, you'd start by collecting version information on the root dir of the vob:
cleartool lsvtree -all /vobs/myvob/
It would list all the versions of the root dir of the VOB, and then you could lsvtree every single version of that dir for every element in every version of the root dir, keeping track of them all and recursing into directory versions, etc., until you have all the elements and versions cataloged. It could use a lot of memory.
It will take a long time, as Von points out.