Config spec for specific file - version-control

How would you see a specific file version in the ClearCase ?
How to set the right config spec for that specific file?

You can specify a specific selection rule for a specific file, but that won't help you actually accessing it.
For instance:
element /path/to/my/File /main/4
would select the version 4 of branch main only for /path/to/my/File.
But considering that the parent directories 'path', 'to', and 'my' have they own version (which isn't likely to be '4'), they won't be selected at all by that single rule.
(Don't forget that directories are versioned when their content changes: version 4 would mean their content have changed 4 times, in other words, that files or subdirectories have been added or removed 4 times)
To be sure to select the right version for a file, while being able to access it, you need 2 rules in the right order (as explained in "How to create a branch"):
element /path/to/my/File /main/4
element * /main/LATEST
That way, you would see the right version in your (snapshot or dynamic) ClearCase view for that file.
But that wouldn't allow to checkout it (no -mkbranch directive there).

Related

MS Word, DOCX, Open XML - Apply themes by changing XMLs

Need to apply theme from one word document (DOCX) to another via manipulating the XMLs.
The road I'm going through is -
word/themes folder contains at least one theme#.xml and could have the rels folder containg relationship files. I decided not to touch the rels folder and copy all theme#.xmls (as could be more than one) present in word/theme folder. This is working for me.
I have two concerns over it:
1. Do I need to add theme1.xml.rels file present in word\theme_rels as well? It contains mapping to one image in word\media folder. Do I need to add the image mapping too?
2. For few themes such as "Quotable", the theme1.xml contains one reference in 'a:fmtScheme' node to relationship id, probably for DrawingML and shapes.
for ex:
<a:blipFill rotWithShape="1">
<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId1">
As the "rId1" here refers to styles.xml and maintained in word_rels\document.xml.rels, my concern is the word_rels\document.xml.rels mapping to styles.xml could not be rId1 in the document to which theme is getting applied (for instance this could be rId5 for styles.xml). So, Do I need to change this in theme1.xml while copying to work it properly.
Any help would be greatly appreciated.
If this XML appears in theme1.xml, 'rId1' is a key in theme1.xml.rels, not the document.xml.rels. The relationship ids (rId#) are unique within a 'source' XML document but are not unique within the overall package (.docx file).
Since this one is a <a:blip> element, the relationship will be to an image part, e.g. image1.jpg. I suspect this one is a large-ish quotation mark image that appears in front of a pull-out quote.
If you want it to show up properly, you'll want to make sure those relationships and their target parts are reconstructed in your target package. That would mean "yes", you would want to add the theme1.xml.rels file in the right place, as well as the image file it refers to.

How do you order Doxygen Custom Pages

I have created a number of custom pages within Doxygen. I would like to customize the the order of the pages in the main menu. Below is a picture of my current navigation menu. I would like to change the order so Overview is first, Installation second, Introduction third, etc. Is there a way to do this?
After some investigation, it seems Doxygen currently does not support the ordering of pages in a custom (or any) fashion.
Just as #Toby mentions, the current way to ensure a desired order of pages in Doxygen is to ensure the page conditions (\page) are parsed in the same order. For instance, you can achieve the desired order by specifying your files manually such as:
INPUT = Developers.dox \
Hive_Training.dox \
Installation.dox \
Introduction.dox \
Models.dox \
Overview.dox \
Users.dox \
Files.dox
This is not ideal at all, but it works. What I found is that if you wish to maintain using directory paths in your Doxygen configuration file, you can create an 'page order' file to parse first before any other content. For instance:
INPUT += PageOrder.dox
INPUT += ../my_module_1/content/
INPUT += ../my_module_2/content/
And you add all the page references in a PageOrder.dox file:
\page developers Developers
\page hive_training Hive Training
\page installation Installation
\page introduction Introduction
\page models Models
\page overview Overview
\page users Users
\page files Files
This again, is not ideal; however, your maintenance process now resides in a single page order file (instead of touching one (1) or more Doxygen configuration files).
Doxygen processes the custom pages files names in alphabetical order.
Therefore you can name your custom pages files like :
_1_file1.dox
_2_file2.dox
etc...
As a result they will appear in the same order in the generated document. This solutions avoids modifying any configuration file!
A way for grouping HTML/ CHM output is via nested #page and #subpage elements in different files.
So what I've done in the past is to to have a landing page plus several 'strucutre' pages that define the section layout. Each reference needs to be in its own file.
As an exmple:
\mainpage
# Welcome to my main page #
Some text
\subpage IntroductionSection
\subpage DetailsSection
\subpage SamplesSection
And then have a structure for each subage like (IntroStructure.md)
Introduction {#IntroductionSection}
===============
# An introduciton to the topic #
\subpage GettingStarted
\subpage HowTo
\subpage DeepDive
Note that every subpage needs to be referenced with
Deep dive {#DeepDive}
again.
Thats the way I handle quite a bunch of markdown documents.
Works great for html/ chm although you have a certain file overhead.
I found one, rather cumbersome, method of achieving this.
Previously I had all my custom doxygen files (images, pages, etc) in one directory named input.
I have each of my pages in a separate file (e.g. main_page.dox, page1.dox, page2.dox, etc)
I moved my custom pages to a separate directory named pages at the same level as the input directory.
(I also renamed my input dir to images, and changed the IMAGE_PATH accordingly)
Then, in the doxygen config file I added the explicit paths to each page file to the INPUT variable in the order that I wanted them. E.G:
INPUT= . Documentation\images \
Documentation\pages\main_page.dox \
Documentation\pages\page2.dox \
Documentation\pages\page3.dox
This means that every time I add a new page I have to add its path to the INPUT, so as I said at the top, it's cumbersome. But better than having conlusions showing up before introductions etc
This works for HTML and LaTeX - haven't tested with other formats
I know this question is rather old, but its 2017 and I still haven't found a satisfying answer...
Since this is the first search hit, I thought I should still leave my workaround here.
I think the easiest and least cumbersome way is to go through the indirection of a single page, containing all your custom pages as subpages. This preserves the input order, e.g. ->
#page page_contents Contents
#tableofcontents
#subpage page_intro Intro
#subpage page_install Install
#subpage page_system System

How do you get all files of a VOB as of a given date in a clearcase vob?

I have a fairly large codebase with several directories and files and I would like to check out a view or have a view as of a given date (Septermber 12th). I am manually checking file histories and doing ct get -to someOtherDir/FileName FilenName##/main/## and this is extremely painful. I wonder if there is a way to do a checkout and load everything as of a particular day at once?
The easiest way is to make a separate dynamic view, with a config spec including a time-based selection rule (or time rule for short, see cleartool man config_spec).
See as an example "ClearCase : Loading Older Version of a specific Directory?".
Since you want to checkout files, you need to complete your selection rule by a mkbranch directive.
element * .../aBranch/LATEST
element /aVob/myComponent/mySubDirectory/... .../aParentBranch/LATEST -time dd-Month-yyyy -mkbranch aBranch
element * /main/LATEST
If those elements were all created on 'aParentBranch', they will be selected at the right date, and branched into a new branch 'aBranch' when checked out.
If those elements were all on /main, you can switch the last two selection rules into:
element * /main/LATEST -time dd-Month-yyyy -mkbranch aBranch
From the man page:
-time date-time
Modifies the meaning of the special version label LATEST:
the rule selects from a branch the last version that was created before a particular time.

Updating XCode project template details

Previously all file headers were being displayed as follows.
// Created by ABC_User_Name on 10/31/11.
I have modified user name from ABC_User_Name to XYZ_User_Name.
Now, even after logging out & logging in again, I am finding the same headers in all project templates. How to update those templates with current user-name ?
Do I need to modify manually all of them ?
The original templates use this header:
// Created by ___FULLUSERNAME___.
// Copyright ___YEAR___ ___ORGANIZATIONNAME___. All rights reserved.
The words with the double underscore are placeholder references. There are 18 that I know of, and you can add more in your template definition. These options can be further modified using option variables. The ones you see above are:
___FULLUSERNAME___ Full user name of the current user (name + surname).
__YEAR__ Current year.
___ORGANIZATIONNAME___ The name of your organization as seen on your address book. You can change it for each project selecting the Project node and setting the Organization field.
Once the project is created, the header becomes plain text and is never updated.
For future projects I suggest you duplicate the templates and do the changes there. Otherwise you risk screwing up the original templates or having Xcode overwrite your changes.
The originals are at:
/Developer/Library/Xcode/Templates/
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates
And I made a copy at:
mkdir -p ~/Library/Developer/Xcode/Templates/File\ Templates/Jano
mkdir -p ~/Library/Developer/Xcode/Templates/Project\ Templates/Jano
where "Jano" is my user and it will show as a template category in the new project selection screen.
Then you edit the header manually file by file, or from bash using sed.
Xcode 4 stores this on a per-project basis.
If you select the project in the Project Navigator (Cmd-1) and open the File Inspector (Cmd-Opt-1), you'll see a field for "Organization" under "Project Document".

Invalid child element MvcBuildViews

I have an ASP.NET MVC 2 Beta app and have set <MvcBuildViews>true</MvcBuildViews>
in the property group at the top of my csproj file. But my views are not being compiled. A closer look at the .csproj file shows a squiggly under the MvcBuildViews tag and when I hover over it, it says
The element 'PropertyGroup'
in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'
has invalid child element
'MvcBuildViews' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'.
List of possible elements expected:
'Property' in namespace
'http://schemas.microsoft.com/developer/msbuild/2003'.
What am I doing wrong?
Many elements you define in the .config are not part of that schema, but still operate. It's the same way for MSBuild scripts.
That's a custom property we include in the project files to compile views. It shouldn't cause any problems, since you can define your own properties (see http://msdn.microsoft.com/en-us/library/t4w159bs.aspx) in your project file.
For further detail, please refer to:
http://forums.asp.net/t/1506782.aspx?Error+invalid+child+element+MvcBuildViews+in+namespace
btw, this issue existed in 2009, but now is 2015, it still exists.