Page MenuHomePhabricator

Branch/Tags custom fields not populated for SVN commits
Closed, WontfixPublic

Description

I have following SVN repository structure:

projects/
-- project-a
---- trunk
---- branches
---- tags
-- project-b
---- trunk
---- branches
---- tags
-- project-c
---- trunk
---- branches
---- tags

Then I create 3 repositories in Phabricator which only get data from sub-path (e.g. /projects/project-a).

I'm not sure why tag/branch of a commit isn't properly detected.

Event Timeline

aik099 raised the priority of this task from to Needs Triage.
aik099 updated the task description. (Show Details)
aik099 added a project: Diffusion.
aik099 added a subscriber: aik099.
epriestley claimed this task.

We don't plan to support inferring branches and tags from directory structure conventions in SVN.

In Git and Mercurial, where we support branches and tags, these are first class concepts built into the VCS and we can run commands to unambiguously determine the branches and tags of a commit in any arbitrary repository. This is not true of SVN, where branching and tagging is purely based on naming conventions that vary from repository to repository.

Maybe you can do as Atlassian FishEye did: for each repository defined a regex to determine trunk/branch/tag (3 separate regexps). Then we can match path of 1st file in commit (hopefully nobody will do cross-branch/tag commits) and detect branch/tag.

@epriestley , if I'm about to implement this in my local fork, could you please tell me:

  1. where branch/tag is detected currently for git
  2. how to write back branch/tag custom field value for a commit
  3. there/how to write a migration script that will populate branch/tag for already imported commit

Thanks.

Sorry, the answers to those questions are very complex and I don't have time to walk you through it since we aren't interested in bringing this upstream.

I understand. Then please tell me one thing (I hope that's not complex): how to determine which controller have processed an url?

phabricator/ $ ./scripts/aphront/aphrontpath.php /D123

After recent upgrade I no longer have this ./scripts/aphront/aphrontpath.php file. Was it moved to different place?

I think the script was removed around the time AphrontSite was written, because it was using a pretty hacky approach to figure out the right controller. You can now find the current controller in DarkConsoleRequestController:

controller.png (1×1 px, 154 KB)