@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 a strong hint about importing or observing repositories to repository creation

Summary: Fixes T11278. Also mention `svnsync`, since we have some evidence that it works.

Test Plan: {F1716250}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11278

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

+96 -5
+22 -1
src/applications/diffusion/controller/DiffusionRepositoryEditController.php
··· 56 56 $layout->addColumn($action); 57 57 } 58 58 59 + $hints = id(new AphrontMultiColumnView()) 60 + ->setFluidLayout(true); 61 + 62 + $observe_href = PhabricatorEnv::getDoclink( 63 + 'Diffusion User Guide: Existing Repositories'); 64 + 65 + $hints->addColumn( 66 + id(new PHUIActionPanelView()) 67 + ->setIcon('fa-book') 68 + ->setHeader(pht('Import or Observe an Existing Repository')) 69 + ->setHref($observe_href) 70 + ->setSubheader( 71 + pht( 72 + 'Review the documentation describing how to import or observe an '. 73 + 'existing repository.'))); 74 + 59 75 $view = id(new PHUITwoColumnView()) 60 76 ->setHeader($header) 61 - ->setFooter($layout); 77 + ->setFooter( 78 + array( 79 + $layout, 80 + phutil_tag('br'), 81 + $hints, 82 + )); 62 83 63 84 return $this->newPage() 64 85 ->setTitle($title)
+68
src/docs/user/userguide/diffusion_existing.diviner
··· 1 + @title Diffusion User Guide: Existing Repositories 2 + @group userguide 3 + 4 + Quick guide for importing or observing existing repositories. 5 + 6 + 7 + Overview 8 + ======== 9 + 10 + If you have an existing repository, you can observe or import it into 11 + Diffusion. 12 + 13 + Observing a repository creates a read-only copy in Phabricator that is kept 14 + up to date by continuously importing new changes. 15 + 16 + Importing a repository creates a read-write copy. 17 + 18 + This document is a quick guide to getting started. For an overview of 19 + Diffusion, see @{article:Diffusion User Guide}. For a more detailed guide 20 + about managing repositories and URIs in Diffusion, see 21 + @{article:Diffusion User Guide: URIs}. 22 + 23 + 24 + Observing Repositories 25 + ====================== 26 + 27 + To observe an existing repository: 28 + 29 + - Create a repository in Diffusion, but do not activate it yet. 30 + - Add the URI for the existing repository you wish to observe in the 31 + **URIs** section, in **Observe** mode. 32 + - Activate the repository in Diffusion. 33 + 34 + This creates a read-only copy of the repository in Phabricator. Phabricator 35 + will keep its copy in sync with the remote by periodically polling the remote 36 + for changes. 37 + 38 + For more details, see @{article:Diffusion User Guide: URIs}. 39 + 40 + 41 + Importing Repositories 42 + ====================== 43 + 44 + There are two primary ways to import an existing repository: 45 + 46 + **Observe First**: In Git or Mercurial, you can observe the repository first. 47 + Once the import completes, disable the **Observe** URI to automatically convert 48 + it into a hosted repository. 49 + 50 + **Push to Empty Repository**: Create an activate an empty repository, then push 51 + all of your changes to empty the repository. 52 + 53 + In Git and Mercurial, you can do this with `git push` or `hg push`. 54 + 55 + In Subversion, you can do this with `svnsync`. 56 + 57 + For more details, see @{article:Diffusion User Guide: URIs}. 58 + 59 + 60 + Next Steps 61 + ========== 62 + 63 + Continue by: 64 + 65 + - reading an overview of Diffusion in 66 + @{article:Diffusion User Guide}; or 67 + - learning more about managing remote repository URIs in 68 + @{article:Diffusion User Guide: URIs}.
+6 -4
src/docs/user/userguide/diffusion_uris.diviner
··· 135 135 If you have an existing repository that you want to move so it is hosted on 136 136 Phabricator, there are three ways to do it: 137 137 138 - **Push Everything**: //(Git, Mercurial)// Create a new empty hosted repository 139 - according to the instructions above. Once the empty repository initializes, 140 - push your entire existing repository to it. 141 - 142 138 **Observe First**: //(Git, Mercurial)// Observe the existing repository first, 143 139 according to the instructions above. Once Phabricator's copy of the repository 144 140 is fully synchronized, change the **I/O Type** for the **Observe** URI to ··· 148 144 writable, and you can begin pushing to it. If you've adjusted URI 149 145 configuration away from the defaults, you may need to set at least one URI 150 146 to **Read/Write** mode so you can push to it. 147 + 148 + **Push Everything**: //(Git, Mercurial, Subversion)// Create a new empty hosted 149 + repository according to the instructions above. Once the empty repository 150 + initializes, push your entire existing repository to it. 151 + 152 + In Subversion, you can do this with the `svnsync` tool. 151 153 152 154 **Copy on Disk**: //(Git, Mercurial, Subversion)// Create a new empty hosted 153 155 repository according to the instructions above, but do not activate it yet.