Edited the MercurialBackend to support the repo defined in .hg/hgrc
Updated 10 months ago
| apollo13 | Reviewers | ||
| reviewboard | |||
| None | Review Board SVN | ||
Edited the MercurialBackend to support the repo defined in .hg/hgrc
Posted 10 months, 3 weeks ago (February 19th, 2008, 10:57 a.m.)
Oh, I can see the usefulness of the patch for your use case, but it, as is, would make post-review useless for my use case. Where: your use case = "The registered mercurial repository on ReviewBoard is the default 'remote' path" my use case = "The registered mercurial repository on ReviewBoard is the *local* path of the repository where post-review is being running (as a commit hook)" I would say that both use cases are valid. A solution that comes to my mind would be to change the line commented below to fall-back to the previous behaviour. So it would return the local path when no default path is found on hgrc. Another solution would be selecting the desired behaviour using a command line argument. I would prefer the later, as it would respect the principle of least surprise. [An extra feature would be to validate the repository path, using /api/json/repositories/ to retrieve the paths registered on ReviewBoard]
Posted 10 months, 3 weeks ago (February 21st, 2008, 5:06 p.m.)
[I do not know if it is OK for third-party people (that is, those who are not core developers) to do reviews here. If it is considered impolite or impractical, please say so and forgive me.] There are small problems on the updated patch, as commented below. But I would like to insist that a command line switch to let the user specify if he wants to use the path of the local or remote depository would be better, because random changes on hgrc would not change the behaviour of post-review. And people using a default "remote" repository could still use the local path (that is not my use case, but it seems possible).