What is a 'Pending Patch' in RTC source control - clearcase

Within my 'Pending Changes' view I see this :
What are 'Pending Patches' and how are they created ? I think someone may have inadvertently created it. I do not seem to have the options to see what files have changed, should I not have this option ?

A pending Patch is a diff waiting to be applied in your local workspace.
It can be the result of a merge, or the explicit removal of a changeset ("Suspend"), put aside as a "Patch" (again, a diff), in order to clear the current local workspace of a modification you don't want to apply just yet.
You can also create one when accepting an incoming changet:
Accepting a change set will work when all previous change sets it depends on are present in your repository workspace.
When one of those change sets is missing then there is a gap in history.
RTC SCM prevents an accept from completing in this scenario.
There are two options to get the change into your repository workspace:
Accept the change sets that will fill the gap. This may be as simple as accepting all incoming changes if the change set you want is in your incoming changes.
Accept the change set and select the option to accept as a patch.
This will create changes that you can merge into your Eclipse workspace and check-in. A new change set would be created that will not depend on the change sets that would fill the gap.
The Help page explains how to create a patch.
Note that there is no easy way to get the same feature in ClearCase.
See:
"Is there RTC-equivalent “Suspend mode” in ClearCase?"
"git stash equivalents in other revision control systems?"

Related

how to backup and remove an clearcase activity

I need to remove the code changes of an activity from the child stream, which is shared among two projects. Wanted to remove code changes from Project A but I need to secure not to lose the changes in Project B
Can someone suggest me the possible solution and the next steps to be taken care to get rid of this issue.
See "Reverse Change set of an activity in Clearcase": you can use ccperl cset.pl -undo, or do for each file in an activity a negative or subtractive merge.
In both case, the goal is to create a new activity whose change set will represent the negative image of the existing activity.
You can then do what you want/need with it, like deliver it to another stream where the first activity was already delivered.

How to create Clearcase trigger for only one user?

I would like to make a trigger that only executes for a single user(myself). The reason, is so that I don't "break the build".
Longer explanation: I'm trying to sandbox a Clearcase trigger to automatically apply an attribute to an element when it is checked in, and I don't want to accidentally create a trigger that applies to all developers and potentially ruin everybody's day with the prototype(what works on the first try?).
I see the -nus/ers option which seems to exclude users in the list. I suppose I could comma separate a list of all users, excepting myself. Is this what I'm looking for?
The best sources of information about triggers are listed here, and then EV (Environment Variables) are mentioned in mktrype man page.
Check for isntance:
CLEARCASE_USER
The user who issued the command that caused the trigger to fire; derived from the UNIX or Linux real user ID or the Windows user ID.
If the user id somehow doesn't work, you could consider other environment variables:
CLEARCASE_SNAPSHOT_PN
Your script can control if the user id is yours, and if not, abort.
The path to the root of the snapshot view directory in which the operation that caused the trigger to fire took place.
If your script detect that the path isn't the exact one expected (ie your snapshot view from which your triggered your script), said trigger script would abort.

Mercurial pre-merge hook

Is there a way to do some checks before allowing a merge in Mercurial?
I have found the pre-update hook and have a script that runs before an update is allowed, by adding the following to ~/.hg/hgrc:
[hooks]
pre-update = ~/hg_pre_update.sh
But I'd like to run the check before allowing a merge as well, and currently it just allows the merge to go through without running my checks.
Background
In case there are alternative ways to solve the problem...
We have been having a number of problems with 'lost' edits under Mercurial. I've tracked down most of them now to the same underlying cause: someone has vim edit sessions open while either they or someone else does a hg update or merge. The editor warns the file has changed externally, the user ignores the warning and saves their changes.
When these changes are committed, for Mercurial there is nothing controversial. The user has simply reverted all the changes brought in with the last update and put in their own changes.
Some time later, we notice the code has gone walkabouts. Cue assorted insults flung the way of mercurial...
Set vim to autoreload changes if no local changes where done. (otherwise ask, or force a merge)
that's how I avoid such issues in any editor...
Sorry just worked out there is a pre-merge hook that works just the same as pre-update. I tried it before asking the question, but now just looking at my hgrc I realise I put the script being called for that hook to ~/hg_pre_merge.sh which doesn't exist.
I can't find the existence of pre-merge documented anywhere but still feeling like a bit of a muppet now.

how to Open a new instance of jEdit?

I'm new to jedit, and I haven't yet found out how to open a new window. For example, I want to be editing one set of files in one space on my Mac, and edit a different set of files in another. Does anyone know how to open a new instance/window of jedit to make this possible?
Thanks
You should set Buffer Sets scope to "View"
See also: Buffer Sets
It is possible to really Open a new instance of jEdit, and not only to open a new set of buffers in the same instance.
You have to launch jEdit with the -noserver option.
"Do not attempt to connect to a running edit server, and do not start one either."
Please see documentation here :
http://www.jedit.org/users-guide/cli-usage.html#d0e471
On Windows, to set this option you have to add it to the command line of the shortcut which launches jEdit.
It's a new feature to 4.3. It's under View | Buffer Sets. You click on either the "View Scope" or "EditPane Scope" buffer sets checkbox.
When you open a new View, it's a separate window instance. It has a buffer set and an edit pane. With more than one View open, you can decide to share buffer sets (global scope) or each keep their own (View scope). When you split the View, you add another Edit pane. Each can use the View's buffer set, or have their own (EditPane scope)
Global scope: All Views and EditPanes share a common buffer set
View Scope: EditPanes in the same view share the same buffer set
EditPane Scope: Each EditPane can have it's own independent buffer set.
The editpane scope works when you have split the view (view | splitting). You can look at files side-by-side, and each side can have their own buffer set. Very useful in comparing files in two different directories (one set per side), for example.
I wish there was an answer for this, since I'm constantly trying to open new instances of JEdit (despite being a daily user for several years now). But, as far as I can tell, you can't.
I have to assume this is another example of a good project getting over-architected.
Instead of allowing separate instances which logically associate different buffer behaviors using the built-in OS mnemonics, the JEdit crew have decided to create their own UI concepts. What OS lacks the concept of software instances and a task bar? Was it necessary to force a single-instance mode, and then re-create basic OS UI functionality in an obscure manner?
A hint for budding developers out there: if you're creating new terminology to handle UI concepts in your application, you're probably doing it wrong.
The following command line invocation will solve your problem:
jedit -noserver
You can create an alias for jedit that contains the above.
In the Jedit help, see Chapter 2, "Starting Jedit", in the section on Command Line Usage, Edit Server Options, and you will find the -noserver description.

What ldap query returns the user objects now removed from active-directory?

Is there a ldap query that will return or list user objects that have been removed from the active-directory system? Must you track all the user objects currently in the active-directory, and maintain a "last seen" stamp in order to tell when a user object has been removed from the active-directory?
I really don't believe that this information is obtainable. In the next version of the OS (Windows 2008 R2), Microsoft is introducing the ability to do this by implementing a recycle bin like functionality for and Active Directory object. Please see these write ups for more info:
http://blogs.technet.com/niraj_kumar/archive/2009/02/03/new-feature-active-directory-recycle-bin-in-windows-2008-r2.aspx
http://technet.microsoft.com/en-us/library/dd392261.aspx
But you may see that this is in reference to the deletion of the object itself, and that it doesn't provide any information about when a property of the object changes. You can look at the last modified property but even then you have no way of knowing which property changed (more then likely it will be the last logon), so again your left with no help. If your trying to track a issue that is occurring which you can recreate, I recommend that create some sort of script/code which record the properties of a specific user at a given interval, and then just keep running it as you move from one step to the other i the recreation of the problem.

Resources