Page MenuHomePhabricator

Fix replicating open patches
Needs ReviewPublic

Authored by paladox on Dec 17 2015, 8:55 PM.
Referenced Files
Unknown Object (File)
Sat, Mar 23, 9:26 PM
Unknown Object (File)
Sat, Mar 16, 7:22 AM
Unknown Object (File)
Fri, Mar 15, 6:21 AM
Unknown Object (File)
Wed, Mar 13, 11:15 AM
Unknown Object (File)
Fri, Mar 8, 2:00 AM
Unknown Object (File)
Thu, Mar 7, 5:00 PM
Unknown Object (File)
Fri, Mar 1, 4:56 PM
Unknown Object (File)
Fri, Mar 1, 12:16 AM
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Required Signatures
L28 Phacility Individual Contributor License Agreement
Summary

Support replicating open patches from refs/changes/* also support viewing
refs/meta which would be useful when migrating from gerrit.

This update is for when phabricator is replicating.

This supports replicating open patches from gerrit.

This helps in the migration from gerrit to phabricator

Test Plan

This helps the migration from gerrit to phabricator by allowing us to view the files from gerrit in phabricator including open patches which is what this patch is fixing.

Diff Detail

Repository
rP Phabricator
Branch
arcpatch-D14813_3
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 9630
Build 11527: arc lint + arc unit

Event Timeline

paladox created this object with visibility "Public (No Login Required)".Dec 17 2015, 8:55 PM
paladox created this object with edit policy "All Users".

@epriestley I am not sure what I did fixes the problem or if I edited the wrong file.

Would the correct file be PhabricatorRepositoryPullEngine.php

epriestley edited edge metadata.

This doesn't do what you want, and presumably hasn't been tested at all since it doesn't work and breaks normal branches.

I'm not willing to upstream changes which hardcode Gerrit paths into Phabricator.

See Contributing Code.

This revision now requires changes to proceed.Dec 17 2015, 9:09 PM

@epriestley is there any way to support system.gitconfig or phabricator.gitconfig file that would allow us to specify which refs to pull allowing us to choose our refs without needing to hard code them.

Also which file would need the change to support what I am trying to achive since there are multiple files with refs/heads but the one file that I think is related is PhabricatorRepositoryPullEngine.php

paladox edited edge metadata.

Some minor changes.

src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
314

@epriestley

If I was to do something like

$future = $repository->getRemoteCommandFuture(
'fetch origin %s --prune',
'+refs/heads/*:refs/heads/*',
require_once DIR . '../../../../ref_config_settings.php';
);

Would that work. And are the files above related to what I am trying to do.

I am trying to when phabricator is used as viewing a repo that is not in phabricator and is located for example on gerrit and you pull it from there it only does the changes that are on refs/heads not refs/changes even though that ref is for refs that have not been merged it is useful for example on Wikimedia phabricator which lets you see the changes before they are merged.

The ref_config_settings.php' file would look like this for example

'+refs/changes/*:refs/changes/*',

and would allow us to not hard code refs that aren't used by phabricator but other repos.

@epriestley I am not sure what I did fixes the problem or if I edited the wrong file.

@paladox: Please test your patches yourself first, before making reviewers spend their time.

@epriestley I am not sure what I did fixes the problem or if I edited the wrong file.

@paladox: Please test your patches yourself first, before making reviewers spend their time.

I carn't since not sure how to run it on php and I think it needs script to start it.

@paladox: Please test your patches yourself first, before making reviewers spend their time.

I carn't since not sure how to run it on php and I think it needs script to start it.

In that case, it's very unlikely that your contributions would be accepted (Or even seriously reviewed). Please read Contributing Code for the guidelines. Everybody (And especially epriestley) are just too busy to do the testing for you.
Other than that, this feature is not likely to be accepted to the upstream, because it doesn't fit with the upstream's goals. See your local admin about local patches.