Using Git inside StaSH
I just bought Pythonista recently and I was trying to see if I could just set up a new git repo. Every time I use the git command StaSH tells me that I'm not using the right version of dulwich.
Dulwich version was (0, 12, 0). Required is (0, 9, 9, 'jsbain_fork'). Attempting to reload
Could not find correct version. Will download proper fork now
Need to download dulwich. OK to download [y/n]?
If I say yes, I still get an error saying there is no module named funky even though it's in stash's lib. Saying no also yields the same result with the funky module being missing.
I do a pip install funky and try to use git init again and I get
Still could not import dulwich.
Perhaps your network connection was unavailable.
You might also try deleting any existing dulwich versions in site-packages or elsewhere, then restarting pythonista.
initialize a new Git repository
Am I missing something?
sorry, this is my fault. i have been upgrading the fork of dulwich which is used in stash. I will try to get this fixed in the next day or so.
Thanks for the speedy reply. I'll keep a lookout in the next few days.
Hi, is there any update on this? I'm getting a similar error installing dulwich when I try to use git in StaSh.
Run updatestash, assuming you have installed the master version, which should bring in the latest changes.
This is still pretty finicky, and I wouldn't necessarily trust it for anything super important (that said, these updates, as well as the dulwich changes associated with this were made via this version of stash/git)
I probably need to write up a tutorial for best practices given the current limitations, and what to do when things go wrong. There are still a few nuts left to crack, for instance pushes do not always work when many changes have been made in one or both sides. sometimes this can be solved with a merge/commit, but other times not. for instance today i was 22 commits ahead of GH, most of which were from merging upstream changes locally, and github would nit accept the push. I had to first do a pull request within Github, then I could push the changes...
i recommend using git fetch followed by merge, rather than git pull. Somewhat less prone to getting out of sync. If you set up tracking branches, this is easy to do.
Also, currently, I have noticed that some operations require you to be at the top level of the repo... so just chdir to the top level, and use relative path names in the git commands for now. Another issue is that deleted files can result in some errors, but git checkout or reset --hard can often fix those issues.
(edit, this was merged in ywangd/master)
A few other notes... i am converting over to "standard" dulwich, but currently this still requires you to download the jsb fork. By default dulwich, gittle and funky get installed to stash/lib, but you can move these to site-packages if desired.