Skip to content

Commit 780cf5e

Browse files
committed
JENKINS-15128: even if updatedFiles are empty, we should consider current commit as checked in in order to remove it from commitsQueue
1 parent dbf5431 commit 780cf5e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/main/java/hudson/plugins/scm_sync_configuration/SCMManipulator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.apache.maven.scm.command.checkin.CheckInScmResult;
1010
import org.apache.maven.scm.command.checkout.CheckOutScmResult;
1111
import org.apache.maven.scm.command.remove.RemoveScmResult;
12+
import org.apache.maven.scm.command.update.UpdateScmResult;
1213
import org.apache.maven.scm.manager.NoSuchScmProviderException;
1314
import org.apache.maven.scm.manager.ScmManager;
1415
import org.apache.maven.scm.repository.ScmRepository;
@@ -74,8 +75,8 @@ private boolean expectScmRepositoryInitiated(){
7475
return scmRepositoryInitiated;
7576
}
7677

77-
public void update(File root) throws ScmException {
78-
this.scmManager.update(scmRepository, new ScmFileSet(root));
78+
public UpdateScmResult update(File root) throws ScmException {
79+
return this.scmManager.update(scmRepository, new ScmFileSet(root));
7980
}
8081
public boolean checkout(File checkoutDirectory){
8182
boolean checkoutOk = false;

src/main/java/hudson/plugins/scm_sync_configuration/ScmSyncConfigurationBusiness.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ private void processCommitsQueue() {
202202

203203
if(updatedFiles.isEmpty()){
204204
LOGGER.finest("Empty changeset to commit (no changes found on files) => commit skipped !");
205+
checkedInCommits.add(commit);
205206
} else {
206207
// Commiting files...
207208
boolean result = scmManipulator.checkinFiles(scmRoot, commit.getMessage());

0 commit comments

Comments
 (0)