| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,7 +9,8 @@ | |||
| 9 | 9 | class Submodule(object): | |
| 10 | 10 | """ | |
| 11 | 11 | A Submodule is a named reference to a Commit on another Repo. | |
| 12 | - Every Submodule instance contains a name and local and remote paths. | ||
| 12 | + Every Submodule instance contains a name, a path into the local repo, | ||
| 13 | + and a URI pointing at the remote repository. | ||
| 13 | 14 | ||
| 14 | 15 | Submodules are very close in behavior to HEAD pointer. It just sits on | |
| 15 | 16 | top of a structure, in this case, at the end of folders tree, and says | |
@@ -37,16 +38,16 @@ def __init__(self, repo=None, id=None, mode=None, name='', | |||
| 37 | 38 | Pointer to Repo object instance. | |
| 38 | 39 | 'id' | |
| 39 | 40 | Is the Sha of the commit on a remote server. This object does NOT | |
| 40 | - (usually) exist on this, current repo. | ||
| 41 | + (usually) exist in this repo. | ||
| 41 | 42 | 'mode' | |
| 42 | 43 | A black hole at this time. Trying to keep the input args | |
| 43 | - similar between Tree, Blob and Subprocess instantiation classes. | ||
| 44 | + similar between Tree, Blob and Submodule classes. | ||
| 44 | 45 | 'name' | |
| 45 | 46 | This is just the last segment in the submodule's full local path. | |
| 46 | 47 | It's the name of the actual folder to which a submodule is tied. | |
| 47 | 48 | 'mode' | |
| 48 | 49 | A black hole at this time. Trying to keep the input args | |
| 49 | - similar between Tree, Blob and Subprocess instantiation classes. | ||
| 50 | + similar between Tree, Blob and Submodule classes. | ||
| 50 | 51 | 'commit_context' | |
| 51 | 52 | A string with ID of the commit that was the root for the tree | |
| 52 | 53 | structure that lead us to this folder (Tree object) that contains | |
@@ -57,9 +58,9 @@ def __init__(self, repo=None, id=None, mode=None, name='', | |||
| 57 | 58 | the parent folders we passed on the way from root of the commit to | |
| 58 | 59 | this point in the folder tree. | |
| 59 | 60 | Submodules in the .gitmodules are referenced by their full path | |
| 60 | - and contents of this argument are used to retrieve the URI of the | ||
| 61 | + and the contents of this argument is used to retrieve the URI of the | ||
| 61 | 62 | remote repo tied to this full local path. | |
| 62 | - Example: "/lib/vendor/vendors_repoA" | ||
| 63 | + Example: "lib/vendor/vendors_repoA" | ||
| 63 | 64 | """ | |
| 64 | 65 | self.repo = repo | |
| 65 | 66 | self.id = id | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,9 +8,6 @@ | |||
| 8 | 8 | import os.path | |
| 9 | 9 | import sys | |
| 10 | 10 | ||
| 11 | - execpath = os.getcwd() | ||
| 12 | - sys.path.append(os.path.join(execpath, 'gitpython\lib')) | ||
| 13 | - | ||
| 14 | 11 | import unittest | |
| 15 | 12 | import tempfile | |
| 16 | 13 | import shutil | |
@@ -57,9 +54,3 @@ def test_submodule_attributes(self): | |||
| 57 | 54 | self.assertEqual(t_s2.url, 'git://gitorious.org/git_http_backend_py/git_http_backend_py.git') | |
| 58 | 55 | self.assertEqual(tb_s2.url, 'git://gitorious.org/git_http_backend_py/git_http_backend_py.git') | |
| 59 | 56 | ||
| 60 | - if __name__ == "__main__": | ||
| 61 | - unittest.TextTestRunner(verbosity=2).run( | ||
| 62 | - unittest.TestSuite([ | ||
| 63 | - unittest.TestLoader().loadTestsFromTestCase(TestSubmodule), | ||
| 64 | - ]) | ||
| 65 | - ) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments