com.atlassian.stash.scm.MergeException: New changes were pushed to master in PROJECT/repo while the merge was being performed. Please retry the merge.

Atlassian JIRA | Deric Lee | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    This error shows up when trying to merge PR {noformat}2014-09-23 17:51:56,514 DEBUG [http-bio-7990-exec-13] username @1KHFC1Ux1071x447x0 1b6hse4 10.231.40.88,127.0.0.1 "POST /rest/api/latest/projects/PROJECT/repos/repo/pull-requests/308/merge HTTP/1.1" c.a.s.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 409 com.atlassian.stash.scm.MergeException: New changes were pushed to master in PROJECT/repo while the merge was being performed. Please retry the merge. at com.atlassian.stash.internal.scm.git.merge.MergeCommand.newMergeException(MergeCommand.java:132) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:112) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:29) ~[na:na] at com.atlassian.stash.internal.scm.git.porcelain.AbstractWorkTreeCommand.call(AbstractWorkTreeCommand.java:37) ~[na:na] at com.atlassian.stash.internal.pull.PullRequestServiceImpl$MergeAndUpdatePullRequestOperation.perform(PullRequestServiceImpl.java:1646) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.pull.PullRequestServiceImpl$MergeAndUpdatePullRequestOperation.perform(PullRequestServiceImpl.java:1618) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.concurrent.DefaultLockService.doWithLock(DefaultLockService.java:102) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.concurrent.DefaultLockService.doWithLock(DefaultLockService.java:68) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.pull.PullRequestServiceImpl.merge(PullRequestServiceImpl.java:623) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.rest.pull.PullRequestResource.mergePullRequest(PullRequestResource.java:425) ~[stash-rest-3.2.4.jar:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ~[na:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) ~[StashAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) ~[atlassian-trusted-apps-core-3.0.6.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) ~[na:na] at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) ~[na:na] at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) ~[atlassian-core-4.6.15.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84) ~[stash-service-impl-3.2.4.jar:na] at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:446) ~[hazelcast-wm-3.3-RC2.jar:3.3-RC2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] ... 275 frames trimmed Caused by: com.atlassian.stash.scm.git.push.NonFastForwardUpdateRejectedException: The merge could not be completed because the target ref was updated mid-merge. at com.atlassian.stash.internal.scm.git.command.merge.UpdateRefCommandExitHandler.evaluateStdErr(UpdateRefCommandExitHandler.java:27) ~[na:na] at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:144) ~[na:na] at com.atlassian.stash.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:33) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand.callExitHandler(BaseCommand.java:138) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:251) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:220) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand.call(BaseCommand.java:75) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.internal.scm.git.porcelain.AbstractTimedRequest.configureAndCall(AbstractTimedRequest.java:30) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.TwoStepFetchStrategy.updateRef(TwoStepFetchStrategy.java:66) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.CancelableTwoStepFetchStrategy.updateRef(CancelableTwoStepFetchStrategy.java:71) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.TwoStepFetchStrategy.fetch(TwoStepFetchStrategy.java:53) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.TimedFetchStrategy.fetch(TimedFetchStrategy.java:30) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doFetch(MergeCommand.java:71) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:97) ~[na:na] ... 23 common frames omitted{noformat}

    Atlassian JIRA | 2 years ago | Deric Lee [Atlassian]
    com.atlassian.stash.scm.MergeException: New changes were pushed to master in PROJECT/repo while the merge was being performed. Please retry the merge.
  2. 0

    This error shows up when trying to merge PR {noformat}2014-09-23 17:51:56,514 DEBUG [http-bio-7990-exec-13] username @1KHFC1Ux1071x447x0 1b6hse4 10.231.40.88,127.0.0.1 "POST /rest/api/latest/projects/PROJECT/repos/repo/pull-requests/308/merge HTTP/1.1" c.a.s.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 409 com.atlassian.stash.scm.MergeException: New changes were pushed to master in PROJECT/repo while the merge was being performed. Please retry the merge. at com.atlassian.stash.internal.scm.git.merge.MergeCommand.newMergeException(MergeCommand.java:132) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:112) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:29) ~[na:na] at com.atlassian.stash.internal.scm.git.porcelain.AbstractWorkTreeCommand.call(AbstractWorkTreeCommand.java:37) ~[na:na] at com.atlassian.stash.internal.pull.PullRequestServiceImpl$MergeAndUpdatePullRequestOperation.perform(PullRequestServiceImpl.java:1646) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.pull.PullRequestServiceImpl$MergeAndUpdatePullRequestOperation.perform(PullRequestServiceImpl.java:1618) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.concurrent.DefaultLockService.doWithLock(DefaultLockService.java:102) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.concurrent.DefaultLockService.doWithLock(DefaultLockService.java:68) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.pull.PullRequestServiceImpl.merge(PullRequestServiceImpl.java:623) ~[stash-service-impl-3.2.4.jar:na] at com.atlassian.stash.internal.rest.pull.PullRequestResource.mergePullRequest(PullRequestResource.java:425) ~[stash-rest-3.2.4.jar:na] at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) ~[na:na] at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) ~[StashAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) ~[atlassian-trusted-apps-core-3.0.6.jar:na] at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69) ~[na:na] at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33) ~[na:na] at com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31) ~[atlassian-core-4.6.15.jar:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) ~[BeforeLoginPluginAuthenticationFilter.class:na] at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84) ~[stash-service-impl-3.2.4.jar:na] at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:446) ~[hazelcast-wm-3.3-RC2.jar:3.3-RC2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_25] at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25] ... 275 frames trimmed Caused by: com.atlassian.stash.scm.git.push.NonFastForwardUpdateRejectedException: The merge could not be completed because the target ref was updated mid-merge. at com.atlassian.stash.internal.scm.git.command.merge.UpdateRefCommandExitHandler.evaluateStdErr(UpdateRefCommandExitHandler.java:27) ~[na:na] at com.atlassian.stash.scm.git.common.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:144) ~[na:na] at com.atlassian.stash.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:33) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand.callExitHandler(BaseCommand.java:138) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:251) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand$CommandFuture.get(BaseCommand.java:220) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.scm.BaseCommand.call(BaseCommand.java:75) ~[stash-spi-3.2.4.jar:na] at com.atlassian.stash.internal.scm.git.porcelain.AbstractTimedRequest.configureAndCall(AbstractTimedRequest.java:30) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.TwoStepFetchStrategy.updateRef(TwoStepFetchStrategy.java:66) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.CancelableTwoStepFetchStrategy.updateRef(CancelableTwoStepFetchStrategy.java:71) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.TwoStepFetchStrategy.fetch(TwoStepFetchStrategy.java:53) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.TimedFetchStrategy.fetch(TimedFetchStrategy.java:30) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doFetch(MergeCommand.java:71) ~[na:na] at com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:97) ~[na:na] ... 23 common frames omitted{noformat}

    Atlassian JIRA | 2 years ago | Deric Lee
    com.atlassian.stash.scm.MergeException: New changes were pushed to master in PROJECT/repo while the merge was being performed. Please retry the merge.

    Root Cause Analysis

    1. com.atlassian.stash.scm.MergeException

      New changes were pushed to master in PROJECT/repo while the merge was being performed. Please retry the merge.

      at com.atlassian.stash.internal.scm.git.merge.MergeCommand.newMergeException()
    2. com.atlassian.stash
      PullRequestResource.mergePullRequest
      1. com.atlassian.stash.internal.scm.git.merge.MergeCommand.newMergeException(MergeCommand.java:132)[na:na]
      2. com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:112)[na:na]
      3. com.atlassian.stash.internal.scm.git.merge.MergeCommand.doWithWorkTree(MergeCommand.java:29)[na:na]
      4. com.atlassian.stash.internal.scm.git.porcelain.AbstractWorkTreeCommand.call(AbstractWorkTreeCommand.java:37)[na:na]
      5. com.atlassian.stash.internal.pull.PullRequestServiceImpl$MergeAndUpdatePullRequestOperation.perform(PullRequestServiceImpl.java:1646)[stash-service-impl-3.2.4.jar:na]
      6. com.atlassian.stash.internal.pull.PullRequestServiceImpl$MergeAndUpdatePullRequestOperation.perform(PullRequestServiceImpl.java:1618)[stash-service-impl-3.2.4.jar:na]
      7. com.atlassian.stash.internal.concurrent.DefaultLockService.doWithLock(DefaultLockService.java:102)[stash-service-impl-3.2.4.jar:na]
      8. com.atlassian.stash.internal.concurrent.DefaultLockService.doWithLock(DefaultLockService.java:68)[stash-service-impl-3.2.4.jar:na]
      9. com.atlassian.stash.internal.pull.PullRequestServiceImpl.merge(PullRequestServiceImpl.java:623)[stash-service-impl-3.2.4.jar:na]
      10. com.atlassian.stash.internal.rest.pull.PullRequestResource.mergePullRequest(PullRequestResource.java:425)[stash-rest-3.2.4.jar:na]
      10 frames
    3. com.atlassian.applinks
      ContextFilter.doFilter
      1. com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25)[na:na]
      1 frame
    4. com.atlassian.stash
      BeforeLoginPluginAuthenticationFilter.doFilter
      1. com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86)[StashAuthenticationFilter.class:na]
      2. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111)[BeforeLoginPluginAuthenticationFilter.class:na]
      3. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77)[BeforeLoginPluginAuthenticationFilter.class:na]
      3 frames
    5. com.atlassian.security
      TrustedApplicationsFilter.doFilter
      1. com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100)[atlassian-trusted-apps-core-3.0.6.jar:na]
      1 frame
    6. com.atlassian.oauth
      OAuthFilter.doFilter
      1. com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:69)[na:na]
      1 frame
    7. com.atlassian.analytics
      DefaultAnalyticsFilter.doFilter
      1. com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:33)[na:na]
      1 frame
    8. com.atlassian.core
      AbstractHttpFilter.doFilter
      1. com.atlassian.core.filters.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:31)[atlassian-core-4.6.15.jar:na]
      1 frame
    9. com.atlassian.stash
      DefaultRequestManager.doAsRequest
      1. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89)[BeforeLoginPluginAuthenticationFilter.class:na]
      2. com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75)[BeforeLoginPluginAuthenticationFilter.class:na]
      3. com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84)[stash-service-impl-3.2.4.jar:na]
      3 frames
    10. Hazelcast
      WebFilter.doFilter
      1. com.hazelcast.web.WebFilter.doFilter(WebFilter.java:446)[hazelcast-wm-3.3-RC2.jar:3.3-RC2]
      1 frame
    11. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_25]
      2. java.lang.Thread.run(Thread.java:724)[na:1.7.0_25]
      2 frames