-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
porcelain pull has trouble with submodules #505
Labels
Comments
On Wed, Mar 01, 2017 at 03:14:06AM -0800, Roel Baardman wrote:
I'm using dulwich to auto-update a piece of python.
After performing this command:
`git clone --recursive https://github.com/germandutchwindtunnels/nettools.git`
I perform:
`cd nettools
python AutoUpdate.py NewGui.pyw <user> <pass> <switch>`
In [AutoUpdate.py](https://github.com/germandutchwindtunnels/nettools/blob/master/AutoUpdate.py) I utilize porcelain like so:
`import dulwich.porcelain as porcelain #pylint: disable=import-error
import dulwich.errors #pylint: disable=import-error
...
github_url = "https://github.com/germandutchwindtunnels/nettools.git"
target_dir = "./"
...
try:
porcelain.pull(target_dir, github_url)
except dulwich.errors.NotGitRepository:
porcelain.clone(github_url, target_dir)
`
This yields an error regarding dulwich as a submodule:
`Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
Traceback (most recent call last):
File "AutoUpdate.py", line 34, in <module>
porcelain.pull(target_dir, github_url)
File "./dulwich/dulwich/porcelain.py", line 723, in pull
r.reset_index()
File "./dulwich/dulwich/repo.py", line 938, in reset_index
validate_path_element=validate_path_element)
File "./dulwich/dulwich/index.py", line 513, in build_index_from_tree
os.mkdir(full_path)
OSError: [Errno 17] File exists: './dulwich'
`
I'd like to be able to tell porcelain.pull that the existing directory is not an issue.
Fixing this specific error should be fairly easy (I'll have a look
later this week), but Dulwich currently doesn't support recursively pulling.
Jelmer
|
This very specific issue has been fixed. Support for recursively cloning/pulling a repo with submodules is a different topic. I've filed #506 about that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using dulwich to auto-update a piece of python.
After performing this command:
git clone --recursive https://github.com/germandutchwindtunnels/nettools.git
I perform:
In AutoUpdate.py I utilize porcelain like so:
This yields an error regarding dulwich as a submodule:
I'd like to be able to tell porcelain.pull that the existing directory is not an issue.
The text was updated successfully, but these errors were encountered: