New upstream version 2.1.5
TANIGUCHI Takaki
6 years ago
16 | 16 | -Phil Elson <pelson _dot_ pub _at_ gmail.com> |
17 | 17 | -Bernard `Guyzmo` Pratz <guyzmo+gitpython+pub@m0g.net> |
18 | 18 | -Timothy B. Hartman <tbhartman _at_ gmail.com> |
19 | -Konstantin Popov <konstantin.popov.89 _at_ yandex.ru> | |
19 | 20 | |
20 | 21 | Portions derived from other open source works and are clearly marked. |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: GitPython |
2 | Version: 2.1.3 | |
2 | Version: 2.1.5 | |
3 | 3 | Summary: Python Git Library |
4 | 4 | Home-page: https://github.com/gitpython-developers/GitPython |
5 | 5 | Author: Sebastian Thiel, Michael Trier |
23 | 23 | Classifier: Programming Language :: Python :: 3.3 |
24 | 24 | Classifier: Programming Language :: Python :: 3.4 |
25 | 25 | Classifier: Programming Language :: Python :: 3.5 |
26 | Classifier: Programming Language :: Python :: 3.6 | |
26 | 27 | Requires: gitdb2 (>=2.0.0) |
0 | 0 | Metadata-Version: 1.1 |
1 | 1 | Name: GitPython |
2 | Version: 2.1.3 | |
2 | Version: 2.1.5 | |
3 | 3 | Summary: Python Git Library |
4 | 4 | Home-page: https://github.com/gitpython-developers/GitPython |
5 | 5 | Author: Sebastian Thiel, Michael Trier |
23 | 23 | Classifier: Programming Language :: Python :: 3.3 |
24 | 24 | Classifier: Programming Language :: Python :: 3.4 |
25 | 25 | Classifier: Programming Language :: Python :: 3.5 |
26 | Classifier: Programming Language :: Python :: 3.6 | |
26 | 27 | Requires: gitdb2 (>=2.0.0) |
11 | 11 | import os.path as osp |
12 | 12 | |
13 | 13 | |
14 | __version__ = '2.1.3' | |
14 | __version__ = '2.1.5' | |
15 | 15 | |
16 | 16 | |
17 | 17 | #{ Initialization |
18 | 18 | def _init_externals(): |
19 | 19 | """Initialize external projects by putting them into the path""" |
20 | if __version__ == '2.1.3': | |
20 | if __version__ == '2.1.5': | |
21 | 21 | sys.path.insert(0, osp.join(osp.dirname(__file__), 'ext', 'gitdb')) |
22 | 22 | |
23 | 23 | try: |
539 | 539 | * str(output) if extended_output = False (Default) |
540 | 540 | * tuple(int(status), str(stdout), str(stderr)) if extended_output = True |
541 | 541 | |
542 | if ouput_stream is True, the stdout value will be your output stream: | |
542 | if output_stream is True, the stdout value will be your output stream: | |
543 | 543 | * output_stream if extended_output = False |
544 | 544 | * tuple(int(status), output_stream, str(stderr)) if extended_output = True |
545 | 545 |
168 | 168 | # They must be compatible to the LockFile interface. |
169 | 169 | # A suitable alternative would be the BlockingLockFile |
170 | 170 | t_lock = LockFile |
171 | re_comment = re.compile('^\s*[#;]') | |
171 | re_comment = re.compile(r'^\s*[#;]') | |
172 | 172 | |
173 | 173 | #} END configuration |
174 | 174 | |
211 | 211 | self._is_initialized = False |
212 | 212 | self._merge_includes = merge_includes |
213 | 213 | self._lock = None |
214 | self._aquire_lock() | |
215 | ||
216 | def _aquire_lock(self): | |
214 | self._acquire_lock() | |
215 | ||
216 | def _acquire_lock(self): | |
217 | 217 | if not self._read_only: |
218 | 218 | if not self._lock: |
219 | 219 | if isinstance(self._file_or_files, (tuple, list)): |
238 | 238 | self.release() |
239 | 239 | |
240 | 240 | def __enter__(self): |
241 | self._aquire_lock() | |
241 | self._acquire_lock() | |
242 | 242 | return self |
243 | 243 | |
244 | 244 | def __exit__(self, exception_type, exception_value, traceback): |
8 | 8 | from git.compat import UnicodeMixin, safe_decode, string_types |
9 | 9 | |
10 | 10 | |
11 | class InvalidGitRepositoryError(Exception): | |
11 | class GitError(Exception): | |
12 | """ Base class for all package exceptions """ | |
13 | ||
14 | ||
15 | class InvalidGitRepositoryError(GitError): | |
12 | 16 | """ Thrown if the given repository appears to have an invalid format. """ |
13 | 17 | |
14 | 18 | |
16 | 20 | """ Thrown to indicate we can't handle work tree repositories """ |
17 | 21 | |
18 | 22 | |
19 | class NoSuchPathError(OSError): | |
23 | class NoSuchPathError(GitError, OSError): | |
20 | 24 | """ Thrown if a path could not be access by the system. """ |
21 | 25 | |
22 | 26 | |
23 | class CommandError(UnicodeMixin, Exception): | |
27 | class CommandError(UnicodeMixin, GitError): | |
24 | 28 | """Base class for exceptions thrown at every stage of `Popen()` execution. |
25 | 29 | |
26 | 30 | :param command: |
73 | 77 | super(GitCommandError, self).__init__(command, status, stderr, stdout) |
74 | 78 | |
75 | 79 | |
76 | class CheckoutError(Exception): | |
80 | class CheckoutError(GitError): | |
77 | 81 | """Thrown if a file could not be checked out from the index as it contained |
78 | 82 | changes. |
79 | 83 | |
97 | 101 | return Exception.__str__(self) + ":%s" % self.failed_files |
98 | 102 | |
99 | 103 | |
100 | class CacheError(Exception): | |
104 | class CacheError(GitError): | |
101 | 105 | |
102 | 106 | """Base for all errors related to the git index, which is called cache internally""" |
103 | 107 | |
116 | 120 | self._msg = u"Hook('%s') failed%s" |
117 | 121 | |
118 | 122 | |
119 | class RepositoryDirtyError(Exception): | |
120 | """Thrown whenever an operation on a repository fails as it has uncommited changes that would be overwritten""" | |
123 | class RepositoryDirtyError(GitError): | |
124 | """Thrown whenever an operation on a repository fails as it has uncommitted changes that would be overwritten""" | |
121 | 125 | |
122 | 126 | def __init__(self, repo, message): |
123 | 127 | self.repo = repo |
432 | 432 | try: |
433 | 433 | proc.stdin.write(("%s\n" % filepath).encode(defenc)) |
434 | 434 | except IOError: |
435 | # pipe broke, usually because some error happend | |
435 | # pipe broke, usually because some error happened | |
436 | 436 | raise fmakeexc() |
437 | 437 | # END write exception handling |
438 | 438 | proc.stdin.flush() |
845 | 845 | |
846 | 846 | :param working_tree: |
847 | 847 | If True, the entry will also be removed from the working tree, physically |
848 | removing the respective file. This may fail if there are uncommited changes | |
848 | removing the respective file. This may fail if there are uncommitted changes | |
849 | 849 | in it. |
850 | 850 | |
851 | 851 | :param kwargs: |
50 | 50 | class BaseIndexEntry(tuple): |
51 | 51 | |
52 | 52 | """Small Brother of an index entry which can be created to describe changes |
53 | done to the index in which case plenty of additional information is not requried. | |
53 | done to the index in which case plenty of additional information is not required. | |
54 | 54 | |
55 | 55 | As the first 4 data members match exactly to the IndexEntry type, methods |
56 | 56 | expecting a BaseIndexEntry can also handle full IndexEntries even if they |
151 | 151 | def __hash__(self): |
152 | 152 | """ |
153 | 153 | :return: |
154 | Hash of our path as index items are uniquely identifyable by path, not | |
154 | Hash of our path as index items are uniquely identifiable by path, not | |
155 | 155 | by their data !""" |
156 | 156 | return hash(self.path) |
157 | 157 |
167 | 167 | |
168 | 168 | :param kwargs: |
169 | 169 | Additional options to be passed to git-rev-list. They must not alter |
170 | the ouput style of the command, or parsing will yield incorrect results | |
170 | the output style of the command, or parsing will yield incorrect results | |
171 | 171 | :return: int defining the number of reachable commits""" |
172 | 172 | # yes, it makes a difference whether empty paths are given or not in our case |
173 | 173 | # as the empty paths version will ignore merge commits for some reason. |
91 | 91 | k_head_default = 'master' |
92 | 92 | k_default_mode = stat.S_IFDIR | stat.S_IFLNK # submodules are directories with link-status |
93 | 93 | |
94 | # this is a bogus type for base class compatability | |
94 | # this is a bogus type for base class compatibility | |
95 | 95 | type = 'submodule' |
96 | 96 | |
97 | 97 | __slots__ = ('_parent_commit', '_url', '_branch_path', '_name', '__weakref__') |
422 | 422 | writer.set_value(cls.k_head_option, br.path) |
423 | 423 | sm._branch_path = br.path |
424 | 424 | |
425 | # we deliberatly assume that our head matches our index ! | |
425 | # we deliberately assume that our head matches our index ! | |
426 | 426 | sm.binsha = mrepo.head.commit.binsha |
427 | 427 | index.add([sm], write=True) |
428 | 428 | |
550 | 550 | with self.repo.config_writer() as writer: |
551 | 551 | writer.set_value(sm_section(self.name), 'url', self.url) |
552 | 552 | # END handle dry_run |
553 | # END handle initalization | |
553 | # END handle initialization | |
554 | 554 | |
555 | 555 | # DETERMINE SHAS TO CHECKOUT |
556 | 556 | ############################ |
132 | 132 | of the head in question. Custom query methods allow to retrieve log entries |
133 | 133 | by date or by other criteria. |
134 | 134 | |
135 | Reflog entries are orded, the first added entry is first in the list, the last | |
135 | Reflog entries are ordered, the first added entry is first in the list, the last | |
136 | 136 | entry, i.e. the last change of the head or reference, is last in the list.""" |
137 | 137 | |
138 | 138 | __slots__ = ('_path', ) |
208 | 208 | """:return: RefLogEntry at the given index |
209 | 209 | :param filepath: full path to the index file from which to read the entry |
210 | 210 | :param index: python list compatible index, i.e. it may be negative to |
211 | specifiy an entry counted from the end of the list | |
211 | specify an entry counted from the end of the list | |
212 | 212 | |
213 | 213 | :raise IndexError: If the entry didn't exist |
214 | 214 |
207 | 207 | NEW_TAG, NEW_HEAD, HEAD_UPTODATE, TAG_UPDATE, REJECTED, FORCED_UPDATE, \ |
208 | 208 | FAST_FORWARD, ERROR = [1 << x for x in range(8)] |
209 | 209 | |
210 | re_fetch_result = re.compile('^\s*(.) (\[?[\w\s\.$@]+\]?)\s+(.+) -> ([^\s]+)( \(.*\)?$)?') | |
210 | re_fetch_result = re.compile(r'^\s*(.) (\[?[\w\s\.$@]+\]?)\s+(.+) -> ([^\s]+)( \(.*\)?$)?') | |
211 | 211 | |
212 | 212 | _flag_map = {'!': ERROR, |
213 | 213 | '+': FORCED_UPDATE, |
214 | '-': TAG_UPDATE, | |
215 | 214 | '*': 0, |
216 | 215 | '=': HEAD_UPTODATE, |
217 | 216 | ' ': FAST_FORWARD} |
217 | ||
218 | v = Git().version_info[:2] | |
219 | if v >= (2, 10): | |
220 | _flag_map['t'] = TAG_UPDATE | |
221 | else: | |
222 | _flag_map['-'] = TAG_UPDATE | |
218 | 223 | |
219 | 224 | def __init__(self, ref, flags, note='', old_commit=None, remote_ref_path=None): |
220 | 225 | """ |
390 | 395 | |
391 | 396 | def __getattr__(self, attr): |
392 | 397 | """Allows to call this instance like |
393 | remote.special( \*args, \*\*kwargs) to call git-remote special self.name""" | |
398 | remote.special( \\*args, \\*\\*kwargs) to call git-remote special self.name""" | |
394 | 399 | if attr == "_config_reader": |
395 | 400 | return super(Remote, self).__getattr__(attr) |
396 | 401 | |
628 | 633 | fetch_info_lines = list() |
629 | 634 | # Basically we want all fetch info lines which appear to be in regular form, and thus have a |
630 | 635 | # command character. Everything else we ignore, |
631 | cmds = set(PushInfo._flag_map.keys()) & set(FetchInfo._flag_map.keys()) | |
636 | cmds = set(FetchInfo._flag_map.keys()) | |
632 | 637 | |
633 | 638 | progress_handler = progress.new_message_handler() |
634 | 639 | handle_process_output(proc, None, progress_handler, finalizer=None, decode_streams=False) |
39 | 39 | log = logging.getLogger(__name__) |
40 | 40 | |
41 | 41 | DefaultDBType = GitCmdObjectDB |
42 | if sys.version_info[:2] < (2, 5): # python 2.4 compatiblity | |
42 | if sys.version_info[:2] < (2, 5): # python 2.4 compatibility | |
43 | 43 | DefaultDBType = GitCmdObjectDB |
44 | 44 | # END handle python 2.4 |
45 | 45 | |
185 | 185 | self.close() |
186 | 186 | |
187 | 187 | def __del__(self): |
188 | self.close() | |
188 | try: | |
189 | self.close() | |
190 | except: | |
191 | pass | |
189 | 192 | |
190 | 193 | def close(self): |
191 | 194 | if self.git: |
417 | 420 | |
418 | 421 | :param config_level: |
419 | 422 | One of the following values |
420 | system = sytem wide configuration file | |
423 | system = system wide configuration file | |
421 | 424 | global = user level configuration file |
422 | 425 | repository = configuration file for this repostory only""" |
423 | 426 | return GitConfigParser(self._get_config_path(config_level), read_only=False) |
563 | 566 | |
564 | 567 | :raise NoSuchPathError: |
565 | 568 | :note: |
566 | The method does not check for the existance of the paths in alts | |
569 | The method does not check for the existence of the paths in alts | |
567 | 570 | as the caller is responsible.""" |
568 | 571 | alternates_path = osp.join(self.git_dir, 'objects', 'info', 'alternates') |
569 | 572 | if not alts: |
628 | 631 | return self._get_untracked_files() |
629 | 632 | |
630 | 633 | def _get_untracked_files(self, *args, **kwargs): |
631 | # make sure we get all files, no only untracked directores | |
634 | # make sure we get all files, not only untracked directories | |
632 | 635 | proc = self.git.status(*args, |
633 | 636 | porcelain=True, |
634 | 637 | untracked_files=True, |
680 | 683 | |
681 | 684 | stream = (line for line in data.split(b'\n') if line) |
682 | 685 | while True: |
683 | line = next(stream) # when exhausted, casues a StopIteration, terminating this function | |
686 | line = next(stream) # when exhausted, causes a StopIteration, terminating this function | |
684 | 687 | hexsha, orig_lineno, lineno, num_lines = line.split() |
685 | 688 | lineno = int(lineno) |
686 | 689 | num_lines = int(num_lines) |
881 | 884 | # git clone --bare /cygwin/d/foo.git /cygwin/d/C:\\Work |
882 | 885 | # |
883 | 886 | clone_path = (Git.polish_url(path) |
884 | if Git.is_cygwin() and 'bare'in kwargs | |
887 | if Git.is_cygwin() and 'bare' in kwargs | |
885 | 888 | else path) |
886 | 889 | sep_dir = kwargs.get('separate_git_dir') |
887 | 890 | if sep_dir: |
951 | 954 | * Use the 'format' argument to define the kind of format. Use |
952 | 955 | specialized ostreams to write any format supported by python. |
953 | 956 | * You may specify the special **path** keyword, which may either be a repository-relative |
954 | path to a directory or file to place into the archive, or a list or tuple of multipe paths. | |
957 | path to a directory or file to place into the archive, or a list or tuple of multiple paths. | |
955 | 958 | |
956 | 959 | :raise GitCommandError: in case something went wrong |
957 | 960 | :return: self""" |
971 | 974 | def has_separate_working_tree(self): |
972 | 975 | """ |
973 | 976 | :return: True if our git_dir is not at the root of our working_tree_dir, but a .git file with a |
974 | platform agnositic symbolic link. Our git_dir will be whereever the .git file points to | |
977 | platform agnositic symbolic link. Our git_dir will be wherever the .git file points to | |
975 | 978 | :note: bare repositories will always return False here |
976 | 979 | """ |
977 | 980 | if self.bare: |
199 | 199 | and setting the environment variable GIT_PYTHON_TEST_GIT_DAEMON_PORT to <port> |
200 | 200 | """) |
201 | 201 | if is_win: |
202 | msg += textwrap.dedent(""" | |
202 | msg += textwrap.dedent(r""" | |
203 | 203 | |
204 | 204 | On Windows, |
205 | 205 | the `git-daemon.exe` must be in PATH. |
226 | 226 | Same as with_rw_repo, but also provides a writable remote repository from which the |
227 | 227 | rw_repo has been forked as well as a handle for a git-daemon that may be started to |
228 | 228 | run the remote_repo. |
229 | The remote repository was cloned as bare repository from the rorepo, wheras | |
229 | The remote repository was cloned as bare repository from the rorepo, whereas | |
230 | 230 | the rw repo has a working tree and was cloned from the remote repository. |
231 | 231 | |
232 | 232 | remote_repo has two remotes: origin and daemon_origin. One uses a local url, |
215 | 215 | with self.assertRaises(cp.NoSectionError): |
216 | 216 | check_test_value(cr, tv) |
217 | 217 | |
218 | # But can make it skip includes alltogether, and thus allow write-backs | |
218 | # But can make it skip includes altogether, and thus allow write-backs | |
219 | 219 | with GitConfigParser(fpa, read_only=False, merge_includes=False) as cw: |
220 | 220 | write_test_value(cw, tv) |
221 | 221 |
432 | 432 | # reset the index and working tree to match the pointed-to commit |
433 | 433 | repo.head.reset(index=True, working_tree=True) |
434 | 434 | |
435 | # To detach your head, you have to point to a commit directy | |
435 | # To detach your head, you have to point to a commit directly | |
436 | 436 | repo.head.reference = repo.commit('HEAD~5') |
437 | 437 | assert repo.head.is_detached |
438 | 438 | # now our head points 15 commits into the past, whereas the working tree |
9 | 9 | |
10 | 10 | import ddt |
11 | 11 | from git.exc import ( |
12 | InvalidGitRepositoryError, | |
13 | WorkTreeRepositoryUnsupported, | |
14 | NoSuchPathError, | |
12 | 15 | CommandError, |
13 | 16 | GitCommandNotFound, |
14 | 17 | GitCommandError, |
18 | CheckoutError, | |
19 | CacheError, | |
20 | UnmergedEntriesError, | |
15 | 21 | HookExecutionError, |
22 | RepositoryDirtyError, | |
16 | 23 | ) |
17 | 24 | from git.test.lib import TestBase |
18 | 25 | |
42 | 49 | |
43 | 50 | @ddt.ddt |
44 | 51 | class TExc(TestBase): |
52 | ||
53 | def test_ExceptionsHaveBaseClass(self): | |
54 | from git.exc import GitError | |
55 | self.assertIsInstance(GitError(), Exception) | |
56 | ||
57 | exception_classes = [ | |
58 | InvalidGitRepositoryError, | |
59 | WorkTreeRepositoryUnsupported, | |
60 | NoSuchPathError, | |
61 | CommandError, | |
62 | GitCommandNotFound, | |
63 | GitCommandError, | |
64 | CheckoutError, | |
65 | CacheError, | |
66 | UnmergedEntriesError, | |
67 | HookExecutionError, | |
68 | RepositoryDirtyError, | |
69 | ] | |
70 | for ex_class in exception_classes: | |
71 | self.assertTrue(issubclass(ex_class, GitError)) | |
45 | 72 | |
46 | 73 | @ddt.data(*list(itt.product(_cmd_argvs, _causes_n_substrings, _streams_n_substrings))) |
47 | 74 | def test_CommandError_unicode(self, case): |
90 | 90 | self.assertEqual(set(['-s', '-t']), set(res)) |
91 | 91 | |
92 | 92 | def test_it_executes_git_to_shell_and_returns_result(self): |
93 | assert_match('^git version [\d\.]{2}.*$', self.git.execute(["git", "version"])) | |
93 | assert_match(r'^git version [\d\.]{2}.*$', self.git.execute(["git", "version"])) | |
94 | 94 | |
95 | 95 | def test_it_accepts_stdin(self): |
96 | 96 | filename = fixture_path("cat_file_blob") |
130 | 130 | g.stdin.flush() |
131 | 131 | self.assertEqual(g.stdout.readline(), obj_info) |
132 | 132 | |
133 | # same can be achived using the respective command functions | |
133 | # same can be achieved using the respective command functions | |
134 | 134 | hexsha, typename, size = self.git.get_object_header(hexsha) |
135 | 135 | hexsha, typename_two, size_two, data = self.git.get_object_data(hexsha) # @UnusedVariable |
136 | 136 | self.assertEqual(typename, typename_two) |
188 | 188 | self.failUnlessRaises(ValueError, self.git.remote, 'add', insert_kwargs_after='foo') |
189 | 189 | |
190 | 190 | def test_env_vars_passed_to_git(self): |
191 | editor = 'non_existant_editor' | |
191 | editor = 'non_existent_editor' | |
192 | 192 | with mock.patch.dict('os.environ', {'GIT_EDITOR': editor}): # @UndefinedVariable |
193 | 193 | self.assertEqual(self.git.var("GIT_EDITOR"), editor) |
194 | 194 |
410 | 410 | # END num existing helper |
411 | 411 | |
412 | 412 | @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(), |
413 | """FIXME: File "C:\projects\gitpython\git\test\test_index.py", line 642, in test_index_mutation | |
413 | """FIXME: File "C:\\projects\\gitpython\\git\\test\\test_index.py", line 642, in test_index_mutation | |
414 | 414 | self.assertEqual(fd.read(), link_target) |
415 | 415 | AssertionError: '!<symlink>\xff\xfe/\x00e\x00t\x00c\x00/\x00t\x00h\x00a\x00t\x00\x00\x00' |
416 | 416 | != '/etc/that' |
162 | 162 | |
163 | 163 | def _commit_random_file(self, repo): |
164 | 164 | # Create a file with a random name and random data and commit it to repo. |
165 | # Return the commited absolute file path | |
165 | # Return the committed absolute file path | |
166 | 166 | index = repo.index |
167 | 167 | new_file = self._make_file(osp.basename(tempfile.mktemp()), str(random.random()), repo) |
168 | 168 | index.add([new_file]) |
95 | 95 | Repo(tempfile.gettempdir()) |
96 | 96 | |
97 | 97 | @raises(NoSuchPathError) |
98 | def test_new_should_raise_on_non_existant_path(self): | |
98 | def test_new_should_raise_on_non_existent_path(self): | |
99 | 99 | Repo("repos/foobar") |
100 | 100 | |
101 | 101 | @with_rw_repo('0.3.2.1') |
415 | 415 | self.assertEqual(len(res[0][1]), 83, "Unexpected amount of parsed blame lines") |
416 | 416 | |
417 | 417 | @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(), |
418 | """FIXME: File "C:\projects\gitpython\git\cmd.py", line 671, in execute | |
418 | """FIXME: File "C:\\projects\\gitpython\\git\\cmd.py", line 671, in execute | |
419 | 419 | raise GitCommandError(command, status, stderr_value, stdout_value) |
420 | 420 | GitCommandError: Cmd('git') failed due to: exit code(128) |
421 | 421 | cmdline: git add 1__��ava verb��ten 1_test _myfile 1_test_other_file |
422 | 422 | self._do_base_tests(rwrepo) |
423 | 423 | |
424 | 424 | @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ |
425 | File "C:\projects\gitpython\git\cmd.py", line 559, in execute | |
425 | File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute | |
426 | 426 | raise GitCommandNotFound(command, err) |
427 | 427 | git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') |
428 | cmdline: git clone -n --shared -v C:\projects\gitpython\.git Users\appveyor\AppData\Local\Temp\1\tmplyp6kr_rnon_bare_test_root_module""") # noqa E501 | |
428 | cmdline: git clone -n --shared -v C:\\projects\\gitpython\\.git Users\\appveyor\\AppData\\Local\\Temp\\1\\tmplyp6kr_rnon_bare_test_root_module""") # noqa E501 | |
429 | 429 | @with_rw_repo(k_subm_current, bare=False) |
430 | 430 | def test_root_module(self, rwrepo): |
431 | 431 | # Can query everything without problems |
663 | 663 | # end for each checkout mode |
664 | 664 | |
665 | 665 | @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(), |
666 | """FIXME: ile "C:\projects\gitpython\git\cmd.py", line 671, in execute | |
666 | """FIXME: ile "C:\\projects\\gitpython\\git\\cmd.py", line 671, in execute | |
667 | 667 | raise GitCommandError(command, status, stderr_value, stdout_value) |
668 | 668 | GitCommandError: Cmd('git') failed due to: exit code(128) |
669 | 669 | cmdline: git add 1__Xava verbXXten 1_test _myfile 1_test_other_file 1_XXava-----verbXXten |
23 | 23 | class TestTree(TestBase): |
24 | 24 | |
25 | 25 | @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ |
26 | File "C:\projects\gitpython\git\cmd.py", line 559, in execute | |
26 | File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute | |
27 | 27 | raise GitCommandNotFound(command, err) |
28 | 28 | git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') |
29 | 29 | cmdline: git cat-file --batch-check""") |
56 | 56 | # END for each item in tree |
57 | 57 | |
58 | 58 | @skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (3, 5), """ |
59 | File "C:\projects\gitpython\git\cmd.py", line 559, in execute | |
59 | File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute | |
60 | 60 | raise GitCommandNotFound(command, err) |
61 | 61 | git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid') |
62 | 62 | cmdline: git cat-file --batch-check""") |
808 | 808 | def _obtain_lock(self): |
809 | 809 | """This method blocks until it obtained the lock, or raises IOError if |
810 | 810 | it ran out of time or if the parent directory was not available anymore. |
811 | If this method returns, you are guranteed to own the lock""" | |
811 | If this method returns, you are guaranteed to own the lock""" | |
812 | 812 | starttime = time.time() |
813 | 813 | maxtime = starttime + float(self._max_block_time) |
814 | 814 | while True: |