Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support Cygwin's Git on Windows #533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Byron merged 14 commits into gitpython-developers:master from ankostis:cygwin
Oct 22, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
ba7c2a0
appveyor, #533: enable CYGWIN TCs without failing
ankostis Oct 13, 2016
e6e23ed
cygwin, #533: Try to make it work with Cygwin's Git.
ankostis Oct 13, 2016
0bce7cc
cygwin, #533: FIX daemon launching
ankostis Oct 14, 2016
57d0537
cygwin, #533: Polish also --git-separate-dir
ankostis Oct 14, 2016
3b1cfcc
cygwin, #533: Allow '/cygdrive/c/' paths on repo init
ankostis Oct 14, 2016
a2d248b
cygwin, #533: polish abs-paths in `git add` commands
ankostis Oct 14, 2016
0210e39
src: import os.path as osp
ankostis Oct 15, 2016
b02662d
src: reduce needless deps to `gitdb.util`
ankostis Oct 15, 2016
4486bcb
ci, deps: no PY26, ddt>=1.1.1, CIs `pip install test-requirements`
ankostis Oct 15, 2016
b2efa1b
cygwin, #533: FIX submodules detection (~10TCs fixed)
ankostis Oct 16, 2016
ec731f4
Merge with #532, fix unicode filenames with escapesurogates
ankostis Oct 16, 2016
5962373
cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 cases
ankostis Oct 16, 2016
08e0d5f
helper: minor fix prefix of temp-dirs
ankostis Oct 17, 2016
cc77e6b
tc-helper: fix minor contexlib abuse
ankostis Oct 17, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 cases
  • Loading branch information
ankostis committed Oct 16, 2016
commit 5962373da1444d841852970205bff77d5ca9377f
2 changes: 1 addition & 1 deletion .appveyor.yml
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ build: false

test_script:
- IF "%IS_CYGWIN%" == "yes" (
nosetests -v || echo "Ignoring failures." & EXIT /B 0
nosetests -v
) ELSE (
IF "%PYTHON_VERSION%" == "3.5" (
nosetests -v --with-coverage
Expand Down
2 changes: 1 addition & 1 deletion git/ext/gitdb
Open in desktop
11 changes: 9 additions & 2 deletions git/test/test_index.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
GitCommandError,
CheckoutError,
)
from git.compat import string_types, is_win
from git.compat import string_types, is_win, PY3
from git.exc import (
HookExecutionError,
InvalidGitRepositoryError
Expand All @@ -49,6 +49,7 @@
from gitdb.base import IStream

import os.path as osp
from git.cmd import Git


class TestIndex(TestBase):
Expand Down Expand Up @@ -405,6 +406,12 @@ def _count_existing(self, repo, files):
return existing
# END num existing helper

@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
"""FIXME: File "C:\projects\gitpython\git\test\test_index.py", line 642, in test_index_mutation
self.assertEqual(fd.read(), link_target)
AssertionError: '!<symlink>\xff\xfe/\x00e\x00t\x00c\x00/\x00t\x00h\x00a\x00t\x00\x00\x00'
!= '/etc/that'
""")
@with_rw_repo('0.1.6')
def test_index_mutation(self, rw_repo):
index = rw_repo.index
Expand Down Expand Up @@ -823,7 +830,7 @@ def test_index_bare_add(self, rw_bare_repo):
asserted = True
assert asserted, "Adding using a filename is not correctly asserted."

@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and sys.version_info[:2] == (2, 7), r"""
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and not PY3, r"""
FIXME: File "C:\projects\gitpython\git\util.py", line 125, in to_native_path_linux
return path.replace('\\', '/')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)""")
Expand Down
8 changes: 8 additions & 0 deletions git/test/test_repo.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,14 @@ def test_blame_complex_revision(self, git):
self.assertEqual(len(res), 1)
self.assertEqual(len(res[0][1]), 83, "Unexpected amount of parsed blame lines")

@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
"""FIXME: File "C:\projects\gitpython\git\cmd.py", line 671, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git add 1__��ava verb��ten 1_test _myfile 1_test_other_file
1_��ava-----verb��ten
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
""")
@with_rw_repo('HEAD', bare=False)
def test_untracked_files(self, rwrepo):
for run, (repo_add, is_invoking_git) in enumerate((
Expand Down
30 changes: 24 additions & 6 deletions git/test/test_submodule.py
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import os
Expand All @@ -6,24 +7,34 @@

import git
from git.cmd import Git
from git.compat import string_types, is_win
from git.compat import (
string_types,
is_win,
)
from git.exc import (
InvalidGitRepositoryError,
RepositoryDirtyError
)
from git.objects.submodule.base import Submodule
from git.objects.submodule.root import RootModule, RootUpdateProgress
from git.objects.submodule.root import (
RootModule,
RootUpdateProgress,
)
from git.repo.fun import (
find_git_dir,
touch
touch,
)
from git.test.lib import (
TestBase,
with_rw_repo
with_rw_repo,
)
from git.test.lib import with_rw_directory
from git.util import HIDE_WINDOWS_KNOWN_ERRORS
from git.util import to_native_path_linux, join_path_native
from git.util import (
to_native_path_linux,
join_path_native,
HIDE_WINDOWS_KNOWN_ERRORS,
)

import os.path as osp


Expand Down Expand Up @@ -673,6 +684,13 @@ def test_add_empty_repo(self, rwdir):
url=empty_repo_dir, no_checkout=checkout_mode and True or False)
# end for each checkout mode

@skipIf(HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
"""FIXME: ile "C:\projects\gitpython\git\cmd.py", line 671, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
GitCommandError: Cmd('git') failed due to: exit code(128)
cmdline: git add 1__Xava verbXXten 1_test _myfile 1_test_other_file 1_XXava-----verbXXten
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
""")
@with_rw_directory
def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
parent = git.Repo.init(osp.join(rwdir, 'parent'))
Expand Down

AltStyle によって変換されたページ (->オリジナル) /