Update of the repository. Return cmdline that has to be executed to update the repository inside `local_repository_location()`.
(cls)
| 87 | |
| 88 | @classmethod |
| 89 | def update_command(cls): |
| 90 | """ |
| 91 | Update of the repository. |
| 92 | Return cmdline that has to be executed to update the repository |
| 93 | inside `local_repository_location()`. |
| 94 | """ |
| 95 | |
| 96 | if not cls._repository_url: |
| 97 | return None |
| 98 | |
| 99 | local_repository_dir = cls.local_repository_location() |
| 100 | if not local_repository_dir: |
| 101 | return None |
| 102 | |
| 103 | if not cls._repository_url.startswith("https://github.com/"): |
| 104 | # in this case `update` has to be implemented |
| 105 | # in the distinct adapter subclass |
| 106 | raise RuntimeError( |
| 107 | "Do not known how to handle this repository: %s" % cls._repository_url |
| 108 | ) |
| 109 | |
| 110 | return ["git", "pull"] |
| 111 | |
| 112 | @classmethod |
| 113 | def current_state_command(cls): |
nothing calls this directly
no test coverage detected