Init submodules when initializing repository#159
Open
embs wants to merge 2 commits intogitless-vcs:masterfrom
Open
Init submodules when initializing repository#159embs wants to merge 2 commits intogitless-vcs:masterfrom
embs wants to merge 2 commits intogitless-vcs:masterfrom
Conversation
If specified remote repository (if any) does include submodules.
Contributor
Author
|
This is related to #56 |
[Build][build] failed due to AppVeyor gitignore configuration:
```
ERROR: test_clone_from_remote
(gitless.tests.test_core.TestInitFromRemote)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\gitless\gitless\tests\test_core.py", line 893, in
setUp
git.submodule('add', self.submodule_repo_path)
File "C:\Python27\lib\site-packages\pbs.py", line 456, in __call__
return RunningCommand(command_ran, process, call_args, actual_stdin)
File "C:\Python27\lib\site-packages\pbs.py", line 168, in __init__
self._handle_exit_code(self.process.wait())
File "C:\Python27\lib\site-packages\pbs.py", line 235, in
_handle_exit_code
raise get_rc_exc(rc)(self.command_ran, self._stdout, self._stderr)
ErrorReturnCode_1:
Ran: u'git submodule add
c:\\users\\appveyor\\appdata\\local\\temp\\1\\gl-remote-test-submodulest4nzk'
STDOUT:
STDERR:
The following path is ignored by one of your .gitignore files:
\users\appveyor\appdata\local\temp\1\gl-remote-test-submodulest4nzk
Use -f if you really want to add it.
```
[build]: https://ci.appveyor.com/project/spderosso/gitless/build/1.0.38/job/8jrcs6sp23n39h94
embs
commented
Dec 6, 2017
| remote_repo = core.init_repository() | ||
| remote_repo.create_branch( | ||
| REMOTE_BRANCH, remote_repo.revparse_single('HEAD')) | ||
| git.submodule('add', '-f', self.submodule_repo_path) |
Contributor
Author
There was a problem hiding this comment.
The -f tries fixing build failed due to AppVeyor gitignore configuration:
ERROR: test_clone_from_remote
(gitless.tests.test_core.TestInitFromRemote)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\gitless\gitless\tests\test_core.py", line 893, in
setUp
git.submodule('add', self.submodule_repo_path)
File "C:\Python27\lib\site-packages\pbs.py", line 456, in __call__
return RunningCommand(command_ran, process, call_args, actual_stdin)
File "C:\Python27\lib\site-packages\pbs.py", line 168, in __init__
self._handle_exit_code(self.process.wait())
File "C:\Python27\lib\site-packages\pbs.py", line 235, in
_handle_exit_code
raise get_rc_exc(rc)(self.command_ran, self._stdout, self._stderr)
ErrorReturnCode_1:
Ran: u'git submodule add
c:\\users\\appveyor\\appdata\\local\\temp\\1\\gl-remote-test-submodulest4nzk'
STDOUT:
STDERR:
The following path is ignored by one of your .gitignore files:
\users\appveyor\appdata\local\temp\1\gl-remote-test-submodulest4nzk
Use -f if you really want to add it.
Update
Still failing:
ERROR: test_clone_from_remote (gitless.tests.test_core.TestInitFromRemote)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\projects\gitless\gitless\tests\test_core.py", line 893, in setUp
git.submodule('add', '-f', self.submodule_repo_path)
File "C:\Python27\lib\site-packages\pbs.py", line 456, in __call__
return RunningCommand(command_ran, process, call_args, actual_stdin)
File "C:\Python27\lib\site-packages\pbs.py", line 168, in __init__
self._handle_exit_code(self.process.wait())
File "C:\Python27\lib\site-packages\pbs.py", line 235, in _handle_exit_code
raise get_rc_exc(rc)(self.command_ran, self._stdout, self._stderr)
ErrorReturnCode_1:
Ran: u'git submodule add -f c:\\users\\appveyor\\appdata\\local\\temp\\1\\gl-remote-test-submoduleytduoc'
STDOUT:
Adding existing repo at '\users\appveyor\appdata\local\temp\1\gl-remote-test-submoduleytduoc' to the index
STDERR:
fatal: \users\appveyor\appdata\local\temp\1\gl-remote-test-submoduleytduoc: '\users\appveyor\appdata\local\temp\1\gl-remote-test-submoduleytduoc' is outside repository
fatal: \users\appveyor\appdata\l... (230 more, please see e.stderr)
Member
There was a problem hiding this comment.
Don't you need to do the git submodule add in the original repo (after the line that does os.chdir(self.path))?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If specified remote repository (if any) does include submodules.