Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 77cd665

Browse files
committed
Renamed modules utils to util, and errors to exc to be more conforming to the submodules's naming conventions
1 parent 791765c commit 77cd665

22 files changed

+35
-31
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ CHANGES
1717
They may only be initialized using their binary shas, reference names or revision specs are not allowed anymore.
1818
* The .data attribute was removed from the Object type, it is only available
1919
on the Blob type.
20+
* For consistency with naming conventions used in sub-modules like gitdb, the following modules have been renamed
21+
* git.utils -> git.util
22+
* git.errors -> git.exc
23+
* git.objects.utils -> git.objects.util
2024

2125

2226
0.2 Beta 2

lib/git/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def _init_externals():
2828
from git.objects import *
2929
from git.refs import *
3030
from git.diff import *
31-
from git.errors import *
31+
from git.exc import *
3232
from git.cmd import Git
3333
from git.repo import Repo
3434
from git.remote import *
3535
from git.index import *
36-
from git.utils import (
36+
from git.util import (
3737
LockFile,
3838
BlockingLockFile,
3939
Stats

lib/git/cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

77
import os, sys
8-
from utils import *
9-
from errors import GitCommandError
8+
from util import *
9+
from exc import GitCommandError
1010

1111
from subprocess import (
1212
call,

lib/git/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import cStringIO
1414

1515
from git.odict import OrderedDict
16-
from git.utils import LockFile
16+
from git.util import LockFile
1717

1818
__all__ = ('GitConfigParser', )
1919

lib/git/diff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import re
88
from objects.blob import Blob
9-
from objects.utils import mode_str_to_int
10-
from errors import GitCommandError
9+
from objects.util import mode_str_to_int
10+
from exc import GitCommandError
1111

1212
from gitdb.util import hex_to_bin
1313

File renamed without changes.

lib/git/index/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import git.objects
3737
import git.diff as diff
3838

39-
from git.errors import (
39+
from git.exc import (
4040
GitCommandError,
4141
CheckoutError
4242
)
@@ -48,9 +48,9 @@
4848
Commit,
4949
)
5050

51-
from git.objects.utils import Serializable
51+
from git.objects.util import Serializable
5252

53-
from git.utils import (
53+
from git.util import (
5454
IndexFileSHA1Writer,
5555
LazyMixin,
5656
LockedFD,

lib/git/index/fun.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from stat import S_IFDIR
66
from cStringIO import StringIO
77

8-
from git.utils import IndexFileSHA1Writer
9-
from git.errors import UnmergedEntriesError
8+
from git.util import IndexFileSHA1Writer
9+
from git.exc import UnmergedEntriesError
1010
from git.objects.fun import (
1111
tree_to_stream,
1212
traverse_tree_recursive,

lib/git/objects/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from tree import *
99
from commit import *
1010
from submodule import *
11-
from utils import Actor
11+
from util import Actor
1212

1313
__all__ = [ name for name, obj in locals().items()
1414
if not (name.startswith('_') or inspect.ismodule(obj)) ]

lib/git/objects/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6-
from git.utils import LazyMixin, join_path_native, stream_copy
7-
from utils import get_object_type_by_name
6+
from git.util import LazyMixin, join_path_native, stream_copy
7+
from util import get_object_type_by_name
88
from gitdb.util import (
99
hex_to_bin,
1010
bin_to_hex,

0 commit comments

Comments
 (0)