2

My team started using Phabricator with our SVN repository.

Ideally, everyone would follow the arc diff -> arc patch -> arc commit workflow, causing nothing to be committed without going through code review.

Our old workflow was to just commit the change and send an email for a review though, so everyone is used to just committing their changes before review. Our actual workflow is is svn commit -> arc diff -> keep committing and diffing until CR passes.

How can I stop the repository from accepting commits that didn't go through the arc diff -> arc patch -> arc commit workflow?

QuestionC
  • 10,006
  • 4
  • 26
  • 44
  • Asked and answered: http://stackoverflow.com/questions/25662723/phabricator-restrict-git-push – CEPA Apr 14 '16 at 17:54

1 Answers1

3

In the accepted answer to Phabricator restrict git push it is claimed that you can only do this if your repository is hosted by Phabricator. While it would be much easier in that case, as it can be configured through Herald, it should be possible to write a pre-commit hook for your svn repository to use conduit (or possibly arc) to check for an accepted Differential review matching the attempted commit. I belive arc will add a line to the commit message Differential Revision: <URL>, so for starters, if that is missing the commit can be rejected. Then the Differential revision from the end of the URL can be checked using the phid.lookup and differential.query to check that the status is "Approved".

Community
  • 1
  • 1
JSON
  • 4,487
  • 22
  • 26