Reverse Changset of an activity in Clearcase












2















I have a requirement posted by the development team to reverse all changes in a given UCM activity. Constraint being we do not have delete rights. Meaning I know I can do a lsactivity to list all elements in an activity with their respective versions and then in the easy world would be able to delete those versions.



But the SCM policy does not permit us to delete/rmver anything. So I am left with back merging 1 version back. Meaning let us say I have version 5 of a.java checked into an activity. One way I think to achieve this, is find version 4 (using -predecessor) and blind copy this ver 4 as ver 6. Assume that each file has only 1 version in an activity this time. If a file had more than 1 versions checked in through an activity, this would be more complex, so lets ignore that for now.



Any other ideas or whether my approach would/would not work ?










share|improve this question

























  • Check this: ibm.com/developerworks/rational/library/05/0927_bellagio

    – Tamir Gefen
    Nov 8 '11 at 10:14











  • Thanks a ton Tamir, though I'd be writing my own (ANT) script, I got what I needed, merge -delete will do the trick for me I guess. I'll post my results in a few days when I get to do this.

    – Pulak Agrawal
    Nov 9 '11 at 3:30













  • merge -delete works for me. Cheers

    – Pulak Agrawal
    Nov 15 '11 at 9:46
















2















I have a requirement posted by the development team to reverse all changes in a given UCM activity. Constraint being we do not have delete rights. Meaning I know I can do a lsactivity to list all elements in an activity with their respective versions and then in the easy world would be able to delete those versions.



But the SCM policy does not permit us to delete/rmver anything. So I am left with back merging 1 version back. Meaning let us say I have version 5 of a.java checked into an activity. One way I think to achieve this, is find version 4 (using -predecessor) and blind copy this ver 4 as ver 6. Assume that each file has only 1 version in an activity this time. If a file had more than 1 versions checked in through an activity, this would be more complex, so lets ignore that for now.



Any other ideas or whether my approach would/would not work ?










share|improve this question

























  • Check this: ibm.com/developerworks/rational/library/05/0927_bellagio

    – Tamir Gefen
    Nov 8 '11 at 10:14











  • Thanks a ton Tamir, though I'd be writing my own (ANT) script, I got what I needed, merge -delete will do the trick for me I guess. I'll post my results in a few days when I get to do this.

    – Pulak Agrawal
    Nov 9 '11 at 3:30













  • merge -delete works for me. Cheers

    – Pulak Agrawal
    Nov 15 '11 at 9:46














2












2








2


1






I have a requirement posted by the development team to reverse all changes in a given UCM activity. Constraint being we do not have delete rights. Meaning I know I can do a lsactivity to list all elements in an activity with their respective versions and then in the easy world would be able to delete those versions.



But the SCM policy does not permit us to delete/rmver anything. So I am left with back merging 1 version back. Meaning let us say I have version 5 of a.java checked into an activity. One way I think to achieve this, is find version 4 (using -predecessor) and blind copy this ver 4 as ver 6. Assume that each file has only 1 version in an activity this time. If a file had more than 1 versions checked in through an activity, this would be more complex, so lets ignore that for now.



Any other ideas or whether my approach would/would not work ?










share|improve this question
















I have a requirement posted by the development team to reverse all changes in a given UCM activity. Constraint being we do not have delete rights. Meaning I know I can do a lsactivity to list all elements in an activity with their respective versions and then in the easy world would be able to delete those versions.



But the SCM policy does not permit us to delete/rmver anything. So I am left with back merging 1 version back. Meaning let us say I have version 5 of a.java checked into an activity. One way I think to achieve this, is find version 4 (using -predecessor) and blind copy this ver 4 as ver 6. Assume that each file has only 1 version in an activity this time. If a file had more than 1 versions checked in through an activity, this would be more complex, so lets ignore that for now.



Any other ideas or whether my approach would/would not work ?







clearcase






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 14:04









Sneftel

