Details
I am currently having issues with hosting a SVN repository in Phabricator. I am considering temporarily hosting the repository outside of Phabricator, until I am able to resolve this issue.
Looking at the repository Edit Hosting options, it seems like it should be possible to host a repository outside of Phabricator and later edit it so that it is hosted by Phabricator. Probably going from Phabricator-hosted to remote and from remote to different remote is supported too?
I tried a few things and details are provided below, but, briefly, what I would like to know is:
Does Phabricator support changing the hosting of repositories after they are created?
Can they be changed in the following ways:
- Remote -> Phabricator-hosted (This is most important to me at the moment.)
- Phabricator-hosted -> Remote
- Remote -> A different remote
Are additional steps beyond changing the hosting options in the Edit Hosting page necessary? If so, what are they?
Is there anything else I should be aware of when doing this?
Here is an explanation of what I've tried so far and what has happened:
To test, I configured a remote SVN repository to work with Phabricator and everything seemed to work. I then tried editing the repository to be hosted by Phabricator, which was allowed. However, the Edit Repository page complains about this error:
Working Copy Error Working copy /var/repo/SVNTESTTWO/ has been deleted, or is not readable by the webserver. Make this directory readable. If it has been deleted, the daemons should restore it automatically.
After waiting a little while and refreshing the page, the error goes away and the page seems to indicate that everything is all right. However, if I look at the /var/repo/SVNTESTTWO/db/revs/0 directory, it looks like this:
ls -la /var/repo/SVNTESTTWO/db/revs/0 total 4 drwxr-sr-x. 2 phd phd 15 Jan 7 10:42 drwxr-sr-x. 3 phd phd 15 Jan 7 10:42 -r--r--r--. 1 phd phd 253 Jan 7 10:42 0
There seems to be only one revision, even though the remote repository had multiple revisions. It seems like the revisions have not been fully imported into the new repository. If I check out a working copy and try svn log -v, no log info is available. Also, clicking on commits for this repository in Phabricator can cause Unhandled Exception ("CommandException") messages to appear, with error messages like this:
Command failed with error #1! COMMAND svn --non-interactive cat 'file:///var/repo/SVNTESTTWO/path/to/some/file/in/the/repo/@320' STDOUT (empty) STDERR svn: E160006: No such revision 320
Is there something else I need to do to make this work and have all the revisions moved to the Phabricator-hosted repository? Do I need to manually dump and load the revisions?
Answers
Yes, all those changes are expected to work.
However, when converting an SVN repo from "imported" to "hosted", it doesn't automatically copy over commits (Commits are copied over for imported git/hg); You need to manually upload the commits to the new repository.
The commits that exist in the Phabricator database are a little confused, because they don't actually know about the physical location.