Rename refactoring and Subversion

When i rename a class, the subversion plugin deletes the file and adds a new one. Is there any option to use the svn move command instead of add+delete?

Ty

9 comments

According to http://jetbrains.net/jira/browse/IDEADEV-29 it's already supported. Can you provide SVN logs illustrating the opposite?

0

Where can i find those logs?

0

Either on your server or by enabling logging in IDEA and looking in system\log\idea.log.

To enable SVN logging:

1. Close IDEA
2. Edit IDEA_HOME\bin\idea.exe.vmoptions file, add the following lines:
-Djavasvn.log=true
-Djavasvn.log.trace=true

0

2006-10-04 13:04:40,629 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( 1 2 ( ANONYMOUS EXTERNAL ) ( edit-pipeline ) ) )
2006-10-04 13:04:40,638 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( 2 ( edit-pipeline ) 115:svn+ssh://**URL**)
2006-10-04 13:04:40,683 INFO - org.jetbrains.idea.svn.SvnVcs - svn: Malformed network data
2006-10-04 13:04:40,683 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( ( EXTERNAL ) 0: ) )
2006-10-04 13:04:40,685 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( EXTERNAL ( 0: ) )
2006-10-04 13:04:40,726 INFO - org.jetbrains.idea.svn.SvnVcs - svn: Malformed network data, string length expected
2006-10-04 13:04:40,726 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( ) )
2006-10-04 13:04:40,726 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( 36:b99f2102-7cfc-0310-8349-d67681f888b3 52:svn+ssh://**URL** ) )
2006-10-04 13:04:40,731 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( commit ( 52:Renaming the test class acording to the tested class ( )false ) )
2006-10-04 13:04:40,855 INFO - org.jetbrains.idea.svn.SvnVcs - svn: Malformed network data
2006-10-04 13:04:40,859 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( ( ) 0: ) )
2006-10-04 13:04:40,859 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( ) )
2006-10-04 13:04:40,866 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( open-root ( ( ) 2:d0 ) )
2006-10-04 13:04:40,870 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( delete-entry ( 26:OldClass.java ( 4526 ) 2:d0 ) )
2006-10-04 13:04:40,884 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( add-file ( 34:RenamedClass.java 2:d0 2:c1 ( 142:svn+ssh://**URL**/OldClass.java 4526 ) ) )
2006-10-04 13:04:40,889 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( apply-textdelta ( 2:c1 ( ) ) )
2006-10-04 13:04:40,926 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( textdelta-chunk ( 2:c1
2006-10-04 13:04:40,927 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : 4:SVN ) )
2006-10-04 13:04:40,928 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( textdelta-chunk ( 2:c1
2006-10-04 13:04:40,930 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : 8:?[?*? ) )
2006-10-04 13:04:40,932 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( textdelta-chunk ( 2:c1
2006-10-04 13:04:40,952 INFO - lij.localVcs.impl.LocalVcsImpl - purged 0 items
2006-10-04 13:04:41,247 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : 1066:?RK0?WT?So?GD.S?
?I'?G,?E"?E??G#?DJ?HJ?Q?o?P?p?M???N?H?I?9L?NE?F?[?K?u?E?%D?O?G?qJ?u?K?o?G?#D??F?H?X?$?@??F?H?H?@A?G?e?_?E??D?`M?
J?F?]?F?!?R?6?G"?S?
?H??E?2G?N??M?{H?P?F?1N?H?h?I?t???F?4]?H?'O?P?IK?^?IH? ?T?
@P?g~?8H?dl?G?F?S??S?T??0H?d_?YO?nM?GQ?7G?gY?gD?'Z?_?E?G]?J?D?/L?VQ?'G?IJ?$^?g?@B?
?F?4X?Wr?Q?eD?_If?T?S?G?FF?g^?(E?F?J?0?K?p@?*?\m?8P@y?"a?-T?=IfI?|?G?gQ?xL?
D?
?K?bW?WD?
@B?m?D?n?D?e?I?NK?I?G?bJ?lM?kJ?_K?YV??F?!?D?2?H?xJ?xG?'L?
?F?!D?x?J?W?D?Z?P?]?L?HD?.G?/E?6D?_F?!E?>?F?9P?#P?&?U?VE?/?W?|M?w?F??D?>R?!P?]J?kd?
D?o?Q?cP?5?U?-?_?8?\?NS??V?,R?FN?F?P?@?F?3H?I?@??^?C_?ZP?@?S?,J?FE?{F?!G??H?V?#?M?BG?/w??W?ZL??I?!?K?C?I?-?E?;?T?!c??D?1?K?u?O?<@?O?0@?|??R?<?L?mR?gH?/G?E?1K?TR?h?K?u~?\N?9R?h?F??E?gS?\?aQ??K?I@Z??W?NO?i?G??J?K?I?E?F?{I?+U?UG?VF?aW?cI??S?DG?L??J?_?F?K??*X?cG?]H?p?[?
?I?HQ?jP?#Gi?H?H?\?F@E?a??+e?WJ?sX?J?kS?'_?oU?S?;@?g?eS?>S?;K P?#?J?XQ?t?S??V?S?M?*D??D??F?{F?S?#?E?{?D5?D?
2006-10-04 13:04:41,250 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ?H?@?!?fO?`H?Y?gM?GH?}S?D?K?$R?PW?<\?_L?X?Q?.? ) )
2006-10-04 13:04:41,252 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( textdelta-chunk ( 2:c1
2006-10-04 13:04:41,297 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : 768:package THE CLASS SOURCE)
2006-10-04 13:04:41,299 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( textdelta-end ( 2:c1 ) )
2006-10-04 13:04:41,303 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( close-file ( 2:c1 ( 32:16dc945479b4577c468f161ad3fe3cf3 ) ) )
2006-10-04 13:04:41,309 INFO - org.jetbrains.idea.svn.SvnVcs - SENT : ( close-edit ( ) )
2006-10-04 13:04:41,468 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( ) )
2006-10-04 13:04:41,469 INFO - org.jetbrains.idea.svn.SvnVcs - svn: Malformed network data
2006-10-04 13:04:41,469 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( success ( ( ) 0: ) )
2006-10-04 13:04:41,469 INFO - org.jetbrains.idea.svn.SvnVcs - READ : ( 4528 ( 27:2006-10-04T12:04:40.941626Z ) ( 6:daniel )
2006-10-04 13:04:41,469 INFO - org.jetbrains.idea.svn.SvnVcs - svn: Malformed network data
2006-10-04 13:04:41,469 INFO - org.jetbrains.idea.svn.SvnVcs - READ : )
2006-10-04 13:04:42,228 INFO - impl.local.LocalFileSystemImpl - Executing request:com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl$4@56dbc1

0

Thanks for the details, I've passed the link to this discussion to the responsible developers, hope that they will help you soon.

0

Hello,

Actually IDEA does rename the file (i.e. uses Subversion "move" command). This very command copies original file to the location or name and then deletes original file. Rename is committed as copy+delete and that is what I could see in your log file:

>>>deletion:
delete-entry ( 26:OldClass.java ( 4526 ) 2:d0 ) )
>>>copy from OldClass.java (note source URL and revision is there):
add-file ( 34:RenamedClass.java 2:d0 2:c1 ( 142:svn+ssh://**URL**/OldClass.java 4526 ) ) )

The main idea of Subversion "move" operation is though it consist of copy and delete, history of the file after it is renamed is kept, i.e. history for RenamedClass.java will display log entries related to OldClass.java as well.

Alexander Kitaev.

0

Thanks a lot. I swear that after renaming the class i did a "Show history command and it didn't appear, but i have just recheck it and it works :)

0

Please sign in to leave a comment.