How to get a previous version in clearcase? - version-control

I'm not a ClearCase expert... I would like to get a version of my project as it was, let's say one week ago, or maybe as it was when I finished an old activity.
Is it possible to do so? How should I do? (Please provide detailed steps :) )

For one file, you can use cleartool get, as described in "Clearcase command to export an element".
But for a full view, I would recommend using a time-base config spec rule.
See for instance:
"how to find out all the activities happend in a branch in the last month?".
"ClearCase : Loading Older Version of a specific Directory?"

Related

Can Meld comparison output be exported to a file?

I've been using Meld to compare directories recursively. I want to know how to export the comparison result onto a new file. Meld is a visual tool but is there any way I can save the comparison?
As of version 3.18.0 this is not a supported feature.
You can see the advertised features here.
If you dig into the code, an UI option to save content (and subsequent implementation) is only present in data/ui/filediff.ui and not in data/ui/dirdiff.ui. This means comparison output can only be exported when comparing files.
The code snapshot is from the latest commit on master, January 2 2018: 945014f5.
Update: I also confirmed just now (28 Jan 2021) on Ubuntu 20.04 that the latest version of meld on gitlab, meld version 3.21, does NOT have this feature either. See my comment and screenshot here: https://gitlab.gnome.org/GNOME/meld/-/issues/551#note_1019418.
Please click on the feature request issue below and upvote it to get this feature request some positive attention.
My version of meld is:
$ meld --version
meld 3.18.0
...and this feature still does not exist as of Jan. 2021, so I have opened this issue on the meld project in Gitlab here: meld Feature request on Gitlab: create a way to save or export GUI meld comparison views as both HTML and PDF.
Please go upvote it. If you don't have a Gitlab login to be able to upvote it, you can create one now or log in to Gitlab with your GitHub credentials.
Upvoting it gives it attention and may help get this feature sooner. Developers have the tendency to implement those features first which they know people want, so upvoting it gives it visibility.
If you have the skills and time (or the time, and want to start developing the skills), please join their mailing list and start working directly on implementing the feature yourself.
See also:
https://meldmerge.org/development.html
https://gitlab.gnome.org/GNOME/meld#contributing
Because the title doesn't specify that the question is about directory comparison, I landed here by Google for exporting a "(temporary) file comparison".
Why bother to do that if there is the diff command?
I use meld to compare content by pasting temporary content into the panes.
For anyone else searching a way to export that:
File->Format as Patch...
has even a Copy to Clipboard button.
Tested with version 3.20.4

How Do I Revert an MKS Change Package

I have a branch of a large project with a couple of change packages on it. I would like to undo one of them. In Subversion, this task is trivial, esp with a tool such as tortoisesvn - select the revision(s) from the history and undo the changes. I cannot find a way to do this in MKS. I cannot even find a way to traverse my sandbox to an earlier revision. Can anyone please offer some guidance? I'd rather not have to create a second sandbox, diff the two trees and copy select changes from one to the other, which is what a colleague (who wanted to do the same thing) suggested.
Unfortunately, this functionality does not currently exist in Integrity.
Disclosure: I work for PTC Integrity Technical Support.
#mlizak_PTC
Do you then know somethig about
Change Package->Discard
Discard Change Package Entry...
Somehow the help to the change package functions did not enlighten me :)
#Jon
The only way I know to get the same as "traversing the sandbox to an earlier revision" is when you have a well defined checkpoint resp. project revision which you can retarget your sandbox to (build sandbox) and then resync.
You can then retarget your sandbox again to the state it was before (Mainline or a variant) and see the differences to the current state of the project.
If had to rely on changepackage info I would redirect the output
of the command 'si viewcp' to a file and try to sort that information out.
eg.
si viewcp --fields=configpath,creationdate,id,location,member,membertype,project,revision,sandbox,state,timestamp,type,user 132:1
From the gui you can also select all entries from a change package detail view and copy them to clipboard.

How to see all the changes by one developer in ClearCase?

I am trying to look into a project and see all the changes that has been done by a specific developer. Is this possible with ClearCase?
(I only have access to the repository through ClearTeam Explorer, I don't have command line access to it. I appreciate if you keep that in mind as well answering my question)
You can try and use the ClearTeam Navigator view in order to display all UCM activities for a given stream: that should be enough to sort those by author and see that way all changes done were by a specific user.
Selecting an activity would allow you to see its change set (list of versions created and recorded for said activity).

Perforce to Subversion migration

I am going to use p42svn for the first time and I have some doubts/questions regarding the same.
As I understand from the p42svn home page, the script p42svn.pl should be run from the machine that hosts the Perforce repository. This script generates an SVN readable dump file which can then be imported into SVN repository. Could you please confirm if my understanding is correct?
In our scenario, we do not want to have all the revisions of the files. We would only need the revisions for the past 1 year. Is it possible to achieve the same?
Instead of migrating all the projects from the Perforce Depot in one go, is it possible to migrate the Projects one by one?
Any help in this regard is highly appreciated.
I've never used the script myself, but reading the documentation leads me to:
yes.
Use the --changes switch. Find the relevant changes
with p4 changes -s submitted #2010/11/17,#now (that would give
you the changes starting a year ago, adjust to your needs)
My SVN knowledge is not good enough for this to comment on, but maybe the
answer to this question helps?

How to manage versions with Visual SourceSafe?

My team is working with VSS and we are having difficulties managing versions:
We want to take a "snapshot" of the project we're working on, so we can keep working on it, but when we need to - we can get the files of the snapshot and built them for a release. (Is that called branching?)
Alternatively, getting all project files by date would be great too. (Meaning I would get the last checked-in version of each file in the project prior to the specified date.)
Is there any tutorial regarding this? I searched the net a bit and only found very simple howto's.
Thanks.
As Cannonade wrote, a label might be what you want. But since you explicitly mentioned branching in your question, you should be aware of the differences between a label and a branch:
With a label, you simply mark the current state of all files in your source safe database (the repository). If you created a label "V1.0", you can now at any time easily retrieve exactly that state and rebuild the V1.0 release for example.
With a branch, you create a copy of the current state of your repository. E.g. if you create a copy named "1.0", you can then continue with the development e.g. towards V2.0. Should you ever need to fix a bug for V1.0, then you can do this on the "1.0" branch.
So branches should be used to work on different versions of your projects in parallel. Labels should then be used to mark special versions on your branches (e.g. the ones used to create a release).
One last note: SourceSafe does not have a specific "branch" command. Instead you "Share" your solution and select the option "Branch after share". You can find more information about it in MSDN.
And a very last note: We stopped using SourceSafe about 1.5 years ago and switched to subversion (which is opensource and free). Have a look at subversion or other solutions. I can not imagine ever going back to SourceSafe.
You can apply a label to a current snapshot of source safe (like BUILD1) and then get the tree based on that label at a later date.