IntelliJ Community . VcsRenameMoveProblem

 
VcsRenameMoveProblem 

HOME INDEX SEARCH CHANGES GO  
This topic discusses a problem with the current Vcs OpenAPI that prevents certain operations to be done after a rename or move refactoring. Since the Open API hides any movement of files until check in, there is no way to execute custom VCS actions (checkout, diff, properties, version tree,...) on moved/renamed files. These files simply do not exist for the underlying VCS until check in. The fact that it is not possible to check out a file after it has been moved/renamed is a very big problem for VCS that relies on explicit writability control: ClearCase, CVS w/ watches, Perforce, VSS. IMHO it is a major flaw in the current implementation. Rename and move actions have to be known/done immediately by the underlying VCS.

This will break the whole idea of VCS - you perform changes and they are immediately reflected in VCS. -- MikeAizatsky - 26 Nov 2002

Please feel free to correct any incorrect information or add other VCS in the following table. The table defines what VCS entry points need to be called at what time and hopefully it will help better understand the required API

  • Refactoring time
  • Check in time (file and project)
  • Exclusion from check in.

Rename

VCS Action Check in file Check in Project Exclude at Check in (0) sort
CVS remove new
add new
ci new
ci old
ci prjroot add old
remove new
ClearCase co old.getParent()
mv old new
ci old.getParent() (1) (2) mv new old
SubVersion mv old new ci old.getParent() ci prjroot mv new old

Move

VCS Action Check in file Check in Project Exclude at Check in (0) sort
CVS remove new
add new
ci new
ci old
ci prjroot add old
remove new
ClearCase co old.getParent()
co new.getParent()
mv old new
ci old.getParent()
ci new.getParent()
(1) (2)
mv new old
SubVersion mv old new ci old.getParent()
ci new.getParent()
ci prjroot mv new old

Create directory (package)

VCS Action Check in file Check in Project Exclude at Check in (0) sort
CVS - add dir
ci dir
ci prjroot -
ClearCase co dir.getParent()
add dir
ci dir.getParent() (1) (2) rm dir
SubVersion add dir ci dir.getParent() ci prjroot rm dir

Delete directory (package)

VCS Action Check in file Check in Project Exclude at Check in (0) sort
CVS - rm dir/*
ci dir
ci prjroot -
ClearCase co dir.getParent()
rm dir
ci dir.getParent() (1) (2) ??? undocheckout dir.getParent() ???
SubVersion rm dir ci dir.getParent() ci prjroot ??? add dir ???

(0) Commands to be issued before check in
(1) if the content of the file has changed a separate checkinFile would be issued
(2) if multiple files were added/deleted/moved/renamed in one directory the checkin of that directory would occur only once

-- JacquesMorel - 08 Aug 2002

e d i t a t t a c h r e f - b y d i f f s m o r e
Have ideas, requests, problems regarding this site? Send feedback.
Copyright © 2000-2003 by the contributing authors. All materials at intellij.org are the property of the contributing authors.