History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEABKL-3589
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Sandy McArthur
Votes: 0
Watchers: 0
Available Workflow Actions

Mark as Stalled
Operations

If you were logged in you would be able to see more operations.
IDEA: Backlog

Preserve file history when moving an inner class to an package level class in Subversion

Created: 16 Mar 06 05:38   Updated: 16 Mar 06 18:14
Component/s: Version Control Integration, Refactoring
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: a project using Subversion as the vcs.

Build: 4,155
Severity: Low


 Description  « Hide
Subversion (any maybe other VCS systems) can track a file's history across different filenames via moves or copies. IDEA does a good job with this when you are operating on an entire file but it fails to preserve the file history when you are refactoring only part of a file into a new file.

For example say the class Parent, in Parent.java, had an inner class named Child. When you moved the inner class Child to being a package level class a new file, named Child.java, is created. The Child class has a history if being in the Parent.java file. IDEA's Refactor > Move (F6) tool is the logicial way you would move an inner class to a package level class but this fails to preserve the history.

Done manually in subversion the operations would expressed with a svn copy (svn copy Parent.java Child.java) to indicate the new file is derived from Parent.java and then the contents of Parent.java and Child.java would be edited with what IDEA currently does.

For this type of move, IDEA currently seems to create a new file and svn add (svn add Child.java) to the repository and then updates the contents of Parent.java and Child.java . This is wrong becuase svn add expresses that a file is new to the version control system and Child.java isn't really new and the notion that the Child class used to live under a different file name is lost.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.