|
4 | 4 | https://github.com/libgit2/libgit2sharp/wiki
|
5 | 5 | """
|
6 | 6 |
|
7 |
| -import importlib |
8 | 7 | import os.path as op
|
9 | 8 | from collections import OrderedDict
|
10 | 9 |
|
11 | 10 | from pyrevit import HOST_APP, PyRevitException
|
12 |
| -import pyrevit.compat as compat |
13 | 11 | from pyrevit.compat import PY3, safe_strtype
|
14 | 12 | from pyrevit import framework
|
15 | 13 | from pyrevit.framework import clr
|
@@ -143,14 +141,16 @@ def _make_clone_options(username=None, password=None):
|
143 | 141 | clone_ops.FetchOptions.CredentialsProvider = creds_handler
|
144 | 142 | else:
|
145 | 143 | mlogger.warning(
|
146 |
| - "CloneOptions does not support CredentialsProvider. Skipping credentials." |
| 144 | + "CloneOptions does not support CredentialsProvider. " |
| 145 | + "Skipping credentials." |
147 | 146 | )
|
148 | 147 |
|
149 | 148 | return clone_ops
|
150 | 149 |
|
151 | 150 |
|
152 | 151 | def _make_pull_signature():
|
153 |
| - mlogger.debug("Creating pull signature for username: %s", HOST_APP.username) |
| 152 | + mlogger.debug("Creating pull signature for username: %s", |
| 153 | + HOST_APP.username) |
154 | 154 | return libgit.Signature(
|
155 | 155 | HOST_APP.username, HOST_APP.username, DateTimeOffset(DateTime.Now)
|
156 | 156 | )
|
@@ -199,7 +199,8 @@ def git_pull(repo_info):
|
199 | 199 | return RepoInfo(repo)
|
200 | 200 |
|
201 | 201 | except Exception as pull_err:
|
202 |
| - mlogger.debug("Failed git pull: %s | %s", repo_info.directory, pull_err) |
| 202 | + mlogger.debug("Failed git pull: %s | %s", |
| 203 | + repo_info.directory, pull_err) |
203 | 204 | _process_git_error(pull_err)
|
204 | 205 |
|
205 | 206 |
|
@@ -229,7 +230,8 @@ def git_fetch(repo_info):
|
229 | 230 | return RepoInfo(repo)
|
230 | 231 |
|
231 | 232 | except Exception as fetch_err:
|
232 |
| - mlogger.debug("Failed git fetch: %s | %s", repo_info.directory, fetch_err) |
| 233 | + mlogger.debug("Failed git fetch: %s | %s", |
| 234 | + repo_info.directory, fetch_err) |
233 | 235 | _process_git_error(fetch_err)
|
234 | 236 |
|
235 | 237 |
|
@@ -307,7 +309,8 @@ def get_all_new_commits(repo_info):
|
307 | 309 | repo = repo_info.repo
|
308 | 310 | current_commit = repo_info.last_commit_hash
|
309 | 311 |
|
310 |
| - ref_commit = repo.Lookup(libgit.ObjectId(current_commit), libgit.ObjectType.Commit) |
| 312 | + ref_commit = repo.Lookup(libgit.ObjectId(current_commit), |
| 313 | + libgit.ObjectType.Commit) |
311 | 314 |
|
312 | 315 | # Let's only consider the refs that lead to this commit...
|
313 | 316 | refs = repo.Refs.ReachableFrom([ref_commit])
|
|
0 commit comments