23.7k64278




23.7k64278










asked Nov 8 '11 at 10:07









Pulak AgrawalPulak Agrawal

2,04121748




2,04121748













  • Check this: ibm.com/developerworks/rational/library/05/0927_bellagio

    – Tamir Gefen
    Nov 8 '11 at 10:14











  • Thanks a ton Tamir, though I'd be writing my own (ANT) script, I got what I needed, merge -delete will do the trick for me I guess. I'll post my results in a few days when I get to do this.

    – Pulak Agrawal
    Nov 9 '11 at 3:30













  • merge -delete works for me. Cheers

    – Pulak Agrawal
    Nov 15 '11 at 9:46



















  • Check this: ibm.com/developerworks/rational/library/05/0927_bellagio

    – Tamir Gefen
    Nov 8 '11 at 10:14











  • Thanks a ton Tamir, though I'd be writing my own (ANT) script, I got what I needed, merge -delete will do the trick for me I guess. I'll post my results in a few days when I get to do this.

    – Pulak Agrawal
    Nov 9 '11 at 3:30













  • merge -delete works for me. Cheers

    – Pulak Agrawal
    Nov 15 '11 at 9:46

















Check this: ibm.com/developerworks/rational/library/05/0927_bellagio

– Tamir Gefen
Nov 8 '11 at 10:14





Check this: ibm.com/developerworks/rational/library/05/0927_bellagio

– Tamir Gefen
Nov 8 '11 at 10:14













Thanks a ton Tamir, though I'd be writing my own (ANT) script, I got what I needed, merge -delete will do the trick for me I guess. I'll post my results in a few days when I get to do this.

– Pulak Agrawal
Nov 9 '11 at 3:30







Thanks a ton Tamir, though I'd be writing my own (ANT) script, I got what I needed, merge -delete will do the trick for me I guess. I'll post my results in a few days when I get to do this.

– Pulak Agrawal
Nov 9 '11 at 3:30















merge -delete works for me. Cheers

– Pulak Agrawal
Nov 15 '11 at 9:46





merge -delete works for me. Cheers

– Pulak Agrawal
Nov 15 '11 at 9:46












1 Answer
1






active

oldest

votes


















4














One more robust way would be to:




  • list all files in an activity

  • for each file, find the oldest version

  • make a negative merge, or subtractive merge.



A subtractive merge can be performed to exclude or bypass bad versions on a branch without actually removing the bad versions.

Cleartool merge using the -delete option will allow a user to merge from the last known good version to a new version on the same branch which excludes the work done in the versions identified as bad versions.




That would be compliant with your SCM policies in place.



That is in essence what does the cset.pl script mentioned by Tamir, as I explain in "Clearcase: how to rollback all changes on specific branch?"



ccperl cset.pl -undo myActivity





share|improve this answer





















  • 1





    Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

    – VonC
    Nov 8 '11 at 11:48











  • thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

    – Pulak Agrawal
    Nov 9 '11 at 3:29











  • +1 for the explanation and self note links VonC

    – Pulak Agrawal
    Nov 9 '11 at 3:35











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8048754%2freverse-changset-of-an-activity-in-clearcase%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














One more robust way would be to:




  • list all files in an activity

  • for each file, find the oldest version

  • make a negative merge, or subtractive merge.



A subtractive merge can be performed to exclude or bypass bad versions on a branch without actually removing the bad versions.

Cleartool merge using the -delete option will allow a user to merge from the last known good version to a new version on the same branch which excludes the work done in the versions identified as bad versions.




That would be compliant with your SCM policies in place.



That is in essence what does the cset.pl script mentioned by Tamir, as I explain in "Clearcase: how to rollback all changes on specific branch?"



ccperl cset.pl -undo myActivity





share|improve this answer





















  • 1





    Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

    – VonC
    Nov 8 '11 at 11:48











  • thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

    – Pulak Agrawal
    Nov 9 '11 at 3:29











  • +1 for the explanation and self note links VonC

    – Pulak Agrawal
    Nov 9 '11 at 3:35
















