D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-07 Thread Stefan Brüns
bruns created this revision.
bruns added reviewers: Baloo, Frameworks, poboiko, ngraham.
Herald added projects: Frameworks, Baloo.
Herald added a subscriber: kde-frameworks-devel.
bruns requested review of this revision.

REVISION SUMMARY
  A directory can be added multiple times to the config by just adding a
  trailing slash to it, as the config removes any trailing slashes before
  storing it, and the `contains(path)` will not match.
  
  Normalize the path to the same format as used by the config and use it
  for both adding and removing it.
  
  While using it for removal is not necessary, it allows to use both
  variants and matches the "add" behavior, where both variants have the
  same effect.

REPOSITORY
  R293 Baloo

BRANCH
  submit

REVISION DETAIL
  https://phabricator.kde.org/D18829

AFFECTED FILES
  src/tools/balooctl/configcommand.cpp

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-07 Thread Stefan Brüns
bruns added a dependent revision: D18830: Handle folders matching substrings of 
included/excluded folders correctly.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18829

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-08 Thread Nathaniel Graham
ngraham added inline comments.

INLINE COMMENTS

> configcommand.cpp:43
> +{
> +while (path.endsWith(QLatin1Char('/'))) {
> +path.chop(1);

Does this need to be a `while`? Why not a regular old `if`? Are you trying to 
handle the case where it ends with multiple trailing slashes?

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18829

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-08 Thread Stefan Brüns
bruns marked an inline comment as done.
bruns added inline comments.

INLINE COMMENTS

> ngraham wrote in configcommand.cpp:43
> Does this need to be a `while`? Why not a regular old `if`? Are you trying to 
> handle the case where it ends with multiple trailing slashes?

Exactly

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18829

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-08 Thread Stefan Brüns
bruns marked an inline comment as done.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18829

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-11 Thread Stefan Brüns
bruns added a comment.


  Ping!

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D18829

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-11 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Whoops, forgot to accept.

REPOSITORY
  R293 Baloo

BRANCH
  submit

REVISION DETAIL
  https://phabricator.kde.org/D18829

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams


D18829: [balooctl] Normalize include/exclude pathes before using it for the config

2019-02-11 Thread Stefan Brüns
This revision was automatically updated to reflect the committed changes.
Closed by commit R293:24223306d59c: [balooctl] Normalize include/exclude pathes 
before using it for the config (authored by bruns).

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D18829?vs=51131&id=51450

REVISION DETAIL
  https://phabricator.kde.org/D18829

AFFECTED FILES
  src/tools/balooctl/configcommand.cpp

To: bruns, #baloo, #frameworks, poboiko, ngraham
Cc: kde-frameworks-devel, ashaposhnikov, michaelh, astippich, spoorun, ngraham, 
bruns, abrahams