@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add Subversion ref and content logs to pre-commit hooks

Summary: Ref T4195. SVN has no such thing as refs (I was thinking about writing a quasi-ref anyway like `HEAD: r23 -> r24`, but I'm not sure it would actually be useful). And content is very easy to build.

Test Plan: Pushed some stuff to SVN, got logs from it.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4195

Differential Revision: https://secure.phabricator.com/D7766

+16 -4
+16 -3
src/applications/diffusion/engine/DiffusionCommitHookEngine.php
··· 733 733 734 734 735 735 private function findSubversionRefUpdates() { 736 - // TODO: Implement. 736 + // Subversion doesn't have any kind of mutable ref metadata. 737 737 return array(); 738 738 } 739 739 740 740 private function findSubversionContentUpdates(array $ref_updates) { 741 - // TODO: Implement. 742 - return array(); 741 + list($youngest) = execx( 742 + 'svnlook youngest %s', 743 + $this->subversionRepository); 744 + $ref_new = (int)$youngest + 1; 745 + 746 + $ref_flags = 0; 747 + $ref_flags |= PhabricatorRepositoryPushLog::CHANGEFLAG_ADD; 748 + $ref_flags |= PhabricatorRepositoryPushLog::CHANGEFLAG_APPEND; 749 + 750 + $ref_content = $this->newPushLog() 751 + ->setRefType(PhabricatorRepositoryPushLog::REFTYPE_COMMIT) 752 + ->setRefNew($ref_new) 753 + ->setChangeFlags($ref_flags); 754 + 755 + return array($ref_content); 743 756 } 744 757 745 758
-1
src/applications/repository/storage/PhabricatorRepositoryPushLog.php
··· 16 16 const REFTYPE_BRANCH = 'branch'; 17 17 const REFTYPE_TAG = 'tag'; 18 18 const REFTYPE_BOOKMARK = 'bookmark'; 19 - const REFTYPE_SVN = 'svn'; 20 19 const REFTYPE_COMMIT = 'commit'; 21 20 22 21 const CHANGEFLAG_ADD = 1;