)

if not (
     has_get_post(source_dir)  and
     has_get_post(deployment_dir)
):
   abort()



### make sure there are no uncommited staged changes ###

if (  # string listing filenames of those staged
      # files with differences from the HEAD
      # is NOT empty
    sgit.diff_index('--name-only','--cached','HEAD')!=u''
):
  abort( "Commit your staged changes first" )




### want to go through with this? ###

ans = raw_input(
       "Deploy " + source_dir +
       "\nto " + deployment_dir +
       "\nAnswer with y or n (n is default): "
      )
if ans!='y':
   abort( "OK, stopping without deploying" )