Movatterモバイル変換


[0]ホーム

URL:


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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Byron merged 14 commits intogitpython-developers:masterfromankostis:cygwin
Oct 22, 2016
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
ba7c2a0
appveyor, #533: enable CYGWIN TCs without failing
ankostisOct 13, 2016
e6e23ed
cygwin, #533: Try to make it work with Cygwin's Git.
ankostisOct 13, 2016
0bce7cc
cygwin, #533: FIX daemon launching
ankostisOct 14, 2016
57d0537
cygwin, #533: Polish also --git-separate-dir
ankostisOct 14, 2016
3b1cfcc
cygwin, #533: Allow '/cygdrive/c/' paths on repo init
ankostisOct 14, 2016
a2d248b
cygwin, #533: polish abs-paths in `git add` commands
ankostisOct 14, 2016
0210e39
src: import os.path as osp
ankostisOct 15, 2016
b02662d
src: reduce needless deps to `gitdb.util`
ankostisOct 15, 2016
4486bcb
ci, deps: no PY26, ddt>=1.1.1, CIs `pip install test-requirements`
ankostisOct 15, 2016
b2efa1b
cygwin, #533: FIX submodules detection (~10TCs fixed)
ankostisOct 16, 2016
ec731f4
Merge with #532, fix unicode filenames with escapesurogates
ankostisOct 16, 2016
5962373
cygwin, appveyor, #533: Enable actual failures, hide certain 2+2 cases
ankostisOct 16, 2016
08e0d5f
helper: minor fix prefix of temp-dirs
ankostisOct 17, 2016
cc77e6b
tc-helper: fix minor contexlib abuse
ankostisOct 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
43 changes: 24 additions & 19 deletions.appveyor.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,18 +21,17 @@ environment:
IS_CONDA: "yes"
GIT_PATH: "%GIT_DAEMON_PATH%"

# ## Cygwin
# #
# - PYTHON: "C:\\Miniconda-x64"
# PYTHON_VERSION: "2.7"
# IS_CONDA: "yes"
# GIT_PATH: "%CYGWIN_GIT_PATH%"
# - PYTHON: "C:\\Python34-x64"
# PYTHON_VERSION: "3.4"
# GIT_PATH: "%CYGWIN_GIT_PATH%"
# - PYTHON: "C:\\Python35-x64"
# PYTHON_VERSION: "3.5"
# GIT_PATH: "%CYGWIN64_GIT_PATH%"
## Cygwin
#
- PYTHON: "C:\\Miniconda-x64"
PYTHON_VERSION: "2.7"
IS_CONDA: "yes"
IS_CYGWIN: "yes"
GIT_PATH: "%CYGWIN_GIT_PATH%"
- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5"
GIT_PATH: "%CYGWIN64_GIT_PATH%"
IS_CYGWIN: "yes"


install:
Expand All@@ -48,14 +47,12 @@ install:
python --version
python -c "import struct; print(struct.calcsize('P') * 8)"

- IF "%IS_CONDA%"=="yes" (
- IF "%IS_CONDA%" =="yes" (
conda info -a &
conda install --yes --quiet pip
)
- pip install nose ddt wheel codecov
- IF "%PYTHON_VERSION%"=="2.7" (
pip install mock
)
- pip install -r test-requirements.txt
- pip install codecov

## Copied from `init-tests-after-clone.sh`.
#
Expand All@@ -79,7 +76,15 @@ install:
build: false

test_script:
- IF "%PYTHON_VERSION%"=="3.5" (nosetests -v --with-coverage) ELSE (nosetests -v)
- IF "%IS_CYGWIN%" == "yes" (
nosetests -v
) ELSE (
IF "%PYTHON_VERSION%" == "3.5" (
nosetests -v --with-coverage
) ELSE (
nosetests -v
)
)

on_success:
- IF "%PYTHON_VERSION%"=="3.5" (codecov)
- IF "%PYTHON_VERSION%" =="3.5" IF NOT "%IS_CYGWIN%" == "yes" (codecov)
7 changes: 2 additions & 5 deletions.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
# - "pypy" - won't work as smmap doesn't work (see gitdb/.travis.yml for details)
matrix:
allow_failures:
- python: "2.6"
git:
# a higher depth is needed for most of the tests - must be high enough to not actually be shallow
# as we clone our own repository in the process
Expand All@@ -17,7 +13,8 @@ install:
- python --version; git --version
- git submodule update --init --recursive
- git fetch --tags
- pip install codecov flake8 ddt sphinx
- pip install -r test-requirements.txt
- pip install codecov sphinx

# generate some reflog as git-python tests need it (in master)
- ./init-tests-after-clone.sh
Expand Down
7 changes: 5 additions & 2 deletionsgit/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,9 +5,12 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
# flake8: noqa
#@PydevCodeAnalysisIgnore
import inspect
import os
import sys
import inspect

import os.path as osp


__version__ = 'git'

Expand All@@ -16,7 +19,7 @@
def _init_externals():
"""Initialize external projects by putting them into the path"""
if __version__ == 'git':
sys.path.insert(0,os.path.join(os.path.dirname(__file__), 'ext', 'gitdb'))
sys.path.insert(0,osp.join(osp.dirname(__file__), 'ext', 'gitdb'))

try:
import gitdb
Expand Down
23 changes: 21 additions & 2 deletionsgit/cmd.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,6 +31,7 @@
)
from git.exc import CommandError
from git.odict import OrderedDict
from git.util import is_cygwin_git, cygpath

