Hi Peter,
Le 01/03/2015 17:00, Peter Uhn��k a ��crit :
Hi,
I'm facing a problem with branches and refreshing the code. Currently I
handle (except for commits) everything from commandline, but the problem
is that when I switch branches I don't know how to easily refresh the
code. What I am doing now is running loading Baseline again, but that
feels odd.
Not so odd, in truth. It looks like a perfectly fine solution, which, maybe, could be added to the concept of baseline in a repository.
Git revolves around branches, and being able to quickly create them,
switch them, and merge them is important.
So is there currently any solution that could resolve this? Maybe I
could run some code that would simply load what is on the disk? If I
switch branches for java code, the editor automatically loads new
content without me needing to do any extra work; it would be nice to
have something similar.
Well, as you have noticed in Java, C or C++, switching branches does not call make automatically :)
In Pharo, loading code means compiling it, so what you describe may be a bit harder to do. However, if we consider, as above, that working in different branches is linked to a "project" concept, with a baseline describing this project and its dependencies, then:
a baseline branch switch could mean: unload the current baseline, its dependencies, followed by the switch branch, followed by a load of the baseline (in the new branch).
On the git side, this wouldn't be hard to do.
Another approach, a tad simpler, would be : switch branch, then all packages already loaded in the image and existing in the branch are loaded with the head of the new branch. This one would be easy to implement with just a button "switch branch" in the GitFileTree repository inspector.