Git User Group

cancel
Showing results for 
Search instead for 
Did you mean: 

Git and .lvclass vi issue.

Hi, guys!

I have an issue.
I tested git vcs on my labview project and found out a curious behavior on class vis (which are methods). Simple labview vi's behaviour is as-expected.
I use last stable git release and LabVIEW 15.0.1f13(32bit).

 

 

1. I have traingle class and its getter method getArea (see fig. 1).

 

Figure 1.Figure 1.

 

2. A bd of the vi is displayed on fig. 2.

 

Figure 2.Figure 2.

 

3. Then I modify my bd - changing multiplier on calc expresion (don't ask why) fig. 3.

 

Figure 3.Figure 3.

 

4. I decide this changes has to be on staging area fig. 4.

 

Figure 4.Figure 4.

 

5. I also can see my tortoise git client see this file as modified fig. 5.

Figure 5.Figure 5.

 6. Time goes by and I finally realise it was a bad idea to do so. So - first - I unstage this file (fig. 6) and - second - checkout to my last commit state (fig. 7)

Figure 6.Figure 6.

 


Figure 7.Figure 7.

 

7. I expect to see my file as in fig. 1, but when I open it in project window it has fig.3 state.

The issue is binary vi file was REALY restored to its unchanged condition (fig. 8). But LabVIEW some how don't see it.

What am I doing wrong or what concept slips away from me?

Figure 8.Figure 8.

 

0 Kudos
Message 1 of 4
(2,352 Views)

Hi,

The issue here is not related to git ( or other VCS).

 

LV doesn't react automatically to a change made on a vi file outside of LV.

 

Here you need to close/open your project or use the revert command (menu File>>Revert) on getArea.vi.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 2 of 4
(2,329 Views)

Thank you for your reply!

1. "Revert" option in File menu greyed and disabled.

2. Project restart DOES affect on the file.

3. Computer restart affects, but I'm not sure that this is the right way for workflow.

4. I don't observe such behaviour on vi that is not part of class. Any thoughts?

 

upd: option to restart project is vital, but there must be easier solution.

 

 

0 Kudos
Message 3 of 4
(2,316 Views)

To have access to the revert item, you need to have the vi marked as modified (with the *). Just move a wire and make the revert, it'll work.

 

Restarting the computer is definitely not necessary nor recommended

 

Being part of a class should not change the behavior. The one you described seems to be the right one, but to be fair all my vis are in a class or lib. I can be wrong on that part. 


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 4 of 4
(2,301 Views)