Re-instate ability to provide multiple revs eg diffuse -r v1 -r v2 file#248
Re-instate ability to provide multiple revs eg diffuse -r v1 -r v2 file#248bhepple wants to merge 2 commits intoMightyCreak:mainfrom
Conversation
|
Wow! Is that all the changes it takes? The ability to have multiple -t options disappeared at the same time, any possibility it is as easy to restore? I'll have to figure out how to test this PR! |
src/diffuse/main.py
Outdated
| if 'revision' in options: | ||
| # specified revision | ||
| revs.append((options['revision'], encoding)) | ||
| print(options['revision']) |
|
@bhepple I am really looking forward for this to be merged. Just as @GregLawson mentioned, multiple related issues were introduced at the same time (#213, #214), does your solution work for them as well / could it be easily adjusted? So far the suggested solution was to go back with the old option parser: #214 (comment) |
|
It's not going to be that simple, I think. The --tab/--separate options are of type G_OPTION_ARG_NONE rather than G_OPTION_ARG_STRING - I got lucky with changing the --revision option to G_OPTION_ARG_STRING_ARRAY and found that the processing was already in place for it. While I'm no expert on processing Gtk.Application options, it seems it processes all options first and then all the command line arguments quite separately. I think the old code processed them together and was able to that smart thing you want - so yeah, maybe going back to the old code or equivalent might be the only way. |
fix for #246