Skip to content
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

Intelligently handle git #3

Closed
epall opened this issue Jan 26, 2011 · 14 comments
Closed

Intelligently handle git #3

epall opened this issue Jan 26, 2011 · 14 comments

Comments

@epall
Copy link
Owner

epall commented Jan 26, 2011

Both my local and remote copies are clones of the same git repo. If drip could intelligently make use of that, and make it easier for me to keep two git repo's in line, it would be awesome.

@jfeldstein
Copy link

The flow I've found that works is to commit and push on the local end, then git reset --hard HEAD followed by git pull origin branchname on the remote

@epall
Copy link
Owner Author

epall commented Jan 27, 2011

Yep, that's usually what I do, too

@epall
Copy link
Owner Author

epall commented Jan 30, 2011

I think I have an alternative, better solution with bfaf9f4. There really shouldn't be a git repo on the remote host. Instead, the remote state should look just like the local state, which we can accomplish with rsync at start.

@jfeldstein
Copy link

Ok. I've never used rsync before. How do I set this up?

@epall
Copy link
Owner Author

epall commented Feb 9, 2011

rsync comes with OSX, so all you need to do is git pull + pip install .

When you run drip now, choose either -f to get the old behavior or --sync to sync the local copy up to the remote host, overwriting everything and DELETING any files that aren't found in the local copy.

@jfeldstein
Copy link

Very interesting. Should be usefull, I just have to figure out the details for my particular setup. Thanks.

@jfeldstein
Copy link

I installed pip, and then ran pip install setup.py and pip install dripbox.py. Both told me:

Jeezbook|dripbox: pip install dripbox.py   
Downloading/unpacking dripbox.py
Could not find any downloads that satisfy the requirement dripbox.py
No distributions at all found for dripbox.py
Storing complete log in /Users/Jordan/.pip/pi

And that log says:

------------------------------------------------------------
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/pip run on Wed Feb  9 11:03:53 2011
Downloading/unpacking dripbox.py
  Getting page http://pypi.python.org/simple/dripbox.py
  Could not fetch URL http://pypi.python.org/simple/dripbox.py: HTTP Error 404: Not Found (dripbox.py does not have any releases)
  Will skip URL http://pypi.python.org/simple/dripbox.py when looking for download links for dripbox.py
  Getting page http://pypi.python.org/simple/
  URLs to search for versions for dripbox.py:
  * http://pypi.python.org/simple/dripbox.py/
  Getting page http://pypi.python.org/simple/dripbox.py/
  Could not fetch URL http://pypi.python.org/simple/dripbox.py/: HTTP Error 404: Not Found (dripbox.py does not have any releases)
  Will skip URL http://pypi.python.org/simple/dripbox.py/ when looking for download links for dripbox.py
  Could not find any downloads that satisfy the requirement dripbox.py
No distributions at all found for dripbox.py
Exception information:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip/basecommand.py", line 124, in main
    self.run(options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip/commands/install.py", line 178, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip/req.py", line 896, in prepare_files
    url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip/index.py", line 141, in find_requirement
    raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for dripbox.py

I've never used pip before (I stick to macports / homebrew), am I doing something wrong?

@epall
Copy link
Owner Author

epall commented Feb 9, 2011

Forget about pip. Just do "python setup.py install"

@jfeldstein
Copy link

New error while connecting:

Jeezbook|local_code_stash: drip jordan@idev.com:local/trunk
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/Crypto/Util/randpool.py:40: RandomPool_DeprecationWarning: This application uses RandomPool, which is BROKEN in older releases.  See http://www.pycrypto.org/randpool-broken
  RandomPool_DeprecationWarning)
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/drip", line 56, in <module>
    dripbox.rsync(remote, host, args.remote_port, args.sync)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dripbox.py", line 58, in rsync
    port = _get_ssh_config_port(host) or 22
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dripbox.py", line 48, in _get_ssh_config_port
    with open(SSH_CONFIG, 'r') as cfile:
IOError: [Errno 2] No such file or directory: '/Users/Jordan/.ssh/config'

@jfeldstein
Copy link

I rolled back to 1b37595 which put me before the other ssh changes, it works now. I've never seen an ~/.ssh/config file used before, not sure what goes in one.

@brainsik
Copy link
Contributor

Fixed SSH config failure — SHA: 6fb9f08

@epall
Copy link
Owner Author

epall commented Feb 19, 2011

jfeldstein: can you confirm that brainsik has fixed this issue for you?

@jfeldstein
Copy link

Fixed.

@epall
Copy link
Owner Author

epall commented Feb 22, 2011

Great!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants