Best way to “un-promote” files in Accurev?

后端 未结 4 624
猫巷女王i
猫巷女王i 2021-01-01 10:10

My company uses Accurev for source control, and for all its benefits, there\'s one simple action that I just can\'t figure out how to accomplish.

Often we have someo

4条回答
  •  轮回少年
    2021-01-01 10:46

    The audit-friendly, append-only nature of accurev really means that reverting a change means re-applying the version that you want. Intuitively, you want to go backwards "1-step." But in an append-only system, this really means going-forward and re-applying an old version. Thus, reverting is naturally a "2-steps forward" process instead of "1-step back."

    In most situations, reverting doesn't happen as often so the global value of 'append only' outweighs the revert recipe (IMO).

    As a one-stop-shop consistent solution, the most accurate approach (as you mention) is t revert the promote transaction. View the stream history, find the unwanted promote, RClick > Revert. You'll need a child workspace.. why? because doing a revert may require an un-merge. Think about reverting an interstitial promote... it's like taking the lettuce out of a sandwich and needing to merge the top- and bottom- buns together. Only in a txn-based system, that revert may also include the tomato, mustard, and celery salt and as a single "undo." So you'll need to save the changes of the merge if one exists. In any case, and even if you're just undo'ing the most recent promote, just revert the change to the workspace, do the [occasional] merge, and promote everything up.

    Long story short. Reverting in any CM system is a bit like doing surgery so you likely want relevant people involved.

    Taking a step back. I tend to take advantage of accurev streams to validate code earlier-than-often and promoting up the chain only when validated. so the chance of reverting is less as you promote higher.

提交回复
热议问题