Git Product home page Git Product logo

gitsync's People

Contributors

centerorbit avatar jachin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitsync's Issues

less chatty

There's too much output be default. We should make it less chatty with the ability to see more information optionally.

add setup.py

Add a setup.py that will take care of the install. Look at gacli for an example for how to set that up so it can run from a virtualenv.

Fails if local directory already exsits

If the directory specified in the local_path of the config is already there, git syn complains about a missing repository.

fatal: Not a git repository (or any of the parent directories): .git

It should give a more helpful error message, and ideally, it would use the directory anyway as long as it was empty and complain if it wasn't.

File system monitoring needs to stop on pulls

When files get pulled down the file system monitoring triggers syncs for everyone. When it needs to to a pull it should turn off the file system monitoring and then do that. Then maybe do a check after the pull to make sure nothing has chanced in the mean time.

Exception occurs if local path is not case mindful

Example:
If local path in yaml file reads:

local_path: /Users/andy/Files/folder_to_sync

But the actual directory structure exists as:

Users -> andy -> files -> folder_to_sync

GitSync will start fine, and I think even perform the initial sync. But once a filesystem change event occures, this exception is thrown. My guess is that fsevents.py discriminates against case insensitivity, whereas other libraries and tools in use do not.

The following is the error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 73, in run
    loop(self)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 166, in __call__
    snapshot = self.snapshots[path]
KeyError: '/Users/andy/files/folder_to_sync/some_sub_folder_that_had_change'

keep talking

If a sync fails do not just die.

Instead say the sync failed and try again the next time a sync is triggered.

More Dynamic Configuration Files

Allow configuration files to inherit from each other, so a config file can specify a parent, then just overwrite the settings it needs to. This would be really handy for all the "ignore" stuff.

"Connection reset by peer" in sync after long wait

Do any of you get this after having it not sync for awhile?

[[email protected]] Executing task 'remote_has_modified_files'
No handlers could be found for logger "paramiko.transport"
sync failed.
<class 'socket.error'>
(54, 'Connection reset by peer')
[Errno 54] Connection reset by peer
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 73, in run
loop(self)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fsevents.py", line 218, in __call

self.callback(event)
File "/usr/bin/git_sync", line 391, in callback
if run_remote_has_modified_files():
File "/usr/bin/git_sync", line 333, in run_remote_has_modified_files
remote_path=remote_path
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/tasks.py", line 368, in execute
multiprocessing
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/tasks.py", line 264, in _execute
return task.run(_args, *_kwargs)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/tasks.py", line 171, in run
return self.wrapped(_args, *_kwargs)
File "/usr/bin/git_sync", line 91, in remote_has_modified_files
git_status_output = run("git status --porcelain .")
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/network.py", line 578, in host_prompting_wrapper
return func(_args, *_kwargs)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/operations.py", line 1042, in run
shell_escape=shell_escape)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/operations.py", line 909, in _run_command
channel=default_channel(), command=wrapped_command, pty=pty,
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/state.py", line 388, in default_channel
chan = _open_session()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fabric/state.py", line 380, in _open_session
return connections[env.host_string].get_transport().open_session()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/transport.py", line 662, in open_session
return self.open_channel('session')
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/paramiko/transport.py", line 764, in open_channel
raise e
error: [Errno 54] Connection reset by peer

support different notification system

GitSync should support different notification systems depending on what operating system it's on and what is available. This should also be configurable via project config files (and a global config file).

Initial sync aborts if permissions aren't set up properly on the remote server

If the remote file "file.png" doesn't have the correct permissions, the following error happens on the initial sync:

[[email protected]] Executing task 'initial_sync'
[[email protected]] Setting up /remote/dir/
[[email protected]] The git repo already exist: /remote/dir/.git
[localhost] local: git clone ssh://example.com/remote/dir/ /local/dir/
Cloning into '/local/dir'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
[localhost] local: git branch branch
[localhost] local: git checkout branch
Switched to branch 'branch'
[[email protected]]  /remote/dir/ (remote) has uncommitted changes.
[[email protected]] run: git add .
[[email protected]] out: error: open("file.png"): Permission denied
[[email protected]] out: error: unable to index file file.png
[[email protected]] out: fatal: adding files failed
[[email protected]] out: 


Fatal error: run() received nonzero return code 128 while executing!

Requested: git add .
Executed: /bin/bash -l -c "cd /remote/dir/ && git add ."

Aborting.

To get the initial sync to work again (after fixing the permissions issue), you need to delete both the local directory, and the ".git" directory from the remote server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.