1 |
On Mon, 6 Jul 2015 11:28:36 -0700 |
2 |
Brian Dolbec <dolsen@g.o> wrote: |
3 |
|
4 |
|
5 |
> hmm, this is the cvs module's module_spec, I was thinking we might be |
6 |
> able to add the module_specific_opts there after the validate_config |
7 |
> definition, like so: |
8 |
> |
9 |
> module_spec = { |
10 |
> 'name': 'cvs', |
11 |
> 'description': doc, |
12 |
> 'provides':{ |
13 |
> 'cvs-module': { |
14 |
> 'name': "cvs", |
15 |
> 'class': "CVSSync", |
16 |
> 'description': doc, |
17 |
> 'functions': ['sync', 'new', 'exists'], |
18 |
> 'func_desc': { |
19 |
> 'sync': 'Performs a cvs up on the |
20 |
> repository', 'new': 'Creates the new repository at the specified |
21 |
> location', 'exists': 'Returns a boolean of whether the specified dir |
22 |
> ' + 'exists and is a valid CVS |
23 |
> repository', }, |
24 |
> 'validate_config': CheckCVSConfig, |
25 |
> 'module_specific_opts': None, |
26 |
> } |
27 |
> } |
28 |
> } |
29 |
> |
30 |
> |
31 |
> Also, the config validation code should probably be exteneded for any |
32 |
> module specific options as well. |
33 |
> |
34 |
> I'll look into whether that will work. |
35 |
> I'll add your patch and see about moving things around. |
36 |
> |
37 |
|
38 |
|
39 |
OK, I think I got it, I haven't tested your extra-options field, but a |
40 |
normal rsync operation worked for me. I simplified the naming some, |
41 |
the "sync_cvs_repo" name was old and oblsolete (replaced by the |
42 |
universal "auto-sync" setting). So for rsync it is simply |
43 |
"extra-options". Also since they are being stored in a dictionary, |
44 |
there is no need to sub the - for _. |
45 |
|
46 |
I think this should work out well. Now it should be easier to add |
47 |
branch support to the git module. |
48 |
|
49 |
Try it out, see what you think. You can squash my commits back into |
50 |
yours with just a small mention of my contribution. No big deal for |
51 |
me ;) |
52 |
|
53 |
I thank you for your work on this. |
54 |
|
55 |
I've attached the 2 patches of changes. Please test and check it for |
56 |
errors (there is bound to be some) I haven't tested it thoroughly yet. |
57 |
|
58 |
|
59 |
-- |
60 |
Brian Dolbec <dolsen> |