fogbound.net




Tue, 25 Aug 2020

JetBrains/PHPStorm losing SVN

— SjG @ 10:47 am

OK, maybe the cool kids aren’t using Subversion (SVN) any more, but we are for a set of established projects. Rather than rebuild our test infrastructure and our live deployment system, we’re sticking with stuff that works. I’m old enough to adopt the “if it ain’t broke, don’t fix it” mentality.

Ah, but then when I upgraded PHPStorm to a recent version, it done got broke. The JetBrains products have long had an uneasy realtionship with SVN. Originally, a client was built-in. Then, they switched to shelling out to an external executable. The authentication was sometimes dicey. That being said, when it works, it’s really, really nice. Having all of the revision control tools like histories, version comparisons, branching, the shelf, etc, available within the source editor is really convenient and time-saving.

Anyway, I upgraded, and suddenly, none of the SVN stuff worked. The right-click menu didn’t even show the Subversion submenu, and the options from the VCS menu didn’t work as expected.

Here’s how I eventually solved the problem. It turns out that (big surprise), I haven’t been doing things quite like everyone else does. I have a Project in PHPStorm, which is essentially three separate svn working sets under a single directory, e.g.,

/Users/samuelg/projects/this_particular_project
/Users/samuelg/projects/this_particular_project/main_site
/Users/samuelg/projects/this_particular_project/dependent_site
/Users/samuelg/projects/this_particular_project/mobile_app

In the above example, main_site is a working directory checked out from https://svn.myrepo.com/project/whatever/trunk, dependent_site is checked out from https://svn.anotherrepo.com/path/whatever/trunk, and mobile_app is checked out from https://svn.yetanother.com/project/whatever/trunk. This actually works really well: you can edit stuff in main_site and dependent_site, and when it comes time to check in, PHPStorm will update both repositories. Now, of course, best practices would be to have dependent sites in the same repository, but for various historical reasons and external dependencies, this is not possible.

SO, it used to be that PHPStorm would understand if you registered the <Project> to use Subversion as its revision control system:

Setting VCS at the <Project> level

However, after a period of pulling out more hair and trying different things, I learned that now, I have to identify each separate working space:

Setting the VCS for each working space

So there it is.

Filed in: