#!/usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# :Progetto: vcpx -- Frontend
# :Creato:   lun 03 mag 2004 01:39:00 CEST
# :Autore:   Lele Gaifax <lele@nautilus.homeip.net>
# :Licenza:  GNU General Public License
#

"""
Keep a tree in sync with its "upstream" repository of a (possibly)
different format.

For more documentation, see the README file from the distribution.
"""

__docformat__ = 'reStructuredText'

if __name__ == '__main__':
    import sys
    import locale

    locale.setlocale(locale.LC_CTYPE, '')
    if len(sys.argv)>1 and sys.argv[1] == 'test':
        from vcpx.tests import main
        sys.argv[0] += " test"
        del sys.argv[1]
        main()
    else:
        from vcpx.tailor import main, TailorException

        if len(sys.argv) == 1:
            sys.argv.append('--help')

        try:
            main()
        except TailorException, exc:
            print "%s: %s" % (exc.__doc__, exc)
        except KeyboardInterrupt:
            print "Stopped by user"
