dummy.py 620 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. """
  2. Dummy SCM backend for Digress.
  3. """
  4. from random import random
  5. def checkout(revision):
  6. """
  7. Checkout a revision.
  8. """
  9. pass
  10. def current_rev():
  11. """
  12. Get the current revision
  13. """
  14. return str(random())
  15. def revisions(rev_a, rev_b):
  16. """
  17. Get a list of revisions from one to another.
  18. """
  19. pass
  20. def stash():
  21. """
  22. Stash the repository.
  23. """
  24. pass
  25. def unstash():
  26. """
  27. Unstash the repository.
  28. """
  29. pass
  30. def bisect(command, revision):
  31. """
  32. Perform a bisection.
  33. """
  34. raise NotImplementedError("dummy SCM backend does not support bisection")