From f6aa8d116eb33293c0a9d6d600eb7c32832758b9 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 19:14:33 +0100 Subject: initial set of adjustments to make (most) imports work. More to come, especially when it's about strings --- git/repo/fun.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'git/repo/fun.py') diff --git a/git/repo/fun.py b/git/repo/fun.py index b8905517..d08e5fed 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -1,5 +1,7 @@ """Package with general repository related functions""" import os +from string import digits + from gitdb.exc import BadObject from git.refs import SymbolicReference from git.objects import Object @@ -11,7 +13,7 @@ from gitdb.util import ( hex_to_bin, bin_to_hex ) -from string import digits + __all__ = ('rev_parse', 'is_git_dir', 'touch', 'read_gitfile', 'find_git_dir', 'name_to_object', 'short_to_long', 'deref_tag', 'to_commit') -- cgit v1.2.1 From ae2ff0f9d704dc776a1934f72a339da206a9fff4 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 4 Jan 2015 19:50:28 +0100 Subject: Dum brute force conversion of all types. However, StringIO really is ByteIO in most cases, and py2.7 should run but doesn't. This should be made work first. --- git/repo/fun.py | 1 + 1 file changed, 1 insertion(+) (limited to 'git/repo/fun.py') diff --git a/git/repo/fun.py b/git/repo/fun.py index d08e5fed..64b9b4a9 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -13,6 +13,7 @@ from gitdb.util import ( hex_to_bin, bin_to_hex ) +from git.compat import xrange __all__ = ('rev_parse', 'is_git_dir', 'touch', 'read_gitfile', 'find_git_dir', 'name_to_object', -- cgit v1.2.1 From 60e54133aa1105a1270f0a42e74813f75cd2dc46 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 6 Jan 2015 12:22:16 +0100 Subject: test_remote works And I have to wonder why git-daemon serves under py2.7, but really wants receive-pack to be allowed under 3.4. Maybe it's a repository override which for some reason doesn't work in py3.4 ? Maybe because the change is not flushed ? --- git/repo/fun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/repo/fun.py') diff --git a/git/repo/fun.py b/git/repo/fun.py index 64b9b4a9..ac0fa6f1 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -21,7 +21,7 @@ __all__ = ('rev_parse', 'is_git_dir', 'touch', 'read_gitfile', 'find_git_dir', ' def touch(filename): - fp = open(filename, "a") + fp = open(filename, "ab") fp.close() -- cgit v1.2.1 From a05e49d2419d65c59c65adf5cd8c05f276550e1d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 6 Jan 2015 14:05:30 +0100 Subject: test_repo works --- git/repo/fun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/repo/fun.py') diff --git a/git/repo/fun.py b/git/repo/fun.py index ac0fa6f1..233666c9 100644 --- a/git/repo/fun.py +++ b/git/repo/fun.py @@ -150,7 +150,7 @@ def to_commit(obj): def rev_parse(repo, rev): """ :return: Object at the given revision, either Commit, Tag, Tree or Blob - :param rev: git-rev-parse compatible revision specification, please see + :param rev: git-rev-parse compatible revision specification as string, please see http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html for details :note: Currently there is no access to the rev-log, rev-specs may only contain -- cgit v1.2.1