CherryPick: Append new branch to topic for cherry-picked change
When cherry picking a change to another branch gerrit used to preserve the topic of the original change. This may lead to confusion if `change.submitWholeTopic` is enabled as then the newly cherry-picked change is part of a set of changes which is supposed to be submitted together. This seems to be unnecessary as cherry picking usually involves moving important changes such as bug fixes to another branch which is not supposed to be part of the same set to be submitted at the same time. Change-Id: I195774b7f594553018e13101a6b3ce904249eed6
This commit is contained in:
		@@ -174,7 +174,7 @@ public class RevisionIT extends AbstractDaemonTest {
 | 
			
		||||
    assertThat(cherryIt.next().message).isEqualTo(expectedMessage);
 | 
			
		||||
 | 
			
		||||
    assertThat(cherry.get().subject).contains(in.message);
 | 
			
		||||
    assertThat(cherry.get().topic).isEqualTo("someTopic");
 | 
			
		||||
    assertThat(cherry.get().topic).isEqualTo("someTopic-foo");
 | 
			
		||||
    cherry.current().review(ReviewInput.approve());
 | 
			
		||||
    cherry.current().submit();
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -184,7 +184,7 @@ public class CherryPickChange {
 | 
			
		||||
        // change.
 | 
			
		||||
        Change newChange = createNewChange(git, revWalk, changeKey, project,
 | 
			
		||||
            destRef, cherryPickCommit, refControl,
 | 
			
		||||
            identifiedUser, change.getTopic());
 | 
			
		||||
            identifiedUser, change.getTopic() + "-" + newDest.getShortName());
 | 
			
		||||
 | 
			
		||||
        addMessageToSourceChange(change, patch.getId(), destinationBranch,
 | 
			
		||||
            cherryPickCommit, identifiedUser, refControl);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user