View Full Version : [FIXED] Architect behavior when renaming class (impact on revision control)

21 Aug 2012, 2:02 AM
Hi.... this may be a question, or it may be bug report, or maybe a feature request. I'm not sure how to classify it.

I have my Architect 2.1 project under revision control using subversion. I committed the whole thing (root files, entire app directory, and entire metadata directory).

When I rename a class (using the "userClassName" property in Architect) and save a project I find that Architect entirely removes and recreates the directory in which the file resided. This behavior is the root of my question.

For example, start with one store named X that is under revision control. My "store" directory will contain the X.js file and my .svn directory (.svn is the subversion directory). Rename X to Y and save the project in Architect. Now I find the .svn is gone (not expected), X is gone (expected) and there is a Y.js file (expecteD).

This makes for a very awkward workflow because in order to commit my changes I have to fix the problem with the store directory. That means running an "svn update" which brings back what was there, getting the Architect changes back in place, manually removing the old X.js file, and finally committing. So the work flow is: rename a class, save, flip over to subversion to sort out the mess, get back to work.

Is this a bug of some kind, or am I simply incorrect, to begin with, by putting everything in revision control?

The problem would not exist if the entire directory was not removed when the class name is changed. It's common, for example with Eclipse, to rename a class. When you do that you see a new file appear that is not under revision control (expected) and you see the old fine disappear (expected) and it's all very predictable. Architect... not so much.

21 Aug 2012, 8:27 AM
I'm looking into this.

Steps to reproduce:

Create a project
save it
add a store userClassName X

check into source control

rename store X store Y

Let me know if this is correct

21 Aug 2012, 9:57 AM
That will do. Here is a simple test that I just did to confirm this behavior:

1. Create a project
2. save it as myProj
3. add a store userClassName X
4. save
5. mkdir .../myProj/app/store/.svn (simulate putting it under subversion revision control)
6. ls -a .../myProj/app/store -> result is directory .svn and file X.js
7. in Architect change store userClassName X to Y
8. save
9. ls -a .../myProj/app/store -> result is Y.js (expected) but the .svn directory is gone!


22 Aug 2012, 6:36 AM
Confirmed. Fixed soon released next patch. This should only happen on nix systems where .blah files are hidden.

22 Aug 2012, 10:12 AM
I'm running OSX, so that makes sense.

Thanks very much.

23 Aug 2012, 8:41 AM
I've changed it to check for empty directories after save

Old way:
Discover and remove dead files
remove empty directories
save files

New way:
Discover and remove dead files
save files
remove empty directories