Filter löschen
Filter löschen

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

53 Ansichten (letzte 30 Tage)
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 Kommentare
Jeff Dugger
Jeff Dugger am 9 Jun. 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 am 10 Jun. 2016
I meant to say Tortoise and not Toad in my original post. Sorry if that caused any confusion.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Image Analyst
Image Analyst am 9 Jun. 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 Kommentar
Jeff Dugger
Jeff Dugger am 13 Jun. 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.)

Melden Sie sich an, um zu kommentieren.


Guillaume
Guillaume am 10 Jun. 2016
Bearbeitet: Guillaume am 10 Jun. 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 Kommentar
Jeff Dugger
Jeff Dugger am 13 Jun. 2016
Thanks Guillaume. It is a local copy. I ended up using the "relocate" feature in TortoiseSVN.
Looking into git svn for conversion.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Source Control Integration finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by