// Module 3: Workspace Fundamentals - Assessment Quiz // Perforce Basic User Training // Import this file into Moodle using the GIFT format $CATEGORY: $module$/top/Workspaces // [tag:Basic-Level] ::Q1 What is a Perforce workspace::What is a Perforce workspace?{ ~A folder on the Perforce server where all files are stored =A mapping between files on the server and a location on your local machine ~A backup copy of the depot ~A temporary cache for deleted files ####[markdown]The files in one or more locations on the server may be mapped to the **workspace view**. This permits the workspace to contain all the files necessary for development even if they reside in multiple places on the server. } // [tag:Basic-Level] ::Q2 What does the workspace root define::What does the workspace root define?{ ~The location of the Perforce server ~The highest-level directory in the depot =The directory on your local machine where the workspace file tree will be stored ~The administrator's main directory ####The workspace root is often best kept to a simple short path such as: "C:\p4ws". The workspace files ( tree ) will be located beneath this location, so a simple short path keeps the total path length manageable. } // [tag:Basic-Level] ::Q3 Which of the following workspace options would you use to improve sync and submit over large distances to the server::Which of the following workspace options would you use to improve sync and submit over large distances to the server ?{ ~NoCompress =Compress ~Modtime ~Rmdir #####The compress option often help speed up transfers over long distance Wide-Area-Networks (WAN) links. When operating with a local connection to the server , NoCompress is often more helpful since it reduces CPU usage. } // [tag:Basic-Level] ::Q4 When you create a workspace, what must be unique::When you create a workspace, what must be unique?{ ~The workspace root location =The workspace name ~The depot path being mapped ~The user's password ####The workspace name is visible to all users globally on a P4 instance, so this workspace name must be unique across all users or it might conflict with another users workspace. } // [tag:Basic-Level] ::Q5 What happens to local files when you delete a workspace::What happens to local files when you delete a workspace?{ ~They are automatically deleted from your hard drive ~They are moved to the Perforce server =They remain on your local machine but are no longer tracked by Perforce ~They are permanently lost and cannot be recovered ####[markdown] Workspace files are generally only touched when you do the following \: \n * **Sync** files, e.g. *p4 sync* * **Remove from client**, e.g. *p4 sync #none \n So simiply removing the workspace does not affect the files within. } // [tag:Basic-Level] ::Q6 Which workspace view mapping would include all files and directories beneath the depot path "//depot/project/" to your local workspace::Which workspace view mapping would include all files and directories beneath the depot path "//depot/project/" to your local workspace?{ ~//depot/project/*.* //clientname/project/*.* =//depot/project/... //clientname/project/... ~//depot/project/ //clientname/project/ ~//depot/project/* //clientname/project/* #### The wildcard "..." refers to all files and directories beneath. } // [tag:Basic-Level] ::Q7 What does the "..." symbol represent in a workspace mapping::What does the "..." symbol represent in a workspace mapping?{ ~Exactly three files ~Hidden files only =Recursive inclusion of all files and subdirectories ~Files waiting to be submitted #### The wildcard "..." refers to all files and directories beneath. } // [tag:Basic-Level] ::Q8 Can you have multiple workspaces on the same computer::Can you have multiple workspaces on the same computer?{ ~No, only one workspace is allowed per computer ~Yes, but they must all share the same workspace root =Yes, and each can have different workspace roots and views ~Only if you're an administrator # Multiple workspaces are common to allow simultaneous work on multiple projects. Even with a single project , multiple workspaces are required to check-out the same files for different tasks at the same time. } // [tag:Basic-Level] ::Q9 What is the relationship between server files and local files in a workspace::What is the relationship between server files and local files in a workspace?{ ~They are always identical =Server files are the authoritative version; local files are your working copies ~Local files are the authoritative version; server files are backups ~There is no relationship between them #### Before submit, only your workspace has those local changes, after submit, the changes are on the server and available to other folks to sync your changes. } // [tag:Basic-Level] ::Q10 Which statement about workspace mappings is TRUE::Which statement about workspace mappings is TRUE?{ ~You can only map one depot path per workspace ~Mappings cannot be changed after workspace creation =You can exclude specific paths using exclusionary (-) mappings ~All workspaces must map the entire depot #### Exclusionary mappings are often used when you want to included most files in a path, but only exclude one or a few paths. } // [tag:Basic-Level] ::Q11 What information does Perforce NOT require when creating a new workspace::What information does Perforce NOT require when creating a new workspace?{ ~Workspace name ~Workspace root directory ~Server connection details =Your email ####The workspace has an owner which default to the person creating the workspace. The owner record has an associated email, but you do not need to mention it. } // [tag:Basic-Level] ::Q12 If your workspace root is "C\:/MyWork" and you have a mapping "//depot/main/... //myworkspace/main/...", where will the file "//depot/main/src/code.c" appear locally::If your workspace root is "C\:/MyWork" and you have a mapping "//depot/main/... //myworkspace/main/...", where will the file "//depot/main/src/code.c" appear locally?{ ~C\:/MyWork/src/code.c =C\:/MyWork/main/src/code.c ~C\:/MyWork/depot/main/src/code.c ~C\:/main/src/code.c ####[markdown] The workspace name "//myworkspace", is replaced with the *workspace root* ( C\:/MyWork ) then the */main* path exists in both locations, then the remaining tree is traversed src/code.c } // [tag:Basic-Level] ::Q13 What is the primary purpose of having a workspace in Perforce::What is the primary purpose of having a workspace in Perforce?{ ~To create a permanent backup of all depot files =To provide an isolated area where you can work on files without affecting others ~To restrict access to certain depot areas ~To improve server performance ####The workspace also helps you associate related files together with the reason for their change , e.g. the Changelist description. } // [tag:Basic-Level] ::Q14 Before you can edit files in your workspace, what must you typically do first::Before you can edit files in your workspace, what must you typically do first?{ ~Delete the workspace and create a new one =Sync the files from the server to your local workspace ~Restart the Perforce server ~Create a new user account #### Generally workspaces are created empty ( especially when they are very large ) then synced to obtain all the working files locally. } // [tag:Basic-Level] ::Q15 Which of the following is a best practice when naming your workspace::Which of the following is a best practice when naming your workspace?{ ~Use special characters like @#$% for uniqueness =Use a descriptive name that indicates the user/machine/purpose ~Always use the word "workspace" in the name ~Keep the name as short as possible, preferably one character ####P4V visual client follows this convention for the most part and automatically suggest a workspace name. However, P4 command-line does not provide any hints for the workspace name and you must fill in a unique name yourself. }