Skip to content

Commit 00da96b

Browse files
committed
🐛 fix #4 where it checks out only the first repo.
1 parent c4360a0 commit 00da96b

File tree

8 files changed

+33
-18
lines changed

8 files changed

+33
-18
lines changed

CHANGELOG.rst

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
Change log
22
================================================================================
33

4-
0.0.1 - None
4+
0.0.2 - 2.10.2019
5+
--------------------------------------------------------------------------------
6+
7+
Fix
8+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9+
10+
#. `#4 <https://github.com/moremoban/gitfs2/issues/4>`_: failed to checkout more
11+
than one git repo.
12+
13+
0.0.1 - 19.08.2019
514
--------------------------------------------------------------------------------
615

716
first release

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Get a file inside a python package
2828
>>> import fs
2929
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git!/templates")
3030
>>> git_fs.readtext("_version.py.jj2")
31-
'__version__ = "0.0.1"\n__author__ = "C.W."\n'
31+
'__version__ = "0.0.2"\n__author__ = "C.W."\n'
3232
3333
3434
Get from a different branch
@@ -39,7 +39,7 @@ Get from a different branch
3939
>>> import fs
4040
>>> git_fs = fs.open_fs("git://github.com/moremobans/pypi-mobans.git?branch=master!/templates")
4141
>>> git_fs.read("_version.py.jj2")
42-
'__version__ = "0.0.1"\n__author__ = "C.W."\n'
42+
'__version__ = "0.0.2"\n__author__ = "C.W."\n'
4343
4444
4545
Checkout submodules recursively

changelog.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: gitfs2
22
organisation: moremoban
33
releases:
4+
- changes:
5+
- action: Fix
6+
details:
7+
- "`#4`: failed to checkout more than one git repo."
8+
version: 0.0.2
9+
date: 2.10.2019
410
- changes:
511
- action: first release
612
details:
713
- what a feat!
814
version: 0.0.1
9-
date:
15+
date: 19.08.2019

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
copyright = ''
2121
author = 'C.W.'
2222
# The short X.Y version
23-
version = '0.0.1'
23+
version = '0.0.2'
2424
# The full version, including alpha/beta/rc tags
25-
release = '0.0.1'
25+
release = '0.0.2'
2626

2727
# -- General configuration ---------------------------------------------------
2828

gitfs2.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ organisation: "moremoban"
33
author: "C.W."
44
55
company: "moban dev team"
6-
version: "0.0.1"
7-
current_version: "0.0.1"
8-
release: "0.0.1"
6+
version: "0.0.2"
7+
current_version: "0.0.2"
8+
release: "0.0.2"
99
copyright_year: 2019
1010
license: MIT
1111
dependencies:

gitfs2/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.0.1"
1+
__version__ = "0.0.2"
22
__author__ = "C.W."

gitfs2/opener.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
class GitFSOpener(Opener):
77
protocols = ["git"]
8-
update = True
8+
update_registry = {}
99

1010
def open_fs(self, fs_url, parse_result, writeable, create, cwd):
1111
repo_name, _, dir_path = parse_result.resource.partition("/")
@@ -19,10 +19,10 @@ def open_fs(self, fs_url, parse_result, writeable, create, cwd):
1919
reference=parse_result.params.get("reference"),
2020
)
2121
local_folder = repo.git_clone(
22-
require, action_required=GitFSOpener.update
22+
require, action_required=GitFSOpener.update_registry.get(git_url, True)
2323
)
24-
if GitFSOpener.update:
25-
GitFSOpener.update = False
24+
if GitFSOpener.update_registry.get(git_url, True):
25+
GitFSOpener.update_registry[git_url] = False
2626
if parse_result.path:
2727
local_folder = local_folder + parse_result.path
2828
osfs = OSFS(root_path=local_folder)

setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
NAME = "gitfs2"
3131
AUTHOR = "C.W."
32-
VERSION = "0.0.1"
32+
VERSION = "0.0.2"
3333
3434
LICENSE = "MIT"
3535
ENTRY_POINTS = {
@@ -41,7 +41,7 @@
4141
"Python file system 2 over GitPython"
4242
)
4343
URL = "https://github.com/moremoban/gitfs2"
44-
DOWNLOAD_URL = "%s/archive/0.0.1.tar.gz" % URL
44+
DOWNLOAD_URL = "%s/archive/0.0.2.tar.gz" % URL
4545
FILES = ["README.rst", "CHANGELOG.rst"]
4646
KEYWORDS = [
4747
"python",
@@ -78,8 +78,8 @@
7878
}
7979
# You do not need to read beyond this line
8080
PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable)
81-
GS_COMMAND = ("gs gitfs2 v0.0.1 " +
82-
"Find 0.0.1 in changelog for more details")
81+
GS_COMMAND = ("gs gitfs2 v0.0.2 " +
82+
"Find 0.0.2 in changelog for more details")
8383
NO_GS_MESSAGE = ("Automatic github release is disabled. " +
8484
"Please install gease to enable it.")
8585
UPLOAD_FAILED_MSG = (

0 commit comments

Comments
 (0)