Do all of your common daily development tasks right here. Add new files, modify existing files then keep and promote your changes to the AccuRev server from one UI. You can also diff your changes against the backing stream or the most recent version of the file. Additionally you can resolve conflicts before promoting your changes. If your organization uses change packages (AccuWork Issues) you can promote your changes against an issue here too.
@ja For Japanese version of this document find the section beginning with @ja below the English version.
(日本語版へ移動)
Requirements
AccuRev Server and Client 7.6 and higher.
Note: For full functionality always use the latest release of AccuRev Server.
AccuRev client installed.
Visual Studio Code version 1.74 and higher.
Quick Start
Install this extension and already have the AccuRev Client 7.6 or higher installed.
Open an AccuRev workspace within Visual Studio Code using File - Open Folder.
If necessary you will be prompted to login to AccuRev.
Start working with your workspace and files.
Source Control Viewlet - AccuRev Features
The viewlet will display a value on the Source Control (SCM) icon in the Activity Bar indicating the number of changes pending. Select the Source Control icon to switch to the SCM viewlet. Your AccuRev changes will be listed in one of four sections within the Source Control section. You will only see files that have changes requiring action from you. If you have not made any changes then the Source Control section will be empty.
You can update your workspace from the Source Control Repositories section then select the workspace you wish to update. Click the U which will update your workspace after you click on it.
Workspace Changes
Once a change has been saved (kept) with AccuRev or a file is added to AccuRev the change has permanently become part of your workspace. These files currently exist only in your workspace. They have not been promoted or pushed to a parent stream.
An icon to Promote All Changes is available in the Workspace Changes section header.
Local Changes
Local Changes are changes to your workspace that have not yet been saved (kept) with or added to AccuRev.
Files that have been modified or are new to the workspace appear under this heading. Each file will have a status indicator such as E for External or M (blue) for Modified.
Overlap Changes
Files that have been changed in the parent hierarchy will appear as overlap changes with a status indicator of O.
Files in this section will require a merge before they can be pushed or promoted to the parent stream. Overlap changes need to be handled singularly.
Missing Workspace Files
Files that have been deleted from the workspace but are present in the backing stream will appear here. This can happen if you delete the file from Visual Studio Code, from the file system but not from within AccuRev. You can restore the file to the workspace by right-clicking it then select Restore Missing Element (Populate). To remove the file from the workspace permanently select Remove from Accurev (Defunct) from the right-click menu.
Files in this section have a status of M (red) for Missing.
Work Items (AccuWork Issues)
Work Items which may also be known as Change Packages or AccuWork Issues are listed in the section entitled Work Items. If you are using Change Packages a list of available issues will display in this section.
Work Items allow you associate your changes to one or more files by assigning your changes to a Work Item when you Promote your changes. This makes it easy to track feature changes or bug fixes by grouping all files related to the change together as part of the Promote process. If your organization uses Change Packages you will be prompted to select a Work Item to promote your changes against.
This section has some tools to help manage the list of work items:
Search allows you to search through the Work Items displayed. The search is case-insensitive. When you click on the search icon a small popup window appears. Enter your search string. Matches for your search string will be highlighted. Click the filter icon to show only Work Items which match your search string. Click the X to dismiss the search popup and clear the filter.
Refresh Work Items allows you to check for new Work Items on the server.
You can also toggle between Show All Work Items and Show Selected Work Item.
When working in your workspace on a single Work Item select it then choose Show Selected Work Item. You will then only see the Work Item that you are currently addressing. When you have finished your work and are ready to Promote your changes you will not have to hunt through the list of available Work Items to select the right Work Item to Promote against. When the work for this item is complete and promoted stoggle back to Show All Work Items to find the next task you need to work on then repeat the process.
By default the Work Items are shown with the Issue number field followed by the shortDescription field. If you are using the default schema in AccuWork both of these fields will be available. You can customize the Work Items display by changing the title and by adding additional fields. Adding more fields will make the issues expandable so that you can see all fields you have specified.
To change or add a title to your Work Items
Open the Command Palette: select View - Command Palette from the menu or via Ctl-Shift-P
Select command AccuRev: Select AccuWork Issue field to display as Work Item title
Enter accurev in the input filter field to display only AccuRev options
Choose the field you want to use for the title of the issue
To reset to the default, open the ac_vsc_ws.cnf file within the .accurev directory of your workspace folder. Comment the line containing CPK_ISSUE_TITLE by inserting a # at the beginning of the line.
To display additional fields on Work Items
Open the Command Palette: select View - Command Palette from the menu or via Ctl-Shift-P
Select command AccuRev: Select AccuWork Issue fields to display
Choose the fields you want to display by checking each item. To select all items check the top checkbox.
To remove all additional fields, open the ac_vsc_ws.cnf file within the .accurev directory of your workspace folder. Comment the line containing CPK_FIELDS by inserting a # at the beginning of the line.
To change the order of the fields manually edit the ac_vsc_ws.cnf file line containing CPK_FIELDS to reflect the order you want.
File Actions
Action
Description
Add To AccuRev
The Add to AccuRev command is available for External files only. External files display in the Local Changes section with an attribute of E. To add a file to AccuRev right-click the file then choose Add To Accurev or simply click on the + icon that displays when hovering on an External file. Enter a comment then press Enter to add the file to your workspace. The file is added to AccuRev and kept which moves the file to the Workspace Changes.
Keep My Changes
The Keep My Changes command saves your changes in AccuRev. Keep My Changes is available for Modified files (attribute of M in blue). You may Keep files several times before promoting or pushing your changes to the parent stream. Once a file is kept it moves to the Workspace Changes section and is ready to be Promoted. To save (keep) changes to a file in AccuRev right-click the file then choose Keep My Changes or simply click on the + icon that displays when hovering on a Modified file.
Promote
The Promote command moves your Workspace Changes to the backing or parent stream. If your organization uses Change Packages you will need to select a Work Item to Promote against. Promote is available for files in Workspace Changes. If your organization uses Change Packages you will be prompted to select aWork Item if you have not already selected one in the Work Items section.
Revert To
The Revert command allows you to cancel changes you made on files in your workspace. For Workspace Changes, files that have already been kept at least once in your workspace you can Revert to Basis. This removes any changes made in your workspace and restores the file version from the backing stream. For Local Changes you can either Revert to Basis or Revert to Most Recent Version. Revert to Most Recent Version will discard unkept changes leaving you with the most recently kept version within your workspace. This version could be the basis version if you have not kept any changes to the file in your workspace.
Merge
If changes you have made in a file conflict with the current version of the file in the backing or parent stream the file will display in the Overlap Changes section. To resolve the conflict right-click the file then select Merge. At this point the AccuRev Merge window will display. Resolve the conflicts then save your results to complete the merge. A prompt will appear to allow you to Accept Merge or to Cancel the merge. Refer to AccuRev Help for details on how to use the merge UI.
Diff Against
Diff Against allows you to use the Visual Studio Code Diff Editor to compare two versions of a file. Refer to Visual Studio Code Help for details on how to select and use the diff editors. Diff Against Backed Version compares your workspace file version with the one in the backing or parent stream. Diff Against Most Recent Version compares your workspace file version with the most recently kept version. If you have not kept any changes the most recently kept version will be the backed version of the file.
Remove From AccuRev (Defunct)
If you want to remove a file you can delete the file from the file system. In the SCM viewlet the file you deleted will appear under Missing Workspace Files where you will have the option to Remove From AccuRev (Defunct). This command marks the file for deletion from Accurev and moves it to Workspace Changes with a status of D. Once you promote the defunct file it will be removed from the AccuRev backing stream.
Restore Missing Element (Populate)
If you deleted a file in error or you just want to restore the file, you can select Restore Missing Element (Populate) from the SCM viewlet to reload the file from AccuRev.
Open File
Open the file in the editor.
File States
Files in your workspace can have the following states which are indicated by a letter to the right of the file name in the Source Control section.
Symbol
Attribute
Description
K
Kept
File that has been saved in AccuRev and is under source control but the version is only available from within your workspace
M (blue)
Modified
File has been saved locally in your workspace but has not been saved in AccuRev
E
External
File in your workspace that has not been added to AccuRev
D
Defunct
File has been marked for removal from AccuRev. It will be removed once the file is promoted to the backing stream
O
Overlap
File in the backing stream has changed since you last updated your workspace and requires a merge before you can promote your changes
M (red)
Missing
Files that have been deleted from your workspace which still exist in the backing stream
Login Prompt
If you have not logged in to AccuRev or if your session expires a Login prompt will appear. Select the server you want to login to then press Enter. Enter your user name then your password when prompted. If login fails you will be prompted to login again.
You can display the AccuRev login prompt at any time by using Shift-Ctl-P or menu View - Command Palette then select AccuRev: Login to AccuRev.
Known Issues
To select an issue or Change Package select the issue number line and not a supplemental line which displays if you have customized the display of the CPK Issues (see CPK Issues for details).
Ability to do AccuRev rename of files and folders.