Search code examples
accurev

Can git cherry-pick be done in accurev?


I'm looking to do something similiar in functionality as git cherry-pick. My situation is thus: I mistakenly promoted from from stream C to Stream B, realized it was an error and reverted the transaction, this succeeded. But unfortunately I now no longer have the code In stream C that I had before the promote. I've tried doing a send to workspace and merged the underlaps but this puts me in the same place I was in before, I no longer have my changes. if I keep the overlaps I get overlaps with almost all the files.

I'm really at wits end, I know if this was Git I would have reverted my bad commit, merged the reversion into my feature branch, then cherry-picked the original commit.

accurev has broken me, I'm ready to cry and need some help :,(


Solution

  • In the future, you could have done a demote (new feature in AccuRev 6.2.0) of your changes in streamB and put them back in streamC (very slick new feature IMO).

    To resolve your situation, perform the following steps.

    1. Hang a workspace off of streamC.
    2. Update this workspace.
    3. Right click on streamB -> Show History -> Select the promote transaction -> Right click -> Send to Workspace -> Choose workspace from step 1.
    4. Depending on your version of AccuRev, click on the "Default Group" filter or "Outgoing" filter.
    5. Select all of the files included from the send to operation -> Right click -> Merge. You will not want to automatically keep the merge, but need to manually select the version of the file in your workspace (lower right hand pane). This contains the changes from your initial promote. After you have done this, keep and exit.
    6. Now promote your changes into streamC.

    The demote feature basically does all these steps for you in one operation BTW.