from .exc import (
GitCommandError,
Expand DownExpand Up@@ -191,8 +192,26 @@ def __setstate__(self, d):
USE_SHELL = False

@classmethod
def polish_url(cls, url):
return url.replace("\\\\", "\\").replace("\\", "/")
def is_cygwin(cls):
return is_cygwin_git(cls.GIT_PYTHON_GIT_EXECUTABLE)

@classmethod
def polish_url(cls, url, is_cygwin=None):
if is_cygwin is None:
is_cygwin = cls.is_cygwin()

if is_cygwin:
url = cygpath(url)
else:
"""Remove any backslahes from urls to be written in config files.

Windows might create config-files containing paths with backslashed,
but git stops liking them as it will escape the backslashes.
Hence we undo the escaping just to be sure.
"""
url = url.replace("\\\\", "\\").replace("\\", "/")

return url

class AutoInterrupt(object):
"""Kill/Interrupt the stored process instance once this instance goes out of scope. It is
Expand Down
36 changes: 20 additions & 16 deletionsgit/config.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,21 +6,13 @@
"""Module containing module parser implementation able to properly read and write
configuration files"""

import re
try:
import ConfigParser as cp
except ImportError:
# PY3
import configparser as cp
import abc
from functools import wraps
import inspect
import logging
import abc
import os
import re

from functools import wraps

from git.odict import OrderedDict
from git.util import LockFile
from git.compat import (
string_types,
FileType,
Expand All@@ -29,6 +21,18 @@
with_metaclass,
PY3
)
from git.odict import OrderedDict
from git.util import LockFile

import os.path as osp


try:
import ConfigParser as cp
except ImportError:
# PY3
import configparser as cp


__all__ = ('GitConfigParser', 'SectionConstraint')

Expand DownExpand Up@@ -408,15 +412,15 @@ def read(self):
if self._has_includes():
for _, include_path in self.items('include'):
if include_path.startswith('~'):
include_path =os.path.expanduser(include_path)
if notos.path.isabs(include_path):
include_path =osp.expanduser(include_path)
if notosp.isabs(include_path):
if not file_ok:
continue
# end ignore relative paths if we don't know the configuration file path
assertos.path.isabs(file_path), "Need absolute paths to be sure our cycle checks will work"
include_path =os.path.join(os.path.dirname(file_path), include_path)
assertosp.isabs(file_path), "Need absolute paths to be sure our cycle checks will work"
include_path =osp.join(osp.dirname(file_path), include_path)
# end make include path absolute
include_path =os.path.normpath(include_path)
include_path =osp.normpath(include_path)
if include_path in seen or not os.access(include_path, os.R_OK):
continue
seen.add(include_path)
Expand Down
5 changes: 1 addition & 4 deletionsgit/db.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
"""Module with our own gitdb implementation - it uses the git command"""
from git.util import bin_to_hex, hex_to_bin
from gitdb.base import (
OInfo,
OStream
)
from gitdb.util import (
bin_to_hex,
hex_to_bin
)
from gitdb.db import GitDB # @UnusedImport
from gitdb.db import LooseObjectDB

Expand Down
13 changes: 6 additions & 7 deletionsgit/diff.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,18 +5,17 @@
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import re

from gitdb.util import hex_to_bin
from git.cmd import handle_process_output
from git.compat import (
defenc,
PY3
)
from git.util import finalize_process, hex_to_bin

from .compat import binary_type
from .objects.blob import Blob
from .objects.util import mode_str_to_int

from git.compat import (
defenc,
PY3
)
from git.cmd import handle_process_output
from git.util import finalize_process

__all__ = ('Diffable', 'DiffIndex', 'Diff', 'NULL_TREE')

Expand Down
2 changes: 1 addition & 1 deletiongit/ext/gitdb
Open in desktop
Loading

[8]ページ先頭

©2009-2025 Movatter.jp