1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
phorge-phorge/src/applications/repository
epriestley f7a1feea38 Begin making change parsers testable
Summary:
Ref T4327. There are a bunch of other probably-related tasks too, some linked there.

We have some rare/unusual bugs in the change parsers, mostly in Subversion, but it's terrifying to touch them because they're complicated and fragile and have no test coverage.

To fix this stuff, I want to make them more testable. In particular, they basically end with this big INSERT right now. Instead, I'm going to make them return objects representing the data to be inserted, then have the common infrastructure do the insert. This gives us two benefits:

  - Reduced code duplication on the insert;
  - we can stop before the insert and have unit tests examine the objects.

This swaps the Git parser over, but doesn't swap the hg/svn parsers yet. I'll do those separately, the SVN one looks a bit tricky.

Test Plan:
  - Used `scripts/repository/reparse.php` to reparse a Git commit, with `--trace`. Verified it looked the same as before and the SQL that was executed seemed reasonable.
  - Did the same for `hg` / `svn` commits, to make sure I didn't derp anything. These aren't expected to do anything differently.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4327

Differential Revision: https://secure.phabricator.com/D7980
2014-01-20 13:12:44 -08:00
..
application
conduit Migrate repositories to use Passphrase for credential management 2013-11-22 15:23:33 -08:00
constants
controller Replace some hsprintf() by phutil_tag() 2013-11-11 09:23:23 -08:00
daemon Reduce parse latency for changes pushed to hosted repositories 2014-01-17 16:09:51 -08:00
data Begin making change parsers testable 2014-01-20 13:12:44 -08:00
editor Allow repositories to be associated with projects 2014-01-03 12:24:09 -08:00
engine Reduce parse latency for changes pushed to hosted repositories 2014-01-17 16:09:51 -08:00
management Move more discovery responsibilities into DiscoveryEngine 2014-01-17 16:09:24 -08:00
phid Remove many redundant implementations of canLoadNamedObject() 2013-12-18 12:00:01 -08:00
query Introduce ref cursors for repository parsing 2014-01-17 11:48:53 -08:00
response Accept and route VCS HTTP requests 2013-10-29 15:32:40 -07:00
search
storage Remove all the multi-pass autoclose-branch separate-cache / seenOnBranches junk 2014-01-17 11:48:53 -08:00
worker Begin making change parsers testable 2014-01-20 13:12:44 -08:00
PhabricatorRepositoryConfigOptions.php Raise a setup warning for missing or invalid local repository directory 2013-10-30 13:07:09 -07:00