close file before renaming

Renaming an open file is not possible on windows
resolve one TODO, replace with two more :/
testing: AgentConfigForTag now takes a Tag not a string
state/apiserver: Return filename from Backup API

This change adds a Content-Disposition header to backup API responses
which contains the server-generated backup filename. This becomes
important once backups start being stored server side (soon) but also
simplifies the client side of the backup API (no need to generate
backup filenames).
state, etc: state.Info.Tag is now a names.Tag not a string
Reopen mongo sessions between replset initiation attempts

Also, reinstate a change made by mfoord to call
CurrentStatus after attempting intiation, and
refresh session between attempts.

https://bugs.launchpad.net/juju-core/+bug/1339240
Update goamz in dependencies.tsv
Extend replSetGetStatus timeout, add a test
Merge pull request #272 from axw/lp1319474-update-godeps-goamz

Update goamz in dependencies.tsv

Fixes https://bugs.launchpad.net/juju-core/+bug/1319474
Merge pull request #271 from axw/lp1339240-mongo-replset-retry

Reopen mongo sessions between replset initiation attempts

Also, reinstate a change made by mfoord to call
CurrentStatus after attempting intiation, and
refresh session between attempts.

https://bugs.launchpad.net/juju-core/+bug/1339240
Merge pull request #266 from mjs/backup-api-filename

state/apiserver: Return filename from Backup API

This change adds a Content-Disposition header to backup API responses which contains the server-generated backup filename. This becomes important once backups start being stored server side (soon) but also simplifies the client side of the backup API (no need to generate backup filenames).
Added test to ensure backup filename only uses plain characters.
Merge pull request #225 from gabriel-samfira/close-file

close file before renaming

Renaming an open file is not possible on windows
Merge pull request #273 from mjs/backup-filename-test

Added test for backup filename

It is important that the filename is 7-bit ASCII because it is returned in a header (unencoded) by the backup API call.
WIP style guide
Merge pull request #250 from waigani/style-guide

WIP style guide

First pass at a style guide. Most of this *should* be common sense. Yet, as everything listed here frequently comes up in code reviews, there is arguably a need to make common sense a little more common.

I expect there will be some debate over what is a juju convention/style vs someone's opinion. As such, I provide this doc only as a starting point and I am not attached to any given convention in there. The benefits of agreeing on and clarifying our conventions upfront are: easier 'on-ramping' for newbies and quicker reviews.

I will start a juju-dev thread for this PR, please use it for debating what should/shouldn't be in the style guide (or even if you disagree that we need a guide).
Merge branch 'master' of https://github.com/juju/juju into 132-names-refactor-part-v

Conflicts:
	agent/agent_test.go
	environs/cloudinit/cloudinit_test.go
	environs/cloudinit_test.go
	state/open.go
Merge pull request #265 from davecheney/131-names-refactor-part-iv

131 names refactor part iv

testing: AgentConfigForTag now takes a names.Tag not a string.

Resolving the type of the tag returned from AgentConfig.Tag() will require more effort.
Merge branch 'master' of https://github.com/juju/juju into 132-names-refactor-part-v
fix panic when info.Tag is nil (user is admin)