|
Adding in-progress files.
Created repo-hook.py, which implements the most basic of functionality of a command, on which to build.
This command also has had the code from rbtools/hook/common.py inserted in, though not much functionality is implemented
Created scmrepositoryhooks.py as a base class for all the remaining repository classes. Include basic methods which are just passed over for implementation in the subclasses
Created the gitrepositoryhooks.py sub-class, which inherits from scmrepositoryhooks.py. No implementation inside yet.
Altered setup.py to include repo-hook as a command to be part of the rbtools commands.
|
71f6f67374c30350d242432a46116d48618162e8 |
|
Added new options to repo-hook command based on the functionality in contrib\tools\git-hook-set-submitted and contrib\tools\git-hook-check-approval. Followed same default values as found in these two hook scripts.
|
9aea6c7c2b2c98ffa96bf0d67e8ab75ae06706fb |
|
Fixed a few flake8 failure, and added in standard regex flag from contrib\tools\git-hook-set-submitted\n and contrib\tools\git-hook-check-approval as an option in the repo-hook command
|
ba3b42ca15f118cc032b924a791cb9683df93414 |
|
Brought functionality from git.py over to the GitRepositoryHooks class. This may change, but this is a starting point
|
f72a4ad674c91133e896a9b70e4b70b2e183f04c |
|
Changed the wording and working of a few commands, so that the default is standard and it lexically makes sense for the user to add the option as a way to enable the function (e.g. --require-review-requests changed to dont-require-review-requests, and changed the default from True to False). As well, a few minor tab and line length errors were corrected
|
43358669072fd7988138c5f471f56eb6198324d3 |
|
This commit was an error fixing commit. Fixed some missed commas in the Options section, fixed a mispelling of store_true, fixed an error of using ! instead of not.
|
52269579029e65a75628683428951bff3fe37f18 |
|
Added option for specifying the type of repository repository being used (--repo-type).
Changed --type to be --hook-type to reduce confusion with --repo-type
Moved execute() and get_review_request_id() from repo_hook.py to scmrepositoryhooks.py, as they were not used in repo_hook.py, and only needed in SCMRepositoryHooks and its subclasses.
Other minor fixes, such as rearranging the imports and putting missing imports that were not brought over.
|
63f7658e2b9031c546a4b520fc64da6a2c703e72 |
|
Minor change, adding self variable to a class method inside SECRepositoryHooks class
Functionality brought from rbtools/hooks/common.py to rbtools/commands/repo_hook.py used to be outside the RepoHook class. These methods were brought into the RepoHook class to keep things clean.
|
55e914ec883c1fe8ae64d6737993396b298dad8c |
|
Added the common lines between /contrib/tools/git-hook-set-submitted and /contrib/tools/git-hook-check-approval to rbtools/commands/repo_hook.py in the RepoHook Command subclass as the default behaviour before hook-type specific behaviour is taken
|
85cb9226317a9d8d009789e76f0ebe8bded52396 |
|
Removed unnecessary debug code from RepoHook class and its helper classes, and cleaned up the code a little.
|
f12f498b5ff2e8b59f2830060213d51d2bdac974 |
|
Brought logic for the pre-receive and post-receive functionality from /contrib/tools/git-hook-check-approval and /contrib/tools/git-hook-set-submitted into the pre_receive() and post_receive() methods of the RepoHook class.
Also implemented minor formatting fixes, as well as implementing Warning messages if the tool is given an unsupported SCM tool as a --repo-type option (currently Git is the only SCM supported
|
e1127d83acee2368c722df258c4b85171282fbe4 |
|
Went through all flake8 errors that occured throughout the first 3 posts to ReviewBoard
and fixed them
|
005d94249b6f98b485f506ac8e949d81d7a841dd |
|
More flake8 issue fixing.
|
f0903e5262699bf86eb5f3becaf85bf4dd8495b3 |
|
Review Request #11492
Removed 'continue on next line' characters from unnecessary locations in repo-hook command. Corrected lines being too long in some files.
|
46d45e305a396de7e67664529e2fea9dfc4e6897 |
|
Altered how repo_hook command accesses SCMRepositoryHooks subclasses. Now, repo_hook will call on the correcponsing SCM client, of which each now has a repository_hooks_class class attribute. The repo_hook command can access the corresponsing SCMRepositoryHooks subclass depending on the --repo-type supplied in the command. Skeleton code for the SVNRepositoryHooks and MercurialRepositoryHooks classes have been created to make sure all functionality is working. Also changed the GitRepositoryHooks class to no longer need to be supplied a copy of the RepoHook class (incorrect idea about code layout. Review Request #11492.
|
545a2942acc05c5bed4d1d02f46d7bdc0d7109ac |
|
Fixed all current flake8 errors via local version of flake8
|
873fa7a5ff642af1291ebe1c12131d76c092e64b |
|
Minor changes, added sys.exit(1) for bad result in order for pre-receive hook to know what happened. Fixed some uncaught name spelling errors and other issues. Review Request #11492
|
b310e24a3c5cf7afb0a7f0c98cb97e83ff70b3dd |
|
Reorganized how rbtools/command/repo-hook.py and rbtools/clients/scmrepositoryhooks.py and all it's subclasses functioned. Previously, RepoHook called the functionality it needed from methods in the SCMRepositoryHooks directly. Now, depending on the hook-type passed in (pre-receive, post-receive, etc), RepoHook will call the corresponding method in the SCMRepositoryHooks subclass (e.g. SCMRepositoryHooks.pre_receive()) in order to get the stuff it needs. This is done so that the method calls will be the same, regardless of what SCM the hook is being used for.
Changed all instances of post_commit() to post_receive() in SCMRepositoryHooks class and it's subclasses. This was a typo, as post-commit hooks is not something currently planned to the repo-hook command.
Other minor refactoring of the RepoHook class, such as moving bulky if/else statements for determining the SCMRepositoryHook subclass to be grabbed into a method of its own to clean up main(). As well, moved some code that would not neccesarily be used for hooks besides post-receive and pre-receive into their respective methods, instead of keeping them in main().
Also finished testing the pre-receive hook, before and after the refactoring.
Review Request #11492
|
72eb9f5082f65cc8fba59cc346ed121964558f74 |
|
Minor tweaks to some method calls for the post-receive hook side of repo-hook. Errors found with passing too many arguments or passing arguments the incorrect way.
|
03a5a7ea1187a0ffbbae88489714fbf2f5305e15 |
|
Added tests for RepoHook command, including checking proper fetching of GitRepositoryHooks class, exit from system in case of calling 'svn', 'mercurial' or an invalid repo type for repo-type, saving of server options, properly setting regex flags, and testing for exiting when given invalid hook-type.
Removed all references to pre-commit hooks withing the RepoHook command, as this is not a currently planned functionality. Will be removing pre-commit references from everywhere else in the next commit
Review Request #11492
|
48e9df0bdda435f1312dbdfcc97092cecf1f638d |
|
Added tests for valid --hook-types, the default hook_type, default repo_type, the default values for server options, and the default and activated states of calling --require-approval, --dont-require-review-requests, and --allow-unapproved-push.
Removed all (empty) methods for pre-receive in the SCMRepositoryHooks class and it's subclasses.
Review Request #11492
|
19b303bb3ef1f48136ed87fcdedf812a6ebaa27f |
|
Adding in-progress files.
Created repo-hook.py, which implements the most basic of functionality of a command, on which to build.
This command also has had the code from rbtools/hook/common.py inserted in, though not much functionality is implemented
Created scmrepositoryhooks.py as a base class for all the remaining repository classes. Include basic methods which are just passed over for implementation in the subclasses
Created the gitrepositoryhooks.py sub-class, which inherits from scmrepositoryhooks.py. No implementation inside yet.
Altered setup.py to include repo-hook as a command to be part of the rbtools commands.
|
71f6f67374c30350d242432a46116d48618162e8 |
|
Added new options to repo-hook command based on the functionality in contrib\tools\git-hook-set-submitted and contrib\tools\git-hook-check-approval. Followed same default values as found in these two hook scripts.
|
9aea6c7c2b2c98ffa96bf0d67e8ab75ae06706fb |
|
Fixed a few flake8 failure, and added in standard regex flag from contrib\tools\git-hook-set-submitted\n and contrib\tools\git-hook-check-approval as an option in the repo-hook command
|
ba3b42ca15f118cc032b924a791cb9683df93414 |
|
Brought functionality from git.py over to the GitRepositoryHooks class. This may change, but this is a starting point
|
f72a4ad674c91133e896a9b70e4b70b2e183f04c |
|
Changed the wording and working of a few commands, so that the default is standard and it lexically makes sense for the user to add the option as a way to enable the function (e.g. --require-review-requests changed to dont-require-review-requests, and changed the default from True to False). As well, a few minor tab and line length errors were corrected
|
43358669072fd7988138c5f471f56eb6198324d3 |
|
This commit was an error fixing commit. Fixed some missed commas in the Options section, fixed a mispelling of store_true, fixed an error of using ! instead of not.
|
52269579029e65a75628683428951bff3fe37f18 |
|
Added option for specifying the type of repository repository being used (--repo-type).
Changed --type to be --hook-type to reduce confusion with --repo-type
Moved execute() and get_review_request_id() from repo_hook.py to scmrepositoryhooks.py, as they were not used in repo_hook.py, and only needed in SCMRepositoryHooks and its subclasses.
Other minor fixes, such as rearranging the imports and putting missing imports that were not brought over.
|
63f7658e2b9031c546a4b520fc64da6a2c703e72 |
|
Minor change, adding self variable to a class method inside SECRepositoryHooks class
Functionality brought from rbtools/hooks/common.py to rbtools/commands/repo_hook.py used to be outside the RepoHook class. These methods were brought into the RepoHook class to keep things clean.
|
55e914ec883c1fe8ae64d6737993396b298dad8c |
|
Added the common lines between /contrib/tools/git-hook-set-submitted and /contrib/tools/git-hook-check-approval to rbtools/commands/repo_hook.py in the RepoHook Command subclass as the default behaviour before hook-type specific behaviour is taken
|
85cb9226317a9d8d009789e76f0ebe8bded52396 |
|
Removed unnecessary debug code from RepoHook class and its helper classes, and cleaned up the code a little.
|
f12f498b5ff2e8b59f2830060213d51d2bdac974 |
|
Brought logic for the pre-receive and post-receive functionality from /contrib/tools/git-hook-check-approval and /contrib/tools/git-hook-set-submitted into the pre_receive() and post_receive() methods of the RepoHook class.
Also implemented minor formatting fixes, as well as implementing Warning messages if the tool is given an unsupported SCM tool as a --repo-type option (currently Git is the only SCM supported
|
e1127d83acee2368c722df258c4b85171282fbe4 |
|
Went through all flake8 errors that occured throughout the first 3 posts to ReviewBoard
and fixed them
|
005d94249b6f98b485f506ac8e949d81d7a841dd |
|
More flake8 issue fixing.
|
f0903e5262699bf86eb5f3becaf85bf4dd8495b3 |
|
Review Request #11492
Removed 'continue on next line' characters from unnecessary locations in repo-hook command. Corrected lines being too long in some files.
|
46d45e305a396de7e67664529e2fea9dfc4e6897 |
|
Altered how repo_hook command accesses SCMRepositoryHooks subclasses. Now, repo_hook will call on the correcponsing SCM client, of which each now has a repository_hooks_class class attribute. The repo_hook command can access the corresponsing SCMRepositoryHooks subclass depending on the --repo-type supplied in the command. Skeleton code for the SVNRepositoryHooks and MercurialRepositoryHooks classes have been created to make sure all functionality is working. Also changed the GitRepositoryHooks class to no longer need to be supplied a copy of the RepoHook class (incorrect idea about code layout. Review Request #11492.
|
545a2942acc05c5bed4d1d02f46d7bdc0d7109ac |
|
Fixed all current flake8 errors via local version of flake8
|
873fa7a5ff642af1291ebe1c12131d76c092e64b |
|
Minor changes, added sys.exit(1) for bad result in order for pre-receive hook to know what happened. Fixed some uncaught name spelling errors and other issues. Review Request #11492
|
b310e24a3c5cf7afb0a7f0c98cb97e83ff70b3dd |
|
Reorganized how rbtools/command/repo-hook.py and rbtools/clients/scmrepositoryhooks.py and all it's subclasses functioned. Previously, RepoHook called the functionality it needed from methods in the SCMRepositoryHooks directly. Now, depending on the hook-type passed in (pre-receive, post-receive, etc), RepoHook will call the corresponding method in the SCMRepositoryHooks subclass (e.g. SCMRepositoryHooks.pre_receive()) in order to get the stuff it needs. This is done so that the method calls will be the same, regardless of what SCM the hook is being used for.
Changed all instances of post_commit() to post_receive() in SCMRepositoryHooks class and it's subclasses. This was a typo, as post-commit hooks is not something currently planned to the repo-hook command.
Other minor refactoring of the RepoHook class, such as moving bulky if/else statements for determining the SCMRepositoryHook subclass to be grabbed into a method of its own to clean up main(). As well, moved some code that would not neccesarily be used for hooks besides post-receive and pre-receive into their respective methods, instead of keeping them in main().
Also finished testing the pre-receive hook, before and after the refactoring.
Review Request #11492
|
72eb9f5082f65cc8fba59cc346ed121964558f74 |
|
Minor tweaks to some method calls for the post-receive hook side of repo-hook. Errors found with passing too many arguments or passing arguments the incorrect way.
|
03a5a7ea1187a0ffbbae88489714fbf2f5305e15 |
|
Added tests for RepoHook command, including checking proper fetching of GitRepositoryHooks class, exit from system in case of calling 'svn', 'mercurial' or an invalid repo type for repo-type, saving of server options, properly setting regex flags, and testing for exiting when given invalid hook-type.
Removed all references to pre-commit hooks withing the RepoHook command, as this is not a currently planned functionality. Will be removing pre-commit references from everywhere else in the next commit
Review Request #11492
|
48e9df0bdda435f1312dbdfcc97092cecf1f638d |
|
Added tests for valid --hook-types, the default hook_type, default repo_type, the default values for server options, and the default and activated states of calling --require-approval, --dont-require-review-requests, and --allow-unapproved-push.
Removed all (empty) methods for pre-receive in the SCMRepositoryHooks class and it's subclasses.
Review Request #11492
|
19b303bb3ef1f48136ed87fcdedf812a6ebaa27f |
|
Added documentation where needed, and fixed bad/non-compliant documentation
Changed all instances of sys.exit(x) to instead by raisings of HookError, and changed testing to correspond to this change
Changed REGEX_FLAGS to be regex_flags in rbtools/commands/repo_hook.py, as it is not a constant
Removed all debugging print() statements from rbtools/commands/repo_hook.py.
Review request#11492
|
761842443c320f0f4decd5be3cb71253fe797c2b |
|
Fixed a minor flake8 error in rbtools/clients/scmrepositoryhooks.py. Review request #11492
|
b6b0454774fc12048c77f9efaf16ab7371653e12 |