-
Notifications
You must be signed in to change notification settings - Fork 15
Delete patched elements, when deleted from srcd #316
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
Open
dpordomingo
wants to merge
2
commits into
src-d:master
Choose a base branch
from
dpordomingo:watcher-ondelete
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
smacker
reviewed
Oct 29, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it handle rename/move correctly?
I'll add later some logs of the different events from the different watchers. |
Either using
$ touch extra.less # events from inotify: srcd/superset/assets/stylesheets/less/ CREATE extra.less srcd/superset/assets/stylesheets/less/ MODIFY extra.less # events from fswatch: srcd/superset/assets/stylesheets/less/extra.less Created srcd/superset/assets/stylesheets/less/extra.less Updated # actions: [modified]: srcd/superset/assets/stylesheets/less/extra.less cp -r srcd/* superset/ [modified]: srcd/superset/assets/stylesheets/less/extra.less cp -r srcd/* superset/ $ mkdir component # events from inotify: srcd/superset/assets/stylesheets/less/ CREATE,ISDIR component # events from fswatch: srcd/superset/assets/stylesheets/less/component Created # actions: [modified]: srcd/superset/assets/stylesheets/less/component cp -r srcd/* superset/ $ mv extra.less component/ # events from inotify: srcd/superset/assets/stylesheets/less/ MOVED_FROM extra.less srcd/superset/assets/stylesheets/less/component/ MOVED_TO extra.less # events from fswatch: srcd/superset/assets/stylesheets/less/extra.less Removed MovedFrom srcd/superset/assets/stylesheets/less/component/extra.less Created MovedTo # actions: [deleted]: srcd/superset/assets/stylesheets/less/extra.less rm -rf superset/superset/assets/stylesheets/less/extra.less [modified]: srcd/superset/assets/stylesheets/less/component/extra.less cp -r srcd/* superset/ $ mv component/extra.less component/component.less # events from inotify: srcd/superset/assets/stylesheets/less/component/ MOVED_FROM extra.less srcd/superset/assets/stylesheets/less/component/ MOVED_TO component.less # events from fswatch: srcd/superset/assets/stylesheets/less/component/extra.less Removed MovedFrom srcd/superset/assets/stylesheets/less/component/component.less Created MovedTo # actions: [deleted]: srcd/superset/assets/stylesheets/less/component/extra.less rm -rf superset/superset/assets/stylesheets/less/component/extra.less [modified]: srcd/superset/assets/stylesheets/less/component/component.less cp -r srcd/* superset/ $ rm component/extra-to-delete.less # events from inotify: srcd/superset/assets/stylesheets/less/component/ DELETE extra-to-delete.less # events from fswatch: srcd/superset/assets/stylesheets/less/component/extra-to-delete.less Removed # actions: [deleted]: srcd/superset/assets/stylesheets/less/component/extra-to-delete.less rm -rf superset/superset/assets/stylesheets/less/component/extra-to-delete.less $ rm -rf component/ # events from inotify: srcd/superset/assets/stylesheets/less/component/ DELETE component.less srcd/superset/assets/stylesheets/less/ DELETE,ISDIR component # events from fswatch: srcd/superset/assets/stylesheets/less/component/component.less Removed srcd/superset/assets/stylesheets/less/component Removed # actions: [deleted]: srcd/superset/assets/stylesheets/less/component/component.less rm -rf superset/superset/assets/stylesheets/less/component/component.less [deleted]: srcd/superset/assets/stylesheets/less/component rm -rf superset/superset/assets/stylesheets/less/component |
Handle create, modify, move, rename and delete events. Signed-off-by: David Pordomingo <[email protected]>
0809806
to
6e10870
Compare
It copies the modified 'docker-compose.override.yml' into '~/.sourced/compose-files/__active__/docker-compose.override.yml' Signed-off-by: David Pordomingo <[email protected]>
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.
fix #225
blocks #320
When in development it is used
make dev-prepare
, the content ofsrcd
is copied intosourced
and a watcher is coping it again every time one file fromsrcd
is updated.Now:
docker-compose.override.yml
from~/.sourced/compose-files/__active__
whensrcd/contrib/docker/docker-compose.override.yml
changes.