How to access full source of old commit in BitBucket?

I was trying to figure out if it's possible to browse the code of an earlier commit like you can on GitHub and it brought me here. I used the information I found here, and after fiddling around with the urls, I actually found a way to browse code of old commits as well.

When you're browsing your code the URL is something like:

https://bitbucket.org/user/repo/src/

and by adding a commit hash at the end like this:

https://bitbucket.org/user/repo/src/a0328cb

You can browse the code at the point of that commit. I don't understand why there's no dropdown box for choosing a commit directly, the feature is already there. Strange.


Step 1

Step 1


Step 2

Step 2


Step 3

Step 3


Step 4

Step 4


Final Step

Final Step


I understand you want to download an older version via the BitBucket web interface without using a Mercurial/Git client.

Check this related question. On the comments, someone says that there is no way to do that. Fortunately, that's not entirely true.

By navigating on BitBucket project pages, I found no link to download an arbitrary version. There are links to download specific tags, in the format:

https://bitbucket.org/owner/repository/get/v0.1.2.tar.gz

But by tweaking a bit the url above, changing the tag name by the commit hash, like:

https://bitbucket.org/owner/repository/get/A0B1C2D.tar.gz

You can actually download a specific version.

As mentioned by Rakka Rage in a comment, replacing .tar.gz by .zip works too.

Tags:

Bitbucket