2
0

clone.py 427 B

123456789101112131415161718
  1. #!/usr/bin/python
  2. # This trivial script demonstrates how to clone a remote repository.
  3. #
  4. # Example usage:
  5. # python examples/clone.py git://github.com/jelmer/dulwich dulwich-clone
  6. import sys
  7. from getopt import getopt
  8. from dulwich import porcelain
  9. opts, args = getopt(sys.argv, "", [])
  10. opts = dict(opts)
  11. if len(args) < 2:
  12. print("usage: %s host:path path" % (args[0], ))
  13. sys.exit(1)
  14. porcelain.clone(args[1], args[2])