LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to organize code reuse


@Stranman wrote:

What is the Subversion behavior when a module that is part of its own repository is added and included into a project that has a repository. 

Does the module maintain its link to its originating repository?

 

Thanks,

- P


When you copy the Module into the Project's repository then the "Module" will be included to the Project's repository (You have the option to added when you commit) and it will not have any link to its own repository. Why because it is just the copy of the files and you cannot move the repository link by moving the files in the drive. If you just access the module from the Project without physically moving the files then both will maintain individual repositories.

This is turning out to be a Sub Version thread totally :).

-----

The best solution is the one you find it by yourself
0 Kudos
Message 11 of 16
(871 Views)

@Stranman wrote:

What is the Subversion behavior when a module that is part of its own repository is added and included into a project that has a repository. 

Does the module maintain its link to its originating repository?

 

Thanks,

- P


If the file is copied, then each repository will have its own copy of the VI.  If you just include it in your project, but the file is left where it was (ie, in the other project's work directory), then only the original repository will have a copy of it.  I recommend going with the latter.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 12 of 16
(866 Views)

The whole point of having a reuse library is that you have one standard codebase that you link against - so you don't copy it anywhere. If you standardize on a directory structure it will make things easier.

 

You also don't include the reuse code in your projects directly. When you use them and they will show up in dependencies, which is all that is needed.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 13 of 16
(850 Views)

There's also the advanced version of linking repositories, you can create a "virtual" folder structure that checks out from several repositories yet keep their original linkage.

This could e.g. be nice if you have a library of drivers and classes in a central place but dont want to link outside of your project folder, this way you can have the best of both worlds. It is a bit messy/advanced to set up though.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 16
(832 Views)
I never thought of it as particularly messy or advanced - just organized. You have separate repositories for your projects and for your common code. As long as the relative position of the code doesn't change when you create you working copies, nothing has to relink.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 15 of 16
(816 Views)

If you want your common code to be in the same structure as your project yet still be in a common directory you'll need Externals, as described here: http://svnbook.red-bean.com/en/1.0/ch07s03.html

It can also be used with a revision option, so you know you're using a stable code version.

 

Maybe it's not that advanced when you get used to it, i've only tested it once.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 16 of 16
(813 Views)