Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Git module refactor and new git clean files feature #2980

Closed
wants to merge 2 commits into from

Conversation

raags
Copy link

@raags raags commented Feb 7, 2016

There are three commits with each one doing the following :

  1. Simple cleanup of trailing space and minor fixes
  2. Refactored code to remove unused vars and renamed some to make them explicit. Changed the exit json structure (but still backword compatible), which I believe is easier to work with.
  3. Finally added clean_untracked and clean_ignored files option, which I had opened for discussion here : Git ability to clean untracked and ignored files #2656

I initially just wanted to add the clean files feature, but it was cumbersome to do that without making these additional changes. I've run the integration tests against these changes, and I've also added more, which I'll push to the ansible repository now.

@raags
Copy link
Author

raags commented Feb 7, 2016

The refactoring touches code from the following commits that I got from git blame, might be helpful in reviewing the changes :
raags@050a462
raags@633438b
raags@b77bf7a
raags@c6f4d43

@raags raags changed the title Refactored code to make it easier to add new clean files feature Git module refactor and new git clean files feature Feb 7, 2016
@gregdek
Copy link
Contributor

gregdek commented Feb 8, 2016

Thanks @raags for this PR. This module is maintained by the Ansible core team, so it can take a while for patches to be reviewed. Thanks for your patience.

@gregdek
Copy link
Contributor

gregdek commented Mar 29, 2016

Thanks @raags for this PR. Unfortunately, it is not mergeable in its current state due to merge conflicts. Please rebase your PR. When you are done, please comment with text 'ready_for_review' and we will put this PR back into review.

[This message brought to you by your friendly Ansibull-bot.]

@raags
Copy link
Author

raags commented Mar 31, 2016

ready_for_review

@gregdek
Copy link
Contributor

gregdek commented Mar 31, 2016

Thanks @raags for this PR. This module is maintained by the Ansible core team, so it can take a while for patches to be reviewed. Thanks for your patience.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Apr 14, 2016

Thanks @raags for this PR. Unfortunately, it is not mergeable in its current state due to merge conflicts. Please rebase your PR. When you are done, please comment with text 'ready_for_review' and we will put this PR back into review.

[This message brought to you by your friendly Ansibull-bot.]

@raags
Copy link
Author

raags commented Apr 15, 2016

ready_for_review @abadger @gregdek can someone from core team please review this?

@gregdek
Copy link
Contributor

gregdek commented Apr 15, 2016

Thanks @raags for this PR. This module is maintained by the Ansible core team, so it can take a while for patches to be reviewed. Thanks for your patience.

Core team: please review according to guidelines (http://docs.ansible.com/ansible/developing_modules.html#module-checklist) and comment with 'needs_revision' or merge as appropriate.

[This message brought to you by your friendly Ansibull-bot.]

choices: [ "yes", "no" ]
version_added: "2.1"
description:
- If C(yes), clean untracked files and directories in the repository
Copy link
Member

@bcoca bcoca Apr 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a cleaner interface is an option clean: None|ignored|untracked|all

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, that looks much cleaner, I'll make the changes.

@bcoca
Copy link
Member

bcoca commented Apr 15, 2016

there are a bunch of unrelated style changes, this is not OK as it changes attribution for no good reason.

@raags
Copy link
Author

raags commented Apr 15, 2016

@bcoca imho trailing spaces shouldn't be accepted, its sloppy. I removed dead code, and changed a non pythonic check that pep complained about. I kept it a separate commit which makes it clear its minor formatting change.

note: closed the pr by mistake, and reopened it which remoed the needs_revision tag

* clean_ignored and clean_untracked options will clean ignored
and untracked file respectively.
* Added untracked_files and ignored_files keys to the output, and
changed local_mods key to local_mod_files to keep it consistent.
@raags
Copy link
Author

raags commented Apr 24, 2016

@bcoca I've removed the formatting changes, please review.

ready_for_review

@gregdek
Copy link
Contributor

gregdek commented Apr 24, 2016

Thanks @raags for this PR. This module is maintained by the Ansible core team, so it can take a while for patches to be reviewed. Thanks for your patience.

Core team: please review according to guidelines (http://docs.ansible.com/ansible/developing_modules.html#module-checklist) and comment with 'needs_revision' or merge as appropriate.

[This message brought to you by your friendly Ansibull-bot.]

@robinro
Copy link
Contributor

robinro commented Apr 25, 2016

@raags why did you put the clean_files call after the fetch/switch_version part?
switch_version will fail if there are locally modified files and cleaning them before would be similar to force to work around that (but more specific).

Independent of when clean is run an integration test of clean in combination with a version change would be nice.

@raags
Copy link
Author

raags commented May 14, 2016

@robinro clean is for ignored and untracked files; These will not interfere with fetching or changing versions. The force option deals with what you are referring to, which will behave as it is currently.

@robinro
Copy link
Contributor

robinro commented May 14, 2016

cleaning can interfere with switch_version if the file is not tracked in the current branch, but tracked in the other branch; if cleaned first, the version switch will work without force, but break if clean is run afterwards

@gregdek
Copy link
Contributor

gregdek commented Jun 9, 2016

Thanks @raags for this PR. Unfortunately, it is not mergeable in its current state due to merge conflicts. Please rebase your PR. When you are done, please comment with text 'ready_for_review' and we will put this PR back into review.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Jun 25, 2016

@raags A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Jul 10, 2016

@raags Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If you have addressed the issues and believe it's ready for review, please comment with the text "ready_for_review". If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Jul 26, 2016

@raags A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Aug 10, 2016

@raags Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If you have addressed the issues and believe it's ready for review, please comment with the text "ready_for_review". If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Aug 26, 2016

@raags A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Sep 10, 2016

@raags Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If you have addressed the issues and believe it's ready for review, please comment with the text "ready_for_review". If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Sep 26, 2016

@raags A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Oct 11, 2016

@raags Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If you have addressed the issues and believe it's ready for review, please comment with the text "ready_for_review". If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Oct 27, 2016

@raags A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Nov 11, 2016

@raags Another friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open. If you have addressed the issues and believe it's ready for review, please comment with the text "ready_for_review". If we don't hear from you within another 14 days, we will close this pull request.

[This message brought to you by your friendly Ansibull-bot.]

@gregdek
Copy link
Contributor

gregdek commented Nov 27, 2016

@raags A friendly reminder: this pull request has been marked as needing your action. If you still believe that this PR applies, and you intend to address the issues with this PR, just let us know in the PR itself and we will keep it open pending your changes. When you do address the issues, please respond with ready_for_review in your comment, so that we can notify the maintainer.

[This message brought to you by your friendly Ansibull-bot.]

@ansibot
Copy link

ansibot commented Dec 7, 2016

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

@ansibot
Copy link

ansibot commented Apr 11, 2017

This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants