From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

moving a file that is controlled by subversion

Hi,

 

I am having difficulty moving files that are on subversion.  I am attempting to execute the process aas follows:

 

1. Create a project containing all the labVIEw files (>15,000)

 

2. If I move a folder in NI project explorer all the links will be updated automatically but the folders cannot be commited.  I must delete the .svn portions and then commit.  Issue : all history is lost

 

3. Move the folder in svn.  Issue : all the files must now be updated manually.

 

Does anyone know a way of avoiding the above issue?

 

Thanks,

Sean  

0 Kudos
Message 1 of 9
(2,781 Views)

You can move the files using svn and then edit the project file manually. The project file is just an XML file which you can open with a text editor and then you can simply to a text search and replace for updating the path.

0 Kudos
Message 2 of 9
(2,770 Views)

Thanks smercurio but I was hoping labVIEW had some way to automate this process.

 

This is probably the least manual.

 

1. Move files on subversion

2. Update locally

3. Delete all local files fromt he update.

4. Move the files in the project, (move on disk)

5. Commit the files in the new location.

 

This is very awkward when there is a large tree structure.  It's a pity labVIEW can't automate this process.

0 Kudos
Message 3 of 9
(2,753 Views)

Have you tried having LabVIEW do autopopulating in the project and move everything through svn?  The project will sutomatically see the move.

 

smercurio's idea could be automated, although I'm not sure how bad manually searching and replacing would be.  I guess it all depends on how often you're doing this.

0 Kudos
Message 4 of 9
(2,743 Views)

@SeanJ wrote:

Thanks smercurio but I was hoping labVIEW had some way to automate this process.

 

 

This is very awkward when there is a large tree structure.  It's a pity labVIEW can't automate this process.



Strictly speaking, why should it? The operation you are performing is completely independent of LabVIEW, or any other programming environment for that matter. You'd have the exact same situation if you were working in Visual Studio. Would you say the same thing that you believe Visual Studio should automate this process, when it has nothing to do with Visual Studio?

0 Kudos
Message 5 of 9
(2,740 Views)

Thanks for the response Mathew,

 

The problem is that if I move something on subversion I have to do the folowing:

 

1. Delete the folder locally.

2. Move it on subversion.

3. Update locally.

 

Deleting a folder could cause vi's to link to identically named vi's.

0 Kudos
Message 6 of 9
(2,733 Views)

smercurio,

 

It's is obviously with to NI what level of support they give to subversion. 

 

I don't know whether visual studio is meant to work with subversion but links such as that below suggest that labVIEW is intended to be used with subversion.  If that is the case, why not include the function discussed which would be a handy feature for the likes of me.

 

https://decibel.ni.com/content/groups/large-labview-application-development/blog/2010/03/29/using-su...

 

Why say, "why" when you can say, "why not?"

 

Sean

 

P.S. I know it's circular....

0 Kudos
Message 7 of 9
(2,729 Views)

Initially you said you wanted to update the project file. Are you saying you also want to relink the VIs? Are the VIs linking to subVIs contained in folders outside of vi.lib? If not, then there should be no issue as far as the LabVIEW VIs are concerned, since the paths to subVIs are stored as relative paths, not absolute paths.

 

At worst case you could simply configure the VI search path in your LabVIEW options, but as I said, this should not be necessary. I've moved folders around and did not have to update the LabVIEW VI links as long as the hierarchy remained intact.

 

 

This is OT, but as for your additional comment regarding the support for subversion, I don't know what you mean by "obvious level of support". Do you have any idea how many different source code control systems there are? Is NI supposed to provide such functionality for all of them? How much resources should NI spend on this, as opposed to improving the LabVIEW language? If you really want this, then post an idea in the LabVIEW Idea Exchange. Others can vote on it.

0 Kudos
Message 8 of 9
(2,726 Views)

What identically named VIs do you have in your project?  LabVIEW won't allow you to do this (at least without conflict).

 

I did do a simple test, and the project was fine, although you will have to deal with resolution dialogs for the moved files.

 

I'm not sure there is going to be a clean way to do this.  In simple examples, it would be possible to move the files inside the project, then move them in subversion and do the update.  But, if something you move points outside of its directory, that file may have to get updated during the move as well.  So, when you do the move in svn, you'll lose that change and have to resolve the directories.

0 Kudos
Message 9 of 9
(2,724 Views)