I am trying to build a simple application that creates a diff of the checked-in source code and its previous version and send it as mail to the list of subscribers.
I am stuck with the part where I need to generate the "diff" of the current version and the previous version in HTML format so that I can easily mail it.
Is there any way to do it using ClearCase tools. If so please guide me..
Thanks in advance
Looking at cleartool diff and cleardiff, it seems you will need to process the cleartool command output in order to generate an html page.
For that, you could consider diff2html.py to create a side-by-side diff in a static html page from an unified diff input. (and cleartool diff can produce a unified diff)
Or consider cdiff.
Related
I need to modify a Simulink project stored under clearcase. From this project I must generate the C code, but this not the problem. The problem is that all generated files (*.c and other) are saved into clearcase and the code generation delete some file without overwrite the old version with new. Fortunately seems only for files different from *.C but in any case under clearcase (I use a windows client) I found in correspondence of deleted file:
the file name
three colored question marks
I think that clearcase has the information regarding the file stored but is not able to allocate this.
Now I need a command/script for CC which help me to found ALL removed files from the view because the project structure is very complex and a manually search is hard.
Thanks for any suggestion
"three colored question" marks means "checked out but removed", as in this example (you can recover from it by reloading the snapshot view)
If an automatic process is generating or deleting files in a snapshot view (it wouldn't be able to do the same in a dynamic view), then you should end up with a bunch of hijacked files (as identified in a snapshot view).
You could check them out and check them in.
For the files that need to be deleted, you can follow "What's the “proper” way to delete files from a ClearCase snapshot?".
But both process are manual and doesn't scale well.
There are two viable options:
1/ Don't version what is generated (you can re-generate it at any time)
2/ If you must version what is generated, then:
generate it outside of the snapshot view
use clearfsimport to import the result of that generation into the snapshot view: that will checkout the right files and will delete the files that are no longer generated.
That would be the right solution for "w I need a command/script for CC which help me to found ALL removed files"
From a snapshot view using base ClearCase, I want to checkout the latest version of a file from a branch that is NOT selected in my snapshot view. I would expect this to be possible, because you can do it from the version tree browser tool.
However, the documentation for the checkout command claims that you can't do this in a snapshot (emphasis mine): [edit: Yes you can! See below.]
Nonstandard checkouts
By default, the checkout command checks out
these versions:
The most recent version on a branch, if you are using a dynamic view
The version currently loaded in the view, if you are using a snapshot view
To modify a different version, you can either use the –version option or create a subbranch at that version. (See the mkbranch
reference page). Furthermore, from a single view, you can have only
one checkout per element at a time.
Note: When you work in a snapshot view, the only version of a
directory element that can be checked out is the version currently
loaded in the view. Therefore, the –version and –branch options do not
work.
How can I check out an unselected version from the command line?
[edit: Here I misread the "Note:" section. What the help means is that directories can't be checked out using the -version or -branch args, but normal files can be.]
The actual solution selected by the OP dss539 is to use cleartool checkout directly (see cleartool checkout man page)
cleartool checkout -bra/nch branch-pname | -ver/sion
It would work for files (not directories) in dynamic or snapshot view.
If you don't want to modify the config spec of your current snapshot file, then you can:
either use a separate view (a dynamic one in order to have the right version immediately selected), and modify at will the config spec of that other (dynamic view),
And copy the version back to your snapshot view.
See also "How would you select versions from a specific branch in ClearCase?" for config spec example.
...
Actually, you don't even need to modify the config spec of that dynamic view:
You can use the extended pathname of the version you want to directly access and copy the right version.
or use the cleartool get command (which is what "Send To" is doing on the version Tree).
See "clearcase command to backup predecessor version of a file?"
(You don't need a separate view here)
It's nice to have a version history in Confluence. However a new version has been created every time when the document is edited and saved. I'm looking more for a "release" history. Assume I have version 1.0 of my document/page. Then I edit and save the page a couple of times before I'm ready with "release" 1.1. I need something to link a version to a release number and then have an automated release history.
Is there a way to do do something like that in Confluence?
I guess Scroll Versions plugin from K15t Software could be one possible solution for versioning and release management of wiki pages within Confluence. https://marketplace.atlassian.com/plugins/com.k15t.scroll.scroll-versions
P.S. I know it is tad old question, but I think someone else may need this info.
A method I have seen used is to attach a file to a page, change the document and upload with the same name multiple times, then change the link on the page when the version changes.
Usually a link to an attached document always references the highest version like this:
[^list.docx]
[ and ] mark the start and end of the link
^ to the right of [ refers to an attachment on the current page
and the rest is the name of the attachment
which resolves to a hyperlink of:
http://wiki.server.name/download/attachments/464233765/list.docx
From the page the full url is more specific:
http://wiki.server.name/download/attachments/464233765/list.docx?version=1&modificationDate=1406619789890
Refer to Tools > Attachments for a list of file version numbers.
Edit the page.
Create a link to the 'next' version with appropriate link text.
[list.docx V2.1|///download/attachments/464233765/list.docx?version=6]
[list.docx V3.0|///download/attachments/464233765/list.docx?version=9]
[list.docx V3.1|///download/attachments/464233765/list.docx?version=11]
As you wrote Confluence always creates a new version once an existing attachment is uploaded with the same file name as displayed on the attachment view.
Existing files will be kept with the name 'Version x', where the value
of 'x' increments with each upload of an attachment with the same file
name.
Source:
https://confluence.atlassian.com/display/DOC/Attachment+Versions
This cannot be changed by configuration in Confluence.
However you can try Arsenale Lockpoint, which is a Confluence Add-on.
Arsenale® Lockpoint™ is the enterprise standard for checkout, checkin
and controlled versioning of Confluence attachments...
Source: https://marketplace.atlassian.com/plugins/com.arsenale.plugins.lockpoint
Arsenale Lockpoint Documentation
EDIT
I have just installed and tested Arsenale Lockpoint and could not find the feature you are looking for
I don't know of any other add-on that would meet your requirements
Therefore i would recommend to edit the file locally and upload it only if you want a new version (release)
A simple alternative to other answers is to use change comments.
When editing page there is an input field next to save button at the bottom. This field has a placeholder "*What did you change?" and its content is shown in page history.
So you can edit page several times and when you want to "release" the version, you can fill the comment with release version. This way you can see all page versions in page history but you are able to easily identify the releases.
See Confluence documentation
Hi currenlty i'm start to use TortoiseSVN, before that i'm using CVS.
Assuming, we have concurrent changes on the same project and each of the changes need to release in different time.
In CVS, when we need to commit a file and we would write down some message in message text box(assume i put in CR00001) and then when we deploying the application, we just get all files that with message equal ='CR0001'. So we've no worry about wrong version to release.
Is there a way for me to do this in TortoiseSVN?
Please help, Thanks.
You can always use TortoiseSVN to update to a specific revision.
For what you're trying to do, though, consider creating a RELEASE branch of the code, then use svnmerge to manage the promotion of specific changesets.
I'm looking at a scenario where I have an offline clear case view and I modify files in this view clearing the read-only attribute (hijacking) on the files I modify then several days later I take the view online and need to get my offline changes into the stream.
What I would do is check out the hijacked files and check them back in (merging when necessary).
Is it always safe to work this way?
Is it possible that while adding my changes I would accidentally overwrite other people's changes done while I was working offline?
Any recommendations on how to use ClearCase offline?
Thanks!
(I'm asking because a college says that this offline way of working can lead to overwriting other's changes, specifically in cases when one updates ones view after working offline for a while before converting the hijacked files into checkouts. He says it won't event propose to do a merge in some cases, just completely overwrite the contents of the element being converted with the contents of the hijacked file)
No you won't override anything while working offline.
ClearCase has a reconcliation mechanism for a snapshot view, which, when you get back online, will allow you to:
search for all hijacked files
checkout those files
then checkin them, which is when ClearCase will prompt you for a merge, if any new version has been done on that file during your time offline.
That merge will be a three-way merge with:
root version: the version before any modification by you or other
source version: the matest checkin version (done while you were offline)
destination version: your current file
What about setuping a private branch, working on it, hijacking there files and then merging your private branch on the main branch?