Download presentation
Presentation is loading. Please wait.
Published byMarybeth Cooper Modified over 9 years ago
1
With Mercurial and Progress
2
Introduction What is version control ? Why use version control ? Centralised vs. Distributed Why Mercurial ? Using Mercurial [with Progress] Examples / Demos Questions Overview
3
Julian Lyndon-Smith, dot.r limited Progress developer since v3 Fan of vcs since 1987 Developed, sold Boss (Progress-based vcs) Other vcs systems used include Roundtable ~1992-1994 SourceSafe ~1994-1998 Cvs ~1998-2004 Subversion ~2004-2011 Introduction
4
As developers, we write code that changes over time Bugs aka “feature” aka “undocumented behaviour” aka “works on my machine” New functionality Aka “we could charge for this” Better way of doing something aka “I want to play with this cool new tech” What is version control?
5
Everyone uses a version control system Just not the right one Copy foo.p foo.[x].p (where x=1 to … ) Modify foo.p What is version control?
6
Audit trail of changes Who did what, where, why and when ? Syncronization Share the same code between developers Backup Get any version of the file from any time Revert Throw away local changes Why use version control?
7
Centralised vcs checkout checkin checkout checkin checkout
8
Centralised vcs Centralized version control systems Cvs Source safe Rcs Subversion Single central copy of project / source (aka “repo”) Committing records changes into central repo Other developers see this change
9
Centralised vcs Workflow Pull changes from central repo Make changes Commit changes back to central repo Disadvantages Only “latest” copy of source available Need to be online / connected All changes to a file have to be in one changeset
10
Strengths Workflow is familiar to most developers Only one place for all source Trunk has latest version
11
Weaknesses Poor merging No offline commits Any commit is available to all users Working or not Breaks build servers Days or weeks between checkins Commits only apply to selected subdirectory and children (subversion)
12
Distributed vcs checkout checkin checkout checkin checkout checkin checkout QA RepoBuild Repo
13
Distributed vcs Distributed version control systems Mercurial Git Arcs Bazaar Multiple copies of all versions of project / source Committing records changes into local repo Other developers do not see this change Until pushed back to remote repo
14
Distributed vcs Workflow Clone repo Make changes Commit changes back to own repo Push changes up to remote repo Disadvantages None …
15
Strengths All repositories are equal Offline history Offline commit Less chance of merge conflicts “hidden” experimental branches
16
Weaknesses Who has the “latest” version ? Large Binary files Fixed in later releases Mindset
17
Why mercurial ? Boiled down to git or mercurial Git Poor documentation Complicated command lines Gui for eclipse did not work for me Mercurial Worked first time Gui worked first time Purely personal choice.
18
Using mercurial The basics
19
Using mercurial Download from http://http://mercurial.selenic.com/ http://http://mercurial.selenic.com/ Update settings
20
Using mercurial Download from http://http://mercurial.selenic.com/ http://http://mercurial.selenic.com/ Go to your source code directory hg init There’s now a.hg directory Now “add” the source files to the repository hg add Now commit the files to the repository hg commit
21
Using mercurial So, what happened in the repository ? hg log Shows the history of changes User, notes, changeset id and date In reverse order (latest first) Let’s make a change to a file ( h-BinCheck.p ) And commit it hg commit
22
Using mercurial Let’s see the log now hg log What were the changes ? hg diff –r0:1 h-BinCheck.p Let’s make more changes What is the status of my working directory ? hg status What were the changes ? hg diff
23
Using mercurial Don’t like what you see ? hg revert (creates.orig file) hg revert –no-backup (no.orig file)
24
Mercurial Repositories checkout checkin checkout checkin checkout checkin checkout QA RepoBuild Repo
25
Mercurial Repositories A “Central” repository is useful for Providing a master repo for QA Providing a convenient repo for cloning Hg serve Starts a webserver on port 8000 Allows a repo to be accessed by other developers Server or developer machine Generally LAN only
26
Mercurial Repositories Bitbucket http://bitbucket.org/ http://bitbucket.org/ Free for up to 5 users Built-in issue tracking Unlimited repositories (private / public) Available wherever there is an internet connection Demo: Create a new repository (pugus)
27
Creates a repository from another repository hg clone https://bitbucket.org/jmls/pugus pugushttps://bitbucket.org/jmls/pugus Inits the repo Downloads the entire repository Updates the working directory Add a new file, commit hg add hg commit Cloning
28
Repository changesets n/a [empty repository] Repo @ bitbucket 0 My initial version Repo @ my computer
29
Pushing changes Now we need to push changes up to remote repo hg push Rinse, repeat make another change “added comments” commit, push 0 My initial version Repo @ bitbucket 0 My initial version Repo @ my computer
30
Pushing changes Now we have hg push 1 Added comments 0 My initial version Repo @ bitbucket 1 Added comments 0 My initial version Repo @ my computer
31
Another developer.. Alice has been added to the dev team Needs to clone the repository hg clone 1 Added comments 0 My initial version Repo @ bitbucket 1 Added comments 0 My initial version Repo @ Alice 1 Added comments 0 My initial version Repo @ my computer
32
Multiple changes I add a new file Alice modifies readme.txt Both commit 2 Added install.txt 1 Added comments 0 My initial version Repo @ my computer 2 Added copyright message 1 Added comments 0 My initial version Repo @ Alice
33
Alice pushes Alice pushes to remote repo 2 Added copyright message 1 Added comments 0 My initial version Repo @ bitbucket 2 Added copyright message 1 Added comments 0 My initial version Repo @ Alice
34
I push I push to remote repo Fails. I need to get the updated changesets before I can push hg incoming Shows all changes hg pull Now there are 2 heads (mine and Alice’s) Working directory not updated
35
I push Merge the two heads hg merge Updates working directory hg commit hg push
36
Alice doesn’t have the latest version I push 4 merged changesets 3 Added install.txt 2 Added copyright message 1 Added comments 0 My initial version Repo @ bitbucket 4 Merged changesets 3 Added copyright message 2 Added install.txt 1 Added comments 0 My initial version Repo @ my computer 2 Added copyright message 1 Added comments 0 My initial version Repo @ Alice
37
Alice doesn’t have the latest version hg pull No merge needed, just update hg update Alice now has the latest version of the repository Alice pulls 4 Merged changesets 3 Added install.txt 2 Added copyright message 1 Added comments 0 My initial version Repo @ alice
38
General workflow pullupdate Make changes commitPullMergeTestCommitpush
39
Workbench demo
40
Help => Install new Software Mercurial Eclipse
41
Create new Progress project File => New=>Other Mercurial Eclipse
44
To create a Progress view on the project Select Project Properties Select Project Facets Select Openedge / GUI for.net Apply Now we have a progress project with a mercurial team No more command line ;) Mercurial Eclipse
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.