#!/usr/bin/env python
import cookielib
import mimetools
import os
import getpass
import re
import simplejson
import socket
import subprocess
import sys
import urllib2
from optparse import OptionParser
from tempfile import mkstemp
from urlparse import urljoin, urlparse
###
# Default configuration -- user-settable variables follow.
###
# The following settings usually aren't needed, but if your Review
# Board crew has specific preferences and doesn't want to express
# them with command line switches, set them here and you're done.
# In particular, setting the REVIEWBOARD_URL variable will allow
# you to make it easy for people to submit reviews regardless of
# their SCM setup.
#
# Note that in order for this script to work with a reviewboard site
# that uses local paths to access a repository, the 'Mirror path'
# in the repository setup page must be set to the remote URL of the
# repository.
#
# Reviewboard URL.
#
# Set this if you wish to hard-code a default server to always use.
#