PGDM RBA CognitiveTechnologies SourceControl
PGDM RBA CognitiveTechnologies SourceControl
Cognitive Technologies
Source Control Self Study
G. N. Ramachandran
[email protected] +91-9740044711
Source Control Self Study
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 2
Introduction to Source Control
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 4
Benefits of source control systems..
Traceability
• Source control is also handy to keep track of which
version of the robot is currently in development, QA,
and production.
Collaboration
• Source control facilitates code review and allows
smooth cooperation with colleague developers
• Furthermore, if a new developer joins the team, they
can easily download the latest version of the project
and start immediately
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 6
Is source control really needed?
• While development without any source control is
possible, it is not recommended since it opens us/the
team up to extensive risk
• So, the real question is not whether to implement
source control in our development, but what kind of
source control system fits best for our needs?
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 7
Visualization of source control
• Imagine the source control as a safe place to
maintain versions of our robot
Third
Second Version
First Version
Version
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 8
3 immediate returns
We gain time
by better
We are bound Avoid losing collaboration
to make work due to with other
mistakes. Can conflicts / team
revert them overwrites members
easily
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 9
Source control in UiPath
• There are many kinds of source control systems
(centralized, distributed, etc.) which operate in a similar
but slightly different way
• There are three different systems that can be integrated
into UiPath (version 2019.3 and up): GIT, SVN, and TFS
• All three options have the same three basic
functionalities:
1. Copy a project from an existing repository.
2. Add the project to an existing repository.
3. Disconnecting the current project from the repository.
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 10
Source control in UiPath..
• After launching the UiPath studio, we navigate to the
Start Menu and click on the sub-item Team
• On this screen, we will see an overview of the supported
source control systems
• By default GIT is shown
• If we are familiar with SVN and TFS source control
systems, we can enable the same from under Settings |
Tools | Plugins and use the same for source control
• We are going to use GIT for our demonstration today
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 11
Using GIT for source control
• Create a new process and name it source_control
• GIT has two phases
• Init: First we need to initialize i.e. create this current
version
• Commit: And we can commit further changes / files
• Let us initialize GIT first
• Right click on the project name, go to Add to Source
Control menu and select GIT Init
• The project folder will be shown. Click on Select folder
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 12
Using GIT for source control..
• We will be shown the Commit Changes window showing all the
folders and files in the project folder
• This first commit is basically creating the first version / save point
for our project files
• Observe the folders with a preceding .: .settings , .tmh etc
• These are local to our project.
• Since settings, the object folder (.tmh) etc are our local settings, it
is not recommended to save those to the source control since it
may interfere with the settings of other team members in a team
environment if they take a full update of the project
• What we need to commit / save are only the Project UI
Descriptors, xaml files and the project
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 13
Using GIT for source control..
• Unselect the folders with preceding .: .settings, .tmh etc and ensure
that only the Project UI Descriptors, xaml files and project are selected
• Under commit message, give a message that best describes the
contents of this particular commit.
• Let us type “First version of the robot” as the commit message
• We can see two buttons: Commit and Push and Commit
• Git commit basically “records changes to the local repository” while
git push “updates remote refs along with associated objects”.
• So the first one is used in connection with our local repository, while
the latter one is used to interact with a remote repository, like a
version control server
• Now since we intend to save changes to the local repository maintain
the source control, let us click on Commit
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 14
Verifying source control
• We have thus created the first version of our project in GIT
• The first thing to notice is that a “P” icon has appeared at the name of our
project and when we modify files and save them, a pencil icon appears
next to it, indicating that the file has been modified compared to the
repository version
• When we now right click on the project folder, we can new context menu
options to manage the source have started appearing:
• Commit
• Push
• Pull (Rebase)
• Show History
• Undo
• Manage branches
• This confirms that source control has been enabled for this project
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 15
GIT Context Menu options
Option Description
Commit Commits current changes to the local GIT repository.
Push Pushes the current version onto the remote
repository.
Pull (rebase) Pulls remote files and rebases the current branch
Show History Opens the Show History window for comparing two
versions of the same file
Undo Opens the Undo Pending Changes window if the file
was not committed or pushed to the remote
repository
Manage Opens the GIT window with options for managing
Branches currently added branches
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 16
Committing a new version - Commiting new
/ modified files
• Add a new sequence named RegisterCustomer
• Go to main.xaml and drag and drop the RegisterCustomer
component to invoke the same from Main
• Right click on the project name and chose commit
• The Commit changes window will be shown
• We can see that the Commit changes window now shows the
new sequence Registercustomer.xaml along with the local
folders
• Observe that the option “Show Unversioned Files” is selected
by default
• And, if we unselect this option, nothing is being shown in the
Commit changes window
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 17
Unversioned files
• The Unversioned Files changelist shows all files that have been
added to your project, but that are not being tracked by GIT.
• In other words, unversioned files means newly added files that
are not already committed earlier by us to GIT
• If we uncheck this option, only those files that are earlier
committed to GIT and modified later will be shown
• Checking this option will show both new as well as modified
files
• Observe that main.xaml file is not being shown when we
uncheck the option “Show unversioned files”, even though
there is a modification of we invoking the RegisterCustomer
sequence from main.xaml
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 18
Unversioned files..
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 22
Adding some functionality
• Go to main.xaml
• Create a local variable “customer” with default
value of say “Daniel”
• Click on import arguments.
• Assign the value of the local variable customer to
the argument customername of the
RegisterCustomer workflow
• Save the files, run the robot and see the results
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 23
Committing the new changes
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 26
Revert to the latest save point..
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 27
Revert to the latest save point..
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 30
Installing Tortoise GIT
• Let us use Tortoise GIT as a third party tool for achieving this.
• Open chrome and search for tortoise git and open
https://tortoisegit.org/
• Click on download and download the 32-bit or 64-bit version
depending on whether our system type is 32-bit or 64-bit
• Note: In windows 10 PCs we can see the system type using the
option settings | System | about
• Right click on the downloaded file and chose install
• Install Tortoise GIT with default options
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 31
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 32
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 33
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 34
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 35
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 36
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 37
Installing Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 38
Using Tortoise GIT for revert
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 40
Reverting the changes that have been
already saved / committed..
• Open project folder, right click, chose Tortoise GIT and chose Show
log option
• We will see the same 4 versions that were earlier committed through
UiPath GIT in the Tortoise GIT log window
• Right click on the latest revision with message “Revised project
description” and chose the option “Revert change by this commit”
• We will get the Tortoise GIT confirmation popup asking us “Revert
the selected commit(s)?”
• Click Yes
• We will be shown the Tortoise GIT revisions reverted confirmation
window with 2 options Ok and Commit
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 41
Reverting the changes that have been
already saved / committed..
• If we click OK, the changes reverted from the latest revision will be
applied locally but it will not be committed
• Choosing commit will commit the revert as well to the repository
• Chose Commit
• The confirmation window will be shown.
• Chose commit in this window as well
• If the commit is successful, we will get a success message. Click
close
• Now we can see that the log shows the latest revision as “Revert –
Revised project description”
• If we click on the project.json file from the latest revert, it will show
the changes
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 42
Reverting the changes that have been
already saved / committed..
• We can see that the show history option from under UiPath GIT also
show this commit reverting the Revised project description earlier
committed
• If we see the project settings in UiPath, we may still see the
description as “Checking undo changes to project description”
without reflecting the revert by us to “Blank Process”
• In that case, close and open the project again to see the revert
reflected
• We have now seen how to revert a change already committed to
the repository through UiPath GIT, and not possible to revert using
the Undo Changes option, by using the third party tool Tortoise GIT
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 43
Thank You
Any Questions?
April 8, 2023 PGDM – RBA – Cognitive Technologies - Source Control Self Study Page 44