Skip to content


How Atlassian migrated from SVN to Git

Change is good – right? We like to think when moving to a distributed version control system like Git or Hg that change is very good. Atlassian has been moving all of their development teams from Subversion to a distributed version control (Git or Mercurial). There are some tips, tricks and gotchas that we have encountered along the way.

The Confluence team, at Atlassian, recently switched from Subversion to Git on Bitbucket using git svn – Stephan, a developer from the team who was responsible for making the switch, has taken the time to write up a blog detailing the tools and process used to make the switch from Subversion to Git.

Stephan says their goal was to “make the switch to a new version control system as smooth as possible for the team, without unnecessarily interrupting our development iterations.” We think he’s done a great job of detailing the steps many of us have, or will be taking as we migrate our existing Subversion repos to Git. Some of the topics he covers are:

  • keeping commit authors the same between SVN to Git
  • using svnsync to incrementally migrate developers and build servers
  • pruning large files
  • mapping tags and branches
If you’re looking to make the switch, check out the blog “Moving Confluence from Subversion to Git”, or share your experience and tips in the comments below.

Posted in bitbucket, status, tips & tricks.

Tagged with , , , .


Follow Up On Our Downtime Last Week

Last week we experienced unexpected downtime.  Anytime something like this happens we perform a full post-incident investigation to ensure it never happens again.  Here are our findings.

The Crash

We determined the problem started with our syslog server crashing.  We found log rotation occurred at 04:05 as the cron.daily logrotate script ran:

-rw------- 1 root root 101714 Jan 5 04:05 messages-20120105.gz
-rw------- 1 root root 5012515 Jan 5 15:11 messages

Instead of responding to HUP with a graceful reload, rsyslogd completely stopped:

Jan 5 04:05:04 bitbucket04 rsyslogd: [origin software="rsyslogd" swVersion="4.6.2" x-pid="1905" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'restart'.
Jan 5 04:05:04 bitbucket04 kernel: Kernel logging (proc) stopped.

Based on previous log entries this is normal, but it typically restarts properly.  In this case, rsyslogd didn’t start back up at all.

We’re currently running rsyslog 4.6.2 that ships with RHEL 6.2.  We suspect we hit a known bug – the fix isn’t yet packaged for RHEL.

Blocking on syslog()

So we determined rsyslog crashed.  We wouldn’t have expected that to be much of a problem.  However, closer inspection shows we were syslogging over TCP.  Our syslog server was configured for both TCP and UDP:

# Provides UDP syslog reception

$ModLoad imudp.so
$UDPServerRun 514

# Provides TCP syslog reception
$ModLoad imtcp.so
$InputTCPServerRun 514

But our clients were specifically configured to log over TCP – two @ signs prior to the hostname means use TCP and one would mean use UDP:

*.*    @@syslog.private.bitbucket.org

When our central rsyslog crashed all applications logging to it over TCP were blocked and our systems became unresponsive.  This included our custom applications and almost every other piece of our technology stack.  Unknown to us, we were  vulnerable to this problem since switching data centers over a year ago.  Moreover, recently we began syslogging much more information, such as Nginx logs.  In this instance, the crash together with the increased logging combined to make the situation much worse.

We’ve made these changes to ensure this doesn’t happen again:

  • Disabled rsyslog’s HUPIsRestart option
  • Added a Monit check to ensure rsyslog is restarted even if it crashes
  • Switched from syslog over TCP to UDP

We’re sorry for the inconvenience this caused.  We’re always working to make Bitbucket more reliable and we won’t see this particular issue occur again.

Posted in Uncategorized.


Introducing Keyboard Shortcuts

Make your Bitbucket experience faster by dropping the mouse and taking advantage of the new keyboard shortcuts.

Keyboard shortcuts provide a quick and easy way of navigating through Bitbucket and performing common (repetitive) actions without having to take your fingers off the keyboard. Pages you’ll find keyboard shortcuts useful for include:

  • source code browser
  • commit history
  • pull requests
  • searching from any page

Row highlighting

Press “j” and “k” to quickly move up and down between table rows and the source browser.

A yellow row highlighter is used when navigating tables and source to show you which row is selected, so you can quickly move between pages when pressing enter.

Shortcuts are just a key away

Navigate over to your Bitbucket repo and try out a few easy shortcuts to get going:

  • Press “g” then “d” and you will quickly jump to your dashboard
  • Press “/” to search your repo from any page

To see a list of all keyboard shortcuts, simply press the ‘?’ key from any page or read our keyboard shortcuts documentation and start using keyboard shortcuts today!

Posted in bitbucket, new stuff.

Tagged with , , , , , , , , .


Unplanned downtime today

This morning around 6:00 am UTC Bitbucket began to fail with intermittent 500 errors, which continued for several hours.

Our investigation shows that the root cause was our syslog server crashing. The syslog queues on all of our other servers filled up and they became unresponsive.

We’re currently re-examining our syslog configuration, particularly looking at on-disk queuing, to ensure this single point of failure is avoided.  We’re also adding new monitoring to detect if a similar situation were to reoccur.

We’re very sorry for the inconvenience this downtime caused. This and other service related updates can be found on our status site status.bitbucket.org.

Posted in bitbucket, status.

Tagged with , , .


Mobile apps for Bitbucket

Ever had the need to access Bitbucket when away from your desktop? At least a few Bitbucket users have and gone one step further!

Bitbucket has gone mobile with the help of several community developed mobile apps. Whether you are using an iPhone or Android device there are several apps to help keep tabs on Bitbucket source.

Bitbeaker

Bitbeaker is a free Android client that allows you to browse your repo source, issues, wiki pages, commit history and search public repos.

RepoMan

RepoMan is a free Android client that allows you to view your Bitbucket and GitHub repo issues, commit history, source diffs, branch history and search public repos.

Issue Bucket

Issue Bucket is a free iPhone application that offers a simple way to keep track of the issues and changesets for your Mercurial repositories on Bitbucket

iOpenSource

iOpenSource is a unique paid mobile phone client that allows you to search and download source codes in zip archive from Google Code, Github, SourceForge, and Bitbucket.

Go Mobile

These are just a few of the apps out there to go mobile with Bitbucket. Have you given any of them a try?

More Ideas?

Heard of any other good apps or other cool uses of the Bitbucket REST API? Let us know in the comments.

If you are interested in writing your own custom integration, check out our Bitbucket Developer Documentation.

Posted in bitbucket.

Tagged with , , , , , , , , , .


Scheduled Maintenance December 19 at 02:00 UTC

Bitbucket will be unavailable for up to an hour on December 19, 2011 beginning at 02:00 UTC. During this time we will complete the database migration we began during our last maintenance window.

When we’re done, Bitbucket’s database server will be running on new hardware that will increase the performance and reliability of the site. We think you’ll like the results and thank you for your patience.

Posted in Uncategorized.


Pull requests with side-by-side diffs

Bitbucket now has the option to view file changes—IDE-style—with side-by-side diffs:

Side by side diff 2012

With both versions of the file shown in full with synchronized scrolling, you can more quickly grok what has changed, making code review easier in:

  • pull requests
  • the compare view
  • individual commits

Show me more: expandable context

Unified diffs are great for reviewing small changes, but lines hidden beyond the 3 lines of context can leave out important information. We’ve updated unified diffs with clickable skipped sections to expand the context in the diff, instantly.

Expand diff

Using side-by-side diff

Side by side button 2012

Want to switch from unified mode to side-by-side mode? Simply click on any side-by-side button.

Try Side by side diff 2012

Posted in bitbucket.

Tagged with , , , , , , .


Scheduled Maintenance December 5th at 0200 GMT

Bitbucket will be unavailable up to one hour starting December 5th at 02:00 GMT. During this maintenance window we will complete the database migration from our previous maintenance window and move our database to newer, more powerful servers.

Unfortunately, last weekend we were unable to complete the migration within the maintenance window, so we reverted to our original configuration.

The database migration we attempted last week had several steps. 1) We needed to perform a restart to enable write-ahead-log shipping to the new server. 2) We needed to perform an rsync which we expected to take no more than 20 minutes. 3) We planned to promote the new replica to be our master database. Last weekend, the rsync between the old server and the new one exceeded the 20 minutes allotted. It became was clear something was wrong and we rolled back the deployment changes.

After investigation, we determined the cause of the problem was that the new server’s primary network interface was bridged for use with KVM and libvirt. This bridging allowed us to practice the database migration on virtual machines. However, it also resulted in a degradation of network performance which caused the rsync to take longer than expected. To resolve the performance problem immediately we unbridged the NIC on the new database server.

On December 5th, we’ll attempt the migration again, following the same procedure outlined above. Total downtime should be no more than one hour. We apologize for the inconvenience of downtime, but we’ll be back with an even faster Bitbucket.

Posted in bitbucket.


Scheduled Maintenance November 28 at 02:00 GMT

Bitbucket will be unavailable up to one hour starting November 28 at 02:00 GMT. During the maintenance window we will move our database to newer, more powerful servers.

Thanks for your patience as we work to increase Bitbucket’s performance and reliability.

Posted in bitbucket.


Bitbucket is heading to Devoxx

Devoxx 2012

Bitbucket and Atlassian are heading to Devoxx in Antwerp, Belgium next week – November 14th – 18th. Atlassian is proud to be a sponsor of Devoxx and we would love to meet you there.

Come chat with us at our booth. Stop by any time during the conference Monday to Friday to talk about Bitbucket, DVCS or whatever tickles your fancy.

Check out one of our sessions. This year we’re participating in a few sessions:

Did someone say Belgium beer? Of course, it wouldn’t be an Atlassian event if there wasn’t beer. Thursday (November 17), before the live recording of the next JavaPosse’s episode, we’ll be handing out beer and sponsoring the drinks for the conference after party at The Noxx.

Come by and ask a question or just drop by and say “hi”.

Posted in Uncategorized.

Tagged with , , , , .