1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #5002 closed

Deleting a repo and then recreating with the same name fails under some circumstances (BB-6363)

Igor Tarasov
created an issue

Attempting to create a new repository with the same name as a deleted repository will fail if there is an existing redirection URL or if the background process fails while deleting and leaves behind dead data.

Original text:

Initially I've created an hg repositury in error, my plan was to create git one. So, I deleted it and created a new one, with the same name but this time using git. Now, after the update this repository seems to be hg one again and is empty, and there are no files in it, if I browse it via site. But I can still clone and push to it via git command line, so it is there, but somehow I can't access it on site.

Comments (17)

  1. Erik van Zijst staff

    Hi Igor,

    I cannot reproduce the issue.

    I have checked and your repo (I'm assuming this is /tigr/daytext) and it is indeed (still?) Mercurial.

    Are you sure you deleted the repo (as opposed to renaming) and the selected properly selected "Git" when you created a new repo?

    As we have no known issues regarding this and I'm unable to reproduce this, can you just try deleting the repo once more (little "cog" icon -> "Delete repository" -> "Delete" -> confirm), followed by "Create a repository" -> select "Git" and let me know if this fails?

  2. Michael Forbes

    I am having a similar issue. I created a repository, did a bunch of mucking about with branches, PR's, strip etc. Then I deleted the repo, created it again, pushed. It still contains links to stripped changesets etc.

    Pushing to a renamed new repo works fine, so something is not getting deleted.

    Original repo that is failing: https://bitbucket.org/mforbes/dummy

    Renamed repo that is fine: https://bitbucket.org/mforbes/dummy1

    Both created from scratch from the same hg repo.

    As an example of how dummy fails: the source code for some of my branches links to non-existant change sets.

    Trying to select the "code_review_2" branch from the following page


    leads to the following page which does not exist


    The new repo


    points correctly to


    (As a comment, if someone looks at this, could you please explain why there are no differences listed in the following pull request? The PR should add several files, but they are not listed.



  3. Brian Nguyen

    Hi Michael,

    I'm unable to reproduce those 404s locally, I suspect that the problem was caused by an invalid cache.

    If you are still experiencing problems, could you raise a separate issue here. It would avoid us spamming other user's with our comments.

    In that new issue, if you could lay out exactly what was stripped from the repository I can do some more digging.

    Cheers, Brian

  4. Michael Forbes

    Okay, works here for me now too so I concur that it is probably a caching issue. I will play a bit more, and if it is a server-side cache issue, I will open a separate issue.

    Thanks, Michael.

  5. Log in to comment