March 21, 2020
Estimated Post Reading Time ~

AEM/ Adobe CQ: Version controlling

AEM/ Adobe CQ: Version controlling
CQ uses svn by default.
Filevault ( VLT)is used when we need a crx file system to be available in the local system(like accessing code using eclipse).

Create back up of crx code using file vault
To set up the filevault, we need to unzip the filevault file and configure its bin path to the system path variable.

Export project from CQ to local machine

c:\CQ5_training\backup>vlt --credentials admin:admin export -v http://localhost:4505/crx /apps/training .
Above command creates a jcr_root folder in the backup folder and put all files from crx

Import Project from Local file system to CQ
c:\CQ5_training\backup>vlt --credentials admin:admin import -v http://localhost:4505/crx/apps/training
Once the user credential is entered, it is not required again bcz, the user credential is saved in the user directory> vault folder as an XML file.

Checkout just directory structure, the not entire project
backup>vlt -co http://localhost:4505/crx/-/jcr:root/apps/training .

Identify locally modified files, execute the below command.
jcr_root>vlt -st

Identify the difference in local and crx files, execute below command.
jcr_root>vlt -diff complex/components/test.jsp
jcr_root>vlt diff will give all changed fields comparison in jcr_rot checked out directory

commit changes to code repository:
All files:
jcr_root>vlt - ci
Single file commit:
jcr_root>vlt - ci filename

Note: ci, st, diff command only works with checked out code, not exported code. 

Filevault commands reference:
Command 
Description
export
Export the Vault filesystem
import 
Import a Vault filesystem
checkout (co)
Checkout a Vault file system
analyze 
Analyze packages
status (st) 
Print the status of working copy files and directories.
update (up)
Bring changes from the repository into the working copy.
info 
Displays information about a local file.
commit (ci)
Send changes from your working copy to the repository.
revert (rev)
Restore pristine working copy file (undo most local edits).
resolved (res)
Remove 'conflicted' state on working copy files ordirectories.
propget (pg)
Print the value of a property on files or directories.
proplist (pl)
Print the properties on files or directories.
propset (ps)
Set the value of a property on files or directories.
add 
Put files and directories under version control.
delete (del,rm)
Remove files and directories from version control.
diff (di) 
Display the differences between two paths.
rcp
Remote copy of repository content.
sync 
Control vault sync service
console 
Run an interactive console


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.