api_mark_for_reparse fails if branch name happens to be a number
Migrated issue
Reported by: jhodgdon
The api_mark_for_reparse() function allows you to supply a branch ID or a branch name or a file name as its input.
If the branch name happens to be something like '6', it will be treated as a branch ID number instead, and the wrong branch (or no branch, if ID #6 does not exist) will be reparsed.
There are several ways this could be fixed. I think the best would be to make it explicit in the function call what you are trying to pass in instead of trying to guess.
I already have a section of a test that fails with this (found the problem while refactoring the tests on issue #1442732: Refactor the test classes). I'm going to just comment out that section of the test when I make the commit for that other issue (it's in the tests/api_queue.test file).