Azzera filtri
Azzera filtri

How do I move an svn repository to another folder and have Matlab still see it?

53 visualizzazioni (ultimi 30 giorni)
I'd like to move an svn repository folder from one directory to another and still have the affiliated directory that's under version control think nothing has changed. I tried moving the repository folder to another directory, then used "manage files" in the directory under version control and tried to point to the new repository folder location, but it didn't work. I also tried replacing all references to the old directory with the new directory in the wc.db file under .svn, which just gave me a "corrupted error. I haven't seen anything in the documentation or online searches that indicates how to do this.
In the future, I'd also like to convert the svn repository to a git repository.
Thanks!
  4 Commenti
Jeff Dugger
Jeff Dugger il 9 Giu 2016
Forgot to mention -- after installing TortoiseSVN, "relocate" is available by selecting the copy of the repository folder in its new location, right-clicking, and choosing the "relocate" option.
Kirby Fears
Kirby Fears il 10 Giu 2016
I meant to say Tortoise and not Toad in my original post. Sorry if that caused any confusion.

Accedi per commentare.

Risposte (2)

Image Analyst
Image Analyst il 9 Giu 2016
I use Tortoise Subversion and it works fine. You can just check in your project to syn it up with the repository, then "checkout" the folder in the repository to a different folder on your local drive. MATLAB will be able to see any folder with m-files no problem.
If you're using the version control built-in to MATLAB, then I have no idea since I don't use that.
  1 Commento
Jeff Dugger
Jeff Dugger il 13 Giu 2016
Thanks. Appreciate your answer. I am using the built-in Matlab version control. Turns out can use features of Tortoise Subversion to make changes outside of Matlab and that will fix the issue. My response to Kirby gives some details (although I think probably not clearly enough.)

Accedi per commentare.


Guillaume
Guillaume il 10 Giu 2016
Modificato: Guillaume il 10 Giu 2016
First some proper terminology and explanation. A subversion repository is the central location where the code is versioned. Ideally, it should be on another machine. This can be accessed using one of three protocols, http, svnserve, or file. It sounds like you have a local repository accessed with the file protocol. On the repository side, if you access it with the file protocol, you can simply move it with your OS tool. If you access it with svnserver or http, in addition you also need to point svnserve / apache to the new location.
"the affiliated directory that's under version control" is called the working copy. If the repository location has changed, you indeed use svn relocate to point the working copy to the new location.
Note that you should never edit any file in a .svn directory. That's a sure way to corrupt your working copy and potentially the repo.
There are tools available to convert a svn repository to a git one. Last time I tried (a few years back) it went horribly wrong. Then again, it's been my experience with git all along.
  1 Commento
Jeff Dugger
Jeff Dugger il 13 Giu 2016
Thanks Guillaume. It is a local copy. I ended up using the "relocate" feature in TortoiseSVN.
Looking into git svn for conversion.

Accedi per commentare.

Categorie

Scopri di più su Source Control Integration in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by