Skip to content

Commit

Permalink
🐛 fix #4 where it checks out only the first repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Oct 2, 2019
1 parent c4360a0 commit 00da96b
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 18 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.rst
@@ -1,7 +1,16 @@
Change log
================================================================================

0.0.1 - None
0.0.2 - 2.10.2019
--------------------------------------------------------------------------------

Fix
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. `#4 <https://github.com/moremoban/gitfs2/issues/4>`_: failed to checkout more
than one git repo.

0.0.1 - 19.08.2019
--------------------------------------------------------------------------------

first release
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -28,7 +28,7 @@ Get a file inside a python package
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git!/templates")
>>> git_fs.readtext("_version.py.jj2")
'__version__ = "0.0.1"\n__author__ = "C.W."\n'
'__version__ = "0.0.2"\n__author__ = "C.W."\n'
Get from a different branch
Expand All @@ -39,7 +39,7 @@ Get from a different branch
>>> import fs
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master!/templates")
>>> git_fs.read("_version.py.jj2")
'__version__ = "0.0.1"\n__author__ = "C.W."\n'
'__version__ = "0.0.2"\n__author__ = "C.W."\n'
Checkout submodules recursively
Expand Down
8 changes: 7 additions & 1 deletion changelog.yml
@@ -1,9 +1,15 @@
name: gitfs2
organisation: moremoban
releases:
- changes:
- action: Fix
details:
- "`#4`: failed to checkout more than one git repo."
version: 0.0.2
date: 2.10.2019
- changes:
- action: first release
details:
- what a feat!
version: 0.0.1
date:
date: 19.08.2019
4 changes: 2 additions & 2 deletions docs/source/conf.py
Expand Up @@ -20,9 +20,9 @@
copyright = ''
author = 'C.W.'
# The short X.Y version
version = '0.0.1'
version = '0.0.2'
# The full version, including alpha/beta/rc tags
release = '0.0.1'
release = '0.0.2'

# -- General configuration ---------------------------------------------------

Expand Down
6 changes: 3 additions & 3 deletions gitfs2.yml
Expand Up @@ -3,9 +3,9 @@ organisation: "moremoban"
author: "C.W."
contact: "wangc_2011@hotmail.com"
company: "moban dev team"
version: "0.0.1"
current_version: "0.0.1"
release: "0.0.1"
version: "0.0.2"
current_version: "0.0.2"
release: "0.0.2"
copyright_year: 2019
license: MIT
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion gitfs2/_version.py
@@ -1,2 +1,2 @@
__version__ = "0.0.1"
__version__ = "0.0.2"
__author__ = "C.W."
8 changes: 4 additions & 4 deletions gitfs2/opener.py
Expand Up @@ -5,7 +5,7 @@

class GitFSOpener(Opener):
protocols = ["git"]
update = True
update_registry = {}

def open_fs(self, fs_url, parse_result, writeable, create, cwd):
repo_name, _, dir_path = parse_result.resource.partition("/")
Expand All @@ -19,10 +19,10 @@ def open_fs(self, fs_url, parse_result, writeable, create, cwd):
reference=parse_result.params.get("reference"),
)
local_folder = repo.git_clone(
require, action_required=GitFSOpener.update
require, action_required=GitFSOpener.update_registry.get(git_url, True)
)
if GitFSOpener.update:
GitFSOpener.update = False
if GitFSOpener.update_registry.get(git_url, True):
GitFSOpener.update_registry[git_url] = False
if parse_result.path:
local_folder = local_folder + parse_result.path
osfs = OSFS(root_path=local_folder)
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Expand Up @@ -29,7 +29,7 @@

NAME = "gitfs2"
AUTHOR = "C.W."
VERSION = "0.0.1"
VERSION = "0.0.2"
EMAIL = "wangc_2011@hotmail.com"
LICENSE = "MIT"
ENTRY_POINTS = {
Expand All @@ -41,7 +41,7 @@
"Python file system 2 over GitPython"
)
URL = "https://github.com/moremoban/gitfs2"
DOWNLOAD_URL = "%s/archive/0.0.1.tar.gz" % URL
DOWNLOAD_URL = "%s/archive/0.0.2.tar.gz" % URL
FILES = ["README.rst", "CHANGELOG.rst"]
KEYWORDS = [
"python",
Expand Down Expand Up @@ -78,8 +78,8 @@
}
# You do not need to read beyond this line
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
GS_COMMAND = ("gs gitfs2 v0.0.1 " +
"Find 0.0.1 in changelog for more details")
GS_COMMAND = ("gs gitfs2 v0.0.2 " +
"Find 0.0.2 in changelog for more details")
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
"Please install gease to enable it.")
UPLOAD_FAILED_MSG = (
Expand Down

0 comments on commit 00da96b

Please sign in to comment.