It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

stash branch view on deleted branches

RAJESH Patwardhan Jan 20, 2014

we have disabled force push completely for now to all of the stash repositories.

Hence for private branches folks are deleting the branch and repushing it.

so if they are working on the workspace --> deleted the branch --> pushed the branch to stash

In the web UI if they were on the branch commits page then developer gets a 404 not found.

But then you navigate out of the page and then back via branches then the UI works as expected.

The request is to see if it is possible to notice if the branch got deleted \ newly created and then navigate appropriately to either the base branch or then to the newly pushed branch with the same name.

it is a low priority but good to have feature

4 answers

1 accepted

0 votes
Answer accepted
RAJESH Patwardhan Jan 21, 2014

So i have the update and way to replicate this scenario.

1 create a branch and checkin to the branch

2 navigate to the branches and select this branch.

3 create a pull request and merge to master select "<input id="delete-branch-checkbox" class="checkbox" style="margin-right: 5px; white-space: nowrap;" type="checkbox" name="delete-branch-checkbox"/> <label style="color: #666666; font-family: Arial, sans-serif; font-size: 14px; line-height: 31px; white-space: nowrap; background-color: #f5f5f5;" for="delete-branch-checkbox">Delete source branch after merging"</label>

4. then click again on the branches and i see

No branch or tag 'refs/heads/show_issue' exists in repository 'p2'

Use the links at the top to get back.

Charles O'Farrell Jan 21, 2014

Hi Rajesh,

My sincere apologies, you've actually found a bug (apparently it was noticed by someone else, but this is the first I've heard of it). Please watch the following for updates.

https://jira.atlassian.com/browse/STASH-4299

It issue is caused by having a 'sticky' branch in the browser so that as you click around our different tabs the same branch is selected. When you merge that pull request the branch is deleted but _your_ browser is still trying to select it. It won't affect other users. You can work around that for now by closing the tab and re-opening Stash again.

Sorry about that.

Charles

0 votes
Charles O'Farrell Jan 20, 2014

Hi Rajesh,

If the branch has been created again with the exact same name then clicking on the branch link should work as expected. There isn't an internal ID for the branches, it's just using the branch name in the URL.

I'll pass on your suggestion to the team, although I don't think we'll change the error page as it might be just as strange to be redirected to the base branch. Thanks though.

Charles

0 votes
RAJESH Patwardhan Jan 20, 2014

just to clarify so we are on the same page,

The suggestion was to either

  1. show the newly created branch commits ( the user is on the commits page for the branch in UI and the branch got deleted and re-created) in which case it throws a 404 not found currently.
  2. else if the branch is completed deleted then go to the master or develop which ever is the base branch.

Charles O'Farrell Jan 20, 2014

1. If the branch is deleted and re-created (verbatim) you shouldn't be be seeing a 404.

2. We'll take that as a suggestion, but I don't think it will happen any time soon.

Charles O'Farrell Jan 20, 2014

I have just tested deleting and adding a branch and it doesn't 404, just make sure the branch name is exactly the name (otherwise it really is a different branch and there isn't anything we can do)

0 votes
Ishan Aug 18, 2014

Why cant I remove a tag if I am allowed to remove the branch ??? and even when I click on tag it show the UI for branch.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder

...ipe.sh :  #!/bin/bash source "$(dirname "$0")/common.sh" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,216 views 1 22
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you