Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.7.1, 7.11.2
-
None
-
1
-
Severity 3 - Minor
-
1
-
Description
Issue Summary
File in commit not displayed when tag and branch have same name and tag has file deleted.
The path "test.del.file" does not exist at revision
Steps to Reproduce
- Create a branch in a Bitbucket repository. Pull branch to a local test system
- Add, commit, and push a file to a branch.
- Remove file.
- git rm <file>
- Add, commit, and push the removed file to that branch.
- Create a tag with a new name, <Name>.
- Create a branch in a Bitbucket repository with the new name, <Name>. Pull branch to a local test system.
- Add file with same name back to the branch with some text in it.
- Add, commit, and push a file to the new branch.
- At this point you should have a branch, with the file, and a tag, without the file, with the same name, <Name>. Do not know if the tag and branch need to have the same parent branch. All testing was done with the same parent branch for tag and branch.
# find . -name "<Name>" -print ./refs/tags/<Name>> ./refs/heads/<Name>
- View the file in the new branch in Bitbucket repository.
Expected Results
I would expect to see the file contents in Bitbucket.
Actual Results
Error in UI:
The path "<fileName>" does not exist at revision "<tagName>"
The below exception is thrown in the atlassian.bitbucket.log for Atlassian Bitbucket v7.11.2 version. Different version have slightly different exception due to git exit code:
2021-05-27 21:01:01,899 DEBUG [http-nio-7990-exec-645] dlaser @FDZ2GUx1261x1051798x0 13g96wo 192.168.7.254 "GET /rest/api/latest/projects/TR/repos/aaabbbccc/last-modified/test.del.file HTTP/1.1" c.a.s.i.r.e.ServiceExceptionMapper Mapping ServiceException to REST response 404 com.atlassian.bitbucket.content.NoSuchPathException: The path "test.del.file" does not exist at revision "03e36bdea2b68fb77cc2ad900d7be259519759d8" at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.newNoSuchPathException(GitCommandExitHandler.java:197) at com.atlassian.stash.internal.scm.git.command.LastModifiedCommand$1.evaluateStdErr(LastModifiedCommand.java:168) at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:204) at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:32) at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.callExitHandler(NioNuProcessHandler.java:286) at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.finish(NioNuProcessHandler.java:327) at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.onExit(NioNuProcessHandler.java:119) at com.zaxxer.nuprocess.internal.BasePosixProcess.onExit(BasePosixProcess.java:307) at com.zaxxer.nuprocess.linux.ProcessEpoll.handleExit(ProcessEpoll.java:371) at com.zaxxer.nuprocess.linux.ProcessEpoll.cleanupProcess(ProcessEpoll.java:334) at com.zaxxer.nuprocess.linux.ProcessEpoll.process(ProcessEpoll.java:272) at com.zaxxer.nuprocess.internal.BaseEventProcessor.run(BaseEventProcessor.java:81) at com.zaxxer.nuprocess.linux.ProcessEpoll.run(ProcessEpoll.java:188) at com.zaxxer.nuprocess.linux.LinuxProcess.run(LinuxProcess.java:107) at com.zaxxer.nuprocess.linux.LinProcessFactory.runProcess(LinProcessFactory.java:50) at com.zaxxer.nuprocess.NuProcessBuilder.run(NuProcessBuilder.java:273) at com.atlassian.bitbucket.internal.process.nu.NuNioProcessHelper.run(NuNioProcessHelper.java:75) at com.atlassian.bitbucket.internal.process.NioCommand.call(NioCommand.java:52) at com.atlassian.stash.internal.scm.git.command.SimpleGitCommand.configureAndCall(SimpleGitCommand.java:84) at com.atlassian.stash.internal.scm.git.command.LastModifiedCommand.listFiles(LastModifiedCommand.java:156) at com.atlassian.stash.internal.scm.git.command.LastModifiedCommand.stream(LastModifiedCommand.java:243) at com.atlassian.stash.internal.scm.git.command.LastModifiedCommand.call(LastModifiedCommand.java:88) at com.atlassian.stash.internal.scm.git.command.LastModifiedCommand.call(LastModifiedCommand.java:54) at com.atlassian.stash.internal.commit.DefaultCommitService.streamLastModified(DefaultCommitService.java:363) at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) at com.atlassian.stash.internal.rest.commit.LastModifiedResource$1.write(LastModifiedResource.java:104) at com.atlassian.bitbucket.rest.util.JsonStreamingOutput.write(JsonStreamingOutput.java:23) at com.atlassian.stash.internal.rest.filter.StreamingResponseFilter$ExceptionMappingStreamingOutput.lambda$write$0(StreamingResponseFilter.java:80) at com.atlassian.stash.internal.rest.filter.StreamingResponseFilter$AbstractStreamingExceptionMapper.stream(StreamingResponseFilter.java:50) at com.atlassian.stash.internal.rest.filter.StreamingResponseFilter$ExceptionMappingStreamingOutput.write(StreamingResponseFilter.java:80) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:24) at com.atlassian.bitbucket.internal.xcode.web.XcodeUserAgentFilter.doFilter(XcodeUserAgentFilter.java:36) at com.atlassian.analytics.client.filter.UniversalAnalyticsFilter.doFilter(UniversalAnalyticsFilter.java:75) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:33) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.bitbucket.internal.ratelimit.servlet.filter.RateLimitFilter.doFilter(RateLimitFilter.java:75) at com.atlassian.plugin.connect.plugin.auth.scope.ApiScopingFilter.doFilter(ApiScopingFilter.java:81) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.web.auth.AuthorizationFailureInterceptor.doFilterInternal(AuthorizationFailureInterceptor.java:39) at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:85) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:112) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:94) at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:67) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.plugin.connect.plugin.auth.oauth2.DefaultSalAuthenticationFilter.doFilter(DefaultSalAuthenticationFilter.java:69) at com.atlassian.plugin.connect.plugin.auth.user.ThreeLeggedAuthFilter.doFilter(ThreeLeggedAuthFilter.java:109) at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:37) at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:26) at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:33) at com.atlassian.stash.internal.spring.lifecycle.LifecycleJohnsonServletFilterModuleContainerFilter.doFilter(LifecycleJohnsonServletFilterModuleContainerFilter.java:42) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:90) at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:73) at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:84) at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.lang.Thread.run(Thread.java:748) ... 296 frames trimmed Suppressed: com.atlassian.utils.process.ProcessException: Non-zero exit code: 128 at com.atlassian.bitbucket.internal.process.nu.NioNuProcessHandler.callExitHandler(NioNuProcessHandler.java:278) ... 62 common frames omitted
Workaround
Remove tag with same name:
git push --delete origin <tagName>