4














One more robust way would be to:




  • list all files in an activity

  • for each file, find the oldest version

  • make a negative merge, or subtractive merge.



A subtractive merge can be performed to exclude or bypass bad versions on a branch without actually removing the bad versions.

Cleartool merge using the -delete option will allow a user to merge from the last known good version to a new version on the same branch which excludes the work done in the versions identified as bad versions.




That would be compliant with your SCM policies in place.



That is in essence what does the cset.pl script mentioned by Tamir, as I explain in "Clearcase: how to rollback all changes on specific branch?"



ccperl cset.pl -undo myActivity





share|improve this answer





















  • 1





    Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

    – VonC
    Nov 8 '11 at 11:48











  • thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

    – Pulak Agrawal
    Nov 9 '11 at 3:29











  • +1 for the explanation and self note links VonC

    – Pulak Agrawal
    Nov 9 '11 at 3:35














4












4








4







One more robust way would be to:




  • list all files in an activity

  • for each file, find the oldest version

  • make a negative merge, or subtractive merge.



A subtractive merge can be performed to exclude or bypass bad versions on a branch without actually removing the bad versions.

Cleartool merge using the -delete option will allow a user to merge from the last known good version to a new version on the same branch which excludes the work done in the versions identified as bad versions.




That would be compliant with your SCM policies in place.



That is in essence what does the cset.pl script mentioned by Tamir, as I explain in "Clearcase: how to rollback all changes on specific branch?"



ccperl cset.pl -undo myActivity





share|improve this answer















One more robust way would be to:




  • list all files in an activity

  • for each file, find the oldest version

  • make a negative merge, or subtractive merge.



A subtractive merge can be performed to exclude or bypass bad versions on a branch without actually removing the bad versions.

Cleartool merge using the -delete option will allow a user to merge from the last known good version to a new version on the same branch which excludes the work done in the versions identified as bad versions.




That would be compliant with your SCM policies in place.



That is in essence what does the cset.pl script mentioned by Tamir, as I explain in "Clearcase: how to rollback all changes on specific branch?"



ccperl cset.pl -undo myActivity






share|improve this answer














share|improve this answer



share|improve this answer








edited May 23 '17 at 12:03









Community

11




11










answered Nov 8 '11 at 11:33









VonCVonC

837k29426463184




837k29426463184








  • 1





    Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

    – VonC
    Nov 8 '11 at 11:48











  • thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

    – Pulak Agrawal
    Nov 9 '11 at 3:29











  • +1 for the explanation and self note links VonC

    – Pulak Agrawal
    Nov 9 '11 at 3:35














  • 1





    Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

    – VonC
    Nov 8 '11 at 11:48











  • thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

    – Pulak Agrawal
    Nov 9 '11 at 3:29











  • +1 for the explanation and self note links VonC

    – Pulak Agrawal
    Nov 9 '11 at 3:35








1




1





Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

– VonC
Nov 8 '11 at 11:48





Note to self: doc on subtractive merge: publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/… and techpubs.sgi.com/library/tpl/cgi-bin/…

– VonC
Nov 8 '11 at 11:48













thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

– Pulak Agrawal
Nov 9 '11 at 3:29





thanks .. I searched for .pl in that zip which Tamir led me to , and could see the main business logic was merge -delete.

– Pulak Agrawal
Nov 9 '11 at 3:29













+1 for the explanation and self note links VonC

– Pulak Agrawal
Nov 9 '11 at 3:35





+1 for the explanation and self note links VonC

– Pulak Agrawal
Nov 9 '11 at 3:35


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f8048754%2freverse-changset-of-an-activity-in-clearcase%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

To store a contact into the json file from server.js file using a class in NodeJS

Redirect URL with Chrome Remote Debugging Android Devices

Dieringhausen