Made the editor cmd support a revision argument
Created by: erezeshkol
This resolves https://github.com/sourcegraph/sourcegraph/issues/952. The tests show the desired behaviour. Basically, if a revision is passed, it will be used, otherwise, the branch name will be used (if both are passed, revision takes priority).
I've never seen or written Go code before so writing the tests was a bit of trial-and-error. cmd/frontend/internal/app/mocks.go is a duplicate of cmd/frontend/backend/mocks.go, with some things I didn't need removed. Duplication is bad, but I wasn't sure how to get rid of it, since it seems like I can't use the testContext from the backend package in the app package. If there's a solution to this, please let me know :)
@KattMingMing after this is shipped, it unblocks https://github.com/sourcegraph/sourcegraph-jetbrains/issues/5. Afterwards, we just need to figure out the repo url mapping, and my plugin can be assimilated into yours.