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

Key: SCM-231
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Emmanuel Venisse
Reporter: Arne Degenring
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven SCM

Support for incoming deletions through provider-specific metadata file

Created: 16/Sep/06 11:36 AM   Updated: 23/Sep/06 08:44 AM
Component/s: maven-scm-provider-local
Affects Version/s: 1.0-beta-4
Fix Version/s: 1.0-beta-4

Time Tracking:
Not Specified

File Attachments: 1. Text File patch.txt (20 kb)


Complexity: Intermediate
Testcase included: yes


 Description  « Hide
As discussed on continuum-users:
http://www.nabble.com/Update-over-scm-local-does-not-delete-files-removed-from-source-dir-tf2257460.html#a6281593

Scm-local so far does not support incoming deletions. That means if you delete a file from the repository, it won't be deleted in your local working directory. This is a problem, e.g. if you use scm-local to connect Continuum to a ClearCase dynamic view. Files that are deleted from the repository will stay in Continuum's working directory and potentially cause the build to fail.

The solution is to let scm-local maintain a xml file .maven-scm-local that contains the list of files in the repository directory, as seen during the last checkout or update operation:

  • During checkout, the file .maven-scm-local is created in the checkout base directory. Its an XML file containing the list of files that have been checked out.
  • The update command looks for the file. If it is there, it compares the contents of that file to the current repository directory contents (including subdirs). All files that are in .maven-scm-local but are no longer in the repository dir, have been deleted in the repository dir. The update command therefore removes them from the checkout dir.
  • If for whatever reason .maven-scm-local is not there, the update command won't delete any files. That way, we're backwards compatible.
  • After completing the update process, the update command rewrites the .maven-scm-local metadata file.

The attached patch contains the implementation and test cases.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Emmanuel Venisse - 23/Sep/06 08:44 AM
Apply. Thanks.