projectkudu/kudu — pull request #1115 by suwatch (2014-04-20 06:11:09+00:00)
Title: fix #798 improve disconnect and reconnect logic

The idea is to save the latest successful deployment manifest at the location where it can survive across SCM delete api - I chose `/site/firstDeploymentManifest` file. This file, if exists, will be preferred over the default manifest when reconnecting SCM and initial deployment.

There are two approaches.

1. Save it at deployment completion time.
2. Save it at DELETE /scm time.

I chose the latter. It introduces no additional logic to the normal deployment execution path. It covers the scenario to not require pushing new Deployment for existing site before disconnecting (edge case).