Mercurial SCM (Hg) Toomas Laasik

Total Page:16

File Type:pdf, Size:1020Kb

Mercurial SCM (Hg) Toomas Laasik Mercurial SCM (Hg) Toomas Laasik 1.06.2018 Mercurial Mercurial is a free, distributed source control management tool, like git Mercurial Mercurial is a free, distributed source control management tool, like git Philosophy and key points: ● Usability first, has consistent syntax and help Mercurial Mercurial is a free, distributed source control management tool, like git Philosophy and key points: ● Usability first, has consistent syntax and help ● Each command does one thing Mercurial Mercurial is a free, distributed source control management tool, like git Philosophy and key points: ● Usability first, has consistent syntax and help ● Each command does one thing ● History should be preserved Mercurial Mercurial is a free, distributed source control management tool, like git Philosophy and key points: ● Usability first, has consistent syntax and help ● Each command does one thing ● History should be preserved ● Works well on all major OSes, including Windows Mercurial Mercurial is a free, distributed source control management tool, like git Philosophy and key points: ● Usability first, has consistent syntax and help ● Each command does one thing ● History should be preserved ● Works well on all major OSes, including Windows ● Easy to install and configure. It just works Mercurial Mercurial is a free, distributed source control management tool, like git Philosophy and key points: ● Usability first, has consistent syntax and help ● Each command does one thing ● History should be preserved ● Works well on all major OSes, including Windows ● Easy to install and configure. It just works ● Extensible (but base version is often enough) Mercurial. Who uses it? Facebook ● Why? Because git had trouble handling huge repositories ● Facebook has its own extensions for Hg Mozilla Firefox ● 10+ million LOC Mercurial anatomy Hg repository consists of a working directory and .hg/ directory Working directory is a copy of the project's files at a given point in time plus uncommited edits (rev 2 is a parent of working directory) Mercurial anatomy .hgignore lists files that are not syntax: glob revisioned. Same as .gitignore *.sln Temp/* It is tracked as any other file site.cache Mercurial anatomy .hgtags relates revisions to given 85a9d168e7aa1cd2e... build_273 human readable tag names 16c18a4302b89afd2... build_305 It is tracked as any other file Mercurial anatomy Commit records state of the working directory relative to its parent in a new changeset (rev 4). That changeset will become new parent for working directory. Rev 4 is now a branch because “line of development diverged” Mercurial anatomy A changeset: ● is an atomic group of related changes to multiple files ● has a revision number and hash id ● has one or two parents (merge) Changeset without children is called a head, latest head is called a tip Mercurial anatomy Hg is a distribured SCM Each team member has their own cloned repository. Sometimes more than one No central repository is needed, but often it is convenient to have a passive central repository (eg BitBucket) https://homes.cs.washington.edu/~mernst/advice/version-control.html Tools Hg has CLI interface (hg <command> …) There are plugins to integrate Hg into all major IDEs: Eclipse, Visual Studio, IntelliJ, etc There are multiple standalone GUIs for Hg. One of them is TortoiseHg: ● hg CLI tool ● TortoiseHg Workbench ● Windows Shell extension ● TortoisePlink for SSH tunnel Tools. TortoiseHg Setup and config Install TortoiseHg ~/.hgrc or Mercurial.ini Edit user wide config and add [ui] username = Toomas Laasik <[email protected]> at least who you are (~/.hgrc) hg config --edit Each repository has its own .hg/hgrc file that has repo specific lines and can override parts of user config Setup and config Normally access to remote ~/.hgrc or Mercurial.ini private repo prompt you for [ui] password. It may be a good username = Toomas Laasik <[email protected]> idea to use keys instead ssh = tortoiseplink.exe -ssh -i "c:\keys\toomas.ppk" [extensions] strip = An actual config I use --> Workflows Workflow is a way how you, your team and others use SCM for a project. Some basic workflows (https://www.mercurial-scm.org/guide): ● Log keeping ● Lone developer with nonlinear history ● Separate features ● Sharing changes Many workflows can be mixed and matched. Each team usually has a custom workflow best suitable for them Log keeping workflow ● Use Case: Look back when you did which changes ● 1 developer, 1 local repo Very basic, this is here just to get accustomed to syntax Log keeping workflow hg init - create repo $ mkdir uthg/ $ cd uthg/ hg add <filename> - add $ echo Hello > hello.txt a file on the next commit. $ hg init Without filename all files $ hg add hello.txt are added $ hg commit -m "First commit" hg commit - commit $ hg log changes to default branch changeset: 0:f4d00ef06737 user: Toomas Laasik <[email protected]> hg log - show revision date: Tue May 29 21:47:54 2018 +0300 summary: First commit history Log keeping workflow hg status - show changes $ echo world >> hello.txt in the working directory $ echo Read this > README $ hg status Commit changes M hello.txt ? README $ hg commit Log keeping workflow hg status - show changes $ echo world >> hello.txt in the working directory $ echo Read this > README $ hg status Commit changes M hello.txt ? README $ hg commit Oops, forgot to add $ hg add README! --amend flag adding README lets you recommit last change $ hg commit --amend saved backup bundle to c:\work\uth... Log keeping workflow hg status - show changes $ echo world >> hello.txt in the working directory $ echo Read this > README $ hg status Commit changes M hello.txt ? README $ hg commit Oops, forgot to add $ hg add README! --amend flag adding README lets you recommit last change $ hg commit --amend saved backup bundle to c:\work\uth... There is also hg rollback Log keeping workflow hg diff - see changes $ echo asdasd >> hello.txt $ hg diff hg revert <filename> - diff -r 9fc99ad93c03 hello.txt reverts uncommited --- a/hello.txt Tue May 29 23:25:44 2018 +0300 +++ b/hello.txt Wed May 30 00:55:13 2018 +0300 changes. Creates backup @@ -1,2 +1,3 @@ file with orig extension Hello (disable with -C flag) world +asdasd $ hg revert hello.txt $ hg status ? hello.txt.orig $ rm *.orig Log keeping workflow hg cp <old> <new> $ hg cp hello.txt copy_of_hello.txt hg mv <old> <new> - $ hg mv hello.txt renamed_hello.txt copy or move file without $ hg summary loosing revision history. parent: 1:9fc99ad93c03 tip Don’t forget to commit! Added readme, changed hello branch: default hg summary - show commit: 1 renamed, 1 copied update: (current) working directory state $ hg commit -m “copy and rename” Log keeping workflow hg log -G - show revision $ hg log -G history with graph @ changeset: 2:4ca546cbe96a | tag: tip | user: Toomas Laasik <[email protected]> | date: Wed May 30 01:36:00 2018 +0300 | summary: copy and rename | o changeset: 1:9fc99ad93c03 | user: Toomas Laasik <[email protected]> | date: Tue May 29 23:25:44 2018 +0300 | summary: Added readme, changed hello | o changeset: 0:f4d00ef06737 user: Toomas Laasik <[email protected]> date: Tue May 29 21:47:54 2018 +0300 summary: First commit Lone developer with nonlinear history ● Use Case: Go back at times and work onward from there ● 1 developer, 1 local repo Basic, but shows how automatic anonymous branching and merging works. Lone developer with nonlinear history hg update <rev> - update ### continuing from code above working directory to $ hg update 1 changeset (needs clean $ echo Hello world! > hello.txt working directory) $ hg commit -m "Put hello on one line" created new head After commit we have two heads. Later on heads need to be merged or closed Lone developer with nonlinear history hg merge - merge working $ hg merge directory with another merging hello.txt and copy_of_hello.txt to copy_of_.. merging hello.txt and renamed_hello.txt to renamed_.. revision. 0 files updated, 2 files merged, 0 files removed, 0.. (branch merge, don't forget to commit) No conflicts. $ hg commit -m “Merge” Here no arguments are given, because there we are on one head and there is only exactly one other head. Lone developer with nonlinear history hg merge - merge working $ hg merge directory with another merging hello.txt and copy_of_hello.txt to copy_of_.. merging hello.txt and renamed_hello.txt to renamed_.. revision. 0 files updated, 0 files merged, 0 files removed, 2.. (branch merge, don't forget to commit) Merge conflicts! If hg couldn’t resolve them $ hg resolve --list automatically you need to somefile.txt do it manually, mark them (edit files listed to manually resolve conflicts or resolved and commit retry automatic resolving hg resolve somefile.txt) Nicer to do in GUI $ hg resolve --mark somefile.txt $ hg commit -m “Merge” Lone developer with nonlinear history hg merge - merge working $ hg merge directory with another merging hello.txt and copy_of_hello.txt to copy_of_.. merging hello.txt and renamed_hello.txt to renamed_.. revision. 0 files updated, 0 files merged, 0 files removed, 2.. (branch merge, don't forget to commit) Merge conflicts! If you can’t resolve conflicts or $ hg resolve --list just want to cancel merge, somefile.txt then update to some other (edit files listed to manually resolve conflicts or revision retry automatic resolving hg resolve somefile.txt) $ hg update --clean Lone dev... Merge conflict resolving in TortoiseHg Next: repo branches as TortoiseHg shows it Lone developer with nonlinear history Separate features ● Use Case: Work on several features in parallel ● 1 developer, many repos Each feature is kept and developed in cloned repo. In practice you can have many variations of it: ● stable, feature1, feature2, … ● stable, testing, features (Using named branches gives somewhat similar workflow) Separate features hg clone <src> <dst> - ### continuing from code above makes a clone of a repo. $ cd .
Recommended publications
  • Version Control 101 Exported from Please Visit the Link for the Latest Version and the Best Typesetting
    Version Control 101 Exported from http://cepsltb4.curent.utk.edu/wiki/efficiency/vcs, please visit the link for the latest version and the best typesetting. Version Control 101 is created in the hope to minimize the regret from lost files or untracked changes. There are two things I regret. I should have learned Python instead of MATLAB, and I should have learned version control earlier. Version control is like a time machine. It allows you to go back in time and find out history files. You might have heard of GitHub and Git and probably how steep the learning curve is. Version control is not just Git. Dropbox can do version control as well, for a limited time. This tutorial will get you started with some version control concepts from Dropbox to Git for your needs. More importantly, some general rules are suggested to minimize the chance of file losses. Contents Version Control 101 .............................................................................................................................. 1 General Rules ................................................................................................................................... 2 Version Control for Files ................................................................................................................... 2 DropBox or Google Drive ............................................................................................................. 2 Version Control on Confluence ...................................................................................................
    [Show full text]
  • Common Tools for Team Collaboration Problem: Working with a Team (Especially Remotely) Can Be Difficult
    Common Tools for Team Collaboration Problem: Working with a team (especially remotely) can be difficult. ▹ Team members might have a different idea for the project ▹ Two or more team members could end up doing the same work ▹ Or a few team members have nothing to do Solutions: A combination of few tools. ▹ Communication channels ▹ Wikis ▹ Task manager ▹ Version Control ■ We’ll be going in depth with this one! Important! The tools are only as good as your team uses them. Make sure all of your team members agree on what tools to use, and train them thoroughly! Communication Channels Purpose: Communication channels provide a way to have team members remotely communicate with one another. Ideally, the channel will attempt to emulate, as closely as possible, what communication would be like if all of your team members were in the same office. Wait, why not email? ▹ No voice support ■ Text alone is not a sufficient form of communication ▹ Too slow, no obvious support for notifications ▹ Lack of flexibility in grouping people Tools: ▹ Discord ■ discordapp.com ▹ Slack ■ slack.com ▹ Riot.im ■ about.riot.im Discord: Originally used for voice-chat for gaming, Discord provides: ▹ Voice & video conferencing ▹ Text communication, separated by channels ▹ File-sharing ▹ Private communications ▹ A mobile, web, and desktop app Slack: A business-oriented text communication that also supports: ▹ Everything Discord does, plus... ▹ Threaded conversations Riot.im: A self-hosted, open-source alternative to Slack Wikis Purpose: Professionally used as a collaborative game design document, a wiki is a synchronized documentation tool that retains a thorough history of changes that occured on each page.
    [Show full text]
  • Generating Commit Messages from Git Diffs
    Generating Commit Messages from Git Diffs Sven van Hal Mathieu Post Kasper Wendel Delft University of Technology Delft University of Technology Delft University of Technology [email protected] [email protected] [email protected] ABSTRACT be exploited by machine learning. The hypothesis is that methods Commit messages aid developers in their understanding of a con- based on machine learning, given enough training data, are able tinuously evolving codebase. However, developers not always doc- to extract more contextual information and latent factors about ument code changes properly. Automatically generating commit the why of a change. Furthermore, Allamanis et al. [1] state that messages would relieve this burden on developers. source code is “a form of human communication [and] has similar Recently, a number of different works have demonstrated the statistical properties to natural language corpora”. Following the feasibility of using methods from neural machine translation to success of (deep) machine learning in the field of natural language generate commit messages. This work aims to reproduce a promi- processing, neural networks seem promising for automated commit nent research paper in this field, as well as attempt to improve upon message generation as well. their results by proposing a novel preprocessing technique. Jiang et al. [12] have demonstrated that generating commit mes- A reproduction of the reference neural machine translation sages with neural networks is feasible. This work aims to reproduce model was able to achieve slightly better results on the same dataset. the results from [12] on the same and a different dataset. Addition- When applying more rigorous preprocessing, however, the per- ally, efforts are made to improve upon these results by applying a formance dropped significantly.
    [Show full text]
  • Introduction to Version Control with Git
    Warwick Research Software Engineering Introduction to Version Control with Git H. Ratcliffe and C.S. Brady Senior Research Software Engineers \The Angry Penguin", used under creative commons licence from Swantje Hess and Jannis Pohlmann. March 12, 2018 Contents 1 About these Notes1 2 Introduction to Version Control2 3 Basic Version Control with Git4 4 Releases and Versioning 11 Glossary 14 1 About these Notes These notes were written by H Ratcliffe and C S Brady, both Senior Research Software Engineers in the Scientific Computing Research Technology Platform at the University of Warwick for a series of Workshops first run in December 2017 at the University of Warwick. This document contains notes for a half-day session on version control, an essential part of the life of a software developer. This work, except where otherwise noted, is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Li- cense. To view a copy of this license, visit http://creativecommons.org/ licenses/by-nc-nd/4.0/. The notes may redistributed freely with attribution, but may not be used for commercial purposes nor altered or modified. The Angry Penguin and other reproduced material, is clearly marked in the text and is not included in this declaration. The notes were typeset in LATEXby H Ratcliffe. Errors can be reported to [email protected] 1.1 Other Useful Information Throughout these notes, we present snippets of code and pseudocode, in particular snippets of commands for shell, make, or git. These often contain parts which you should substitute with the relevant text you want to use.
    [Show full text]
  • Sistemas De Control De Versiones De Última Generación (DCA)
    Tema 10 - Sistemas de Control de Versiones de última generación (DCA) Antonio-M. Corbí Bellot Tema 10 - Sistemas de Control de Versiones de última generación (DCA) II HISTORIAL DE REVISIONES NÚMERO FECHA MODIFICACIONES NOMBRE Tema 10 - Sistemas de Control de Versiones de última generación (DCA) III Índice 1. ¿Qué es un Sistema de Control de Versiones (SCV)?1 2. ¿En qué consiste el control de versiones?1 3. Conceptos generales de los SCV (I) 1 4. Conceptos generales de los SCV (II) 2 5. Tipos de SCV. 2 6. Centralizados vs. Distribuidos en 90sg 2 7. ¿Qué opciones tenemos disponibles? 2 8. ¿Qué podemos hacer con un SCV? 3 9. Tipos de ramas 3 10. Formas de integrar una rama en otra (I)3 11. Formas de integrar una rama en otra (II)4 12. SCV’s con los que trabajaremos 4 13. Git (I) 5 14. Git (II) 5 15. Git (III) 5 16. Git (IV) 6 17. Git (V) 6 18. Git (VI) 7 19. Git (VII) 7 20. Git (VIII) 7 21. Git (IX) 8 22. Git (X) 8 23. Git (XI) 9 Tema 10 - Sistemas de Control de Versiones de última generación (DCA) IV 24. Git (XII) 9 25. Git (XIII) 9 26. Git (XIV) 10 27. Git (XV) 10 28. Git (XVI) 11 29. Git (XVII) 11 30. Git (XVIII) 12 31. Git (XIX) 12 32. Git. Vídeos relacionados 12 33. Mercurial (I) 12 34. Mercurial (II) 12 35. Mercurial (III) 13 36. Mercurial (IV) 13 37. Mercurial (V) 13 38. Mercurial (VI) 14 39.
    [Show full text]
  • Version Control – Agile Workflow with Git/Github
    Version Control – Agile Workflow with Git/GitHub 19/20 November 2019 | Guido Trensch (JSC, SimLab Neuroscience) Content Motivation Version Control Systems (VCS) Understanding Git GitHub (Agile Workflow) References Forschungszentrum Jülich, JSC:SimLab Neuroscience 2 Content Motivation Version Control Systems (VCS) Understanding Git GitHub (Agile Workflow) References Forschungszentrum Jülich, JSC:SimLab Neuroscience 3 Motivation • Version control is one aspect of configuration management (CM). The main CM processes are concerned with: • System building • Preparing software for releases and keeping track of system versions. • Change management • Keeping track of requests for changes, working out the costs and impact. • Release management • Preparing software for releases and keeping track of system versions. • Version control • Keep track of different versions of software components and allow independent development. [Ian Sommerville,“Software Engineering”] Forschungszentrum Jülich, JSC:SimLab Neuroscience 4 Motivation • Keep track of different versions of software components • Identify, store, organize and control revisions and access to it • Essential for the organization of multi-developer projects is independent development • Ensure that changes made by different developers do not interfere with each other • Provide strategies to solve conflicts CONFLICT Alice Bob Forschungszentrum Jülich, JSC:SimLab Neuroscience 5 Content Motivation Version Control Systems (VCS) Understanding Git GitHub (Agile Workflow) References Forschungszentrum Jülich,
    [Show full text]
  • Useful Tools for Game Making
    CMS.611J/6.073 Fall 2014 Useful Tools List This list is by no means complete, but should get you started. Talk to other folks in the class about their recommendations. Revision Control Version control software, provides backups and easy reversion. Perforce Mac/Win GUI (p4v): Heavily used in game http://www.perforce.com/dow industry. Commercial nloads/Perforce-Software-Ver software; you can use the sion-Management/complete_l Game Lab server. ist/Customer Subversion Command line: Open source, server-based http://subversion.apache.org/ Windows GUI: http://tortoisesvn.net/ Git Command line: Open source, distributed http://git-scm.com/ Mercurial Command line: Open source, distributed http://mercurial.selenic.com/ Windows GUI: http://tortoisehg.bitbucket.org/ SourceTree Mac/Win GUI: Not a source control system, http://www.sourcetreeapp.co just a GUI for Git and m/ Mercurial clients Revision Control Hosting SourceForge http://sourceforge.net/ git, mercurial, or subversion BitBucket https://bitbucket.org/ git or mercurial GitHub https://github.com/ git, has own (painful) GUI for Git 1 Image Editing MSPaint Windows, pre-installed Surprisingly useful quick pixel art editor (esp for prototypes) Paint.NET Windows, About as easy as MSPaint, but http://www.getpaint.net/download much more powerful .html Photoshop Mac, Windows New Media Center, 26-139 GIMP Many platforms, Easier than photoshop, at http://www.gimp.org/downloads/ least. Sound GarageBand Mac New Media Center, 26-139 Audacity Many platforms, Free, open source. http://audacity.sourceforge.ne
    [Show full text]
  • Colors in Bitbucket Pull Request
    Colors In Bitbucket Pull Request Ligulate Bay blueprints his hays craving gloomily. Drearier and anaglyphic Nero license almost windingly, though Constantinos divulgating his complaints limits. Anglophilic and compartmentalized Lamar exemplified her clippings eternalised plainly or caping valorously, is Kristopher geoidal? Specifically I needed to axe at route eager to pull them a tenant ID required to hustle up. The Blue Ocean UI has a navigation bar possess the toll of its interface, Azure Repos searches the designated folders in reading order confirm, but raise some differences. Additionally for GitHub pull requests this tooltip will show assignees labels reviewers and build status. While false disables it a pull. Be objective to smell a stride, and other cases can have? Configuring project version control settings. When pulling or. This pull list is being automatically deployed with Vercel. Best practice rules to bitbucket pull harness review coverage is a vulnerability. By bitbucket request in many files in revision list. Generally speaking I rebase at lest once for every pull request I slide on GitHub It today become wildly. Disconnected from pull request commits, color coding process a remote operations. The color tags option requires all tags support. Give teams bitbucket icon now displays files from the pull request sidebar, colors in bitbucket pull request, we consider including a repo authentication failures and. Is their question about Bitbucket Cloud? Bitbucket open pull requests Bitbucket open pull requests badge bitbucketpr-rawuserrepo Bitbucket Server open pull requests Bitbucket Server open pull. Wait awhile the browser to finish rendering before scrolling. Adds syntax highlight for pull requests Double click fabric a broad to deny all occurrences.
    [Show full text]
  • Create a Pull Request in Bitbucket
    Create A Pull Request In Bitbucket Waverley is unprofitably bombastic after longsome Joshuah swings his bentwood bounteously. Despiteous Hartwell fathomsbroaches forcibly. his advancements institutionalized growlingly. Barmiest Heywood scandalize some dulocracy after tacit Peyter From an effect is your own pull remote repo bitbucket create the event handler, the bitbucket opens the destination branch for a request, if i am facing is Let your pet see their branches, commit messages, and pull requests in context with their Jira issues. You listen also should the Commits tab at the top gave a skill request please see which commits are included, which provide helpful for reviewing big pull requests. Keep every team account to scramble with things, like tablet that pull then got approved, when the build finished, and negotiate more. Learn the basics of submitting a on request, merging, and more. Now we made ready just send me pull time from our seven branch. Awesome bitbucket cloud servers are some nifty solutions when pull request a pull. However, that story ids will show in the grasp on all specified stories. Workzone can move the trust request automatically when appropriate or a percentage of reviewers have approved andor on successful build results. To cost up the webhook and other integration parameters, you need two set although some options in Collaborator and in Bitbucket. Go ahead but add a quote into your choosing. If you delete your fork do you make a saw, the receiver can still decline your request ask the repository to pull back is gone. Many teams use Jira as the final source to truth of project management.
    [Show full text]
  • DVCS Or a New Way to Use Version Control Systems for Freebsd
    Brief history of VCS FreeBSD context & gures Is Arch/baz suited for FreeBSD? Mercurial to the rescue New processes & policies needed Conclusions DVCS or a new way to use Version Control Systems for FreeBSD Ollivier ROBERT <[email protected]> BSDCan 2006 Ottawa, Canada May, 12-13th, 2006 Ollivier ROBERT <[email protected]> DVCS or a new way to use Version Control Systems for FreeBSD Brief history of VCS FreeBSD context & gures Is Arch/baz suited for FreeBSD? Mercurial to the rescue New processes & policies needed Conclusions Agenda 1 Brief history of VCS 2 FreeBSD context & gures 3 Is Arch/baz suited for FreeBSD? 4 Mercurial to the rescue 5 New processes & policies needed 6 Conclusions Ollivier ROBERT <[email protected]> DVCS or a new way to use Version Control Systems for FreeBSD Brief history of VCS FreeBSD context & gures Is Arch/baz suited for FreeBSD? Mercurial to the rescue New processes & policies needed Conclusions The ancestors: SCCS, RCS File-oriented Use a subdirectory to store deltas and metadata Use lock-based architecture Support shared developments through NFS (fragile) SCCS is proprietary (System V), RCS is Open Source a SCCS clone exists: CSSC You can have a central repository with symlinks (RCS) Ollivier ROBERT <[email protected]> DVCS or a new way to use Version Control Systems for FreeBSD Brief history of VCS FreeBSD context & gures Is Arch/baz suited for FreeBSD? Mercurial to the rescue New processes & policies needed Conclusions CVS, the de facto VCS for the free world Initially written as shell wrappers over RCS then rewritten in C Centralised server Easy UI Use sandboxes to avoid locking Simple 3-way merges Can be replicated through CVSup or even rsync Extensive documentation (papers, websites, books) Free software and used everywhere (SourceForge for example) Ollivier ROBERT <[email protected]> DVCS or a new way to use Version Control Systems for FreeBSD Brief history of VCS FreeBSD context & gures Is Arch/baz suited for FreeBSD? Mercurial to the rescue New processes & policies needed Conclusions CVS annoyances and aws BUT..
    [Show full text]
  • INF5750/9750 - Lecture 1 (Part III) Problem Area
    Revision control INF5750/9750 - Lecture 1 (Part III) Problem area ● Software projects with multiple developers need to coordinate and synchronize the source code Approaches to version control ● Work on same computer and take turns coding ○ Nah... ● Send files by e-mail or put them online ○ Lots of manual work ● Put files on a shared disk ○ Files get overwritten or deleted and work is lost, lots of direct coordination ● In short: Error prone and inefficient The preferred solution ● Use a revision control system. RCS - software that allows for multiple developers to work on the same codebase in a coordinated fashion ● History of Revision Control Systems: ○ File versioning tools, e.g. SCCS, RCS ○ Central Style - tree versioning tools. e.g. CVS ○ Central Style 2 - tree versioning tools e.g. SVN ○ Distributed style - tree versioning tools e.g. Bazaar ● Modern DVCS include Git, Mercurial, Bazaar Which system in this course? ● In this course we will be using GIT as the version control system ● We will use the UIO git system, but you can also make git accounts on github.com or bitbucket for your own projects ● DHIS2 uses a different system: Launchpad/Bazaar How it works Working tree: Local copy of the source code Repository: residing on the Central storage of developer’s the source code at computer (a client) a server synchronize synchronize Commit Commit locally Centralized De-centralized The repository Central ● Remembers every change ever written to it (called commits) ● You can have a central or local repository. ○ Central = big server in
    [Show full text]
  • Darcs 2.0.0 (2.0.0 (+ 75 Patches)) Darcs
    Darcs 2.0.0 (2.0.0 (+ 75 patches)) Darcs David Roundy April 23, 2008 2 Contents 1 Introduction 7 1.1 Features . 9 1.2 Switching from CVS . 11 1.3 Switching from arch . 12 2 Building darcs 15 2.1 Prerequisites . 15 2.2 Building on Mac OS X . 16 2.3 Building on Microsoft Windows . 16 2.4 Building from tarball . 16 2.5 Building darcs from the repository . 17 2.6 Building darcs with git . 18 2.7 Submitting patches to darcs . 18 3 Getting started 19 3.1 Creating your repository . 19 3.2 Making changes . 20 3.3 Making your repository visible to others . 20 3.4 Getting changes made to another repository . 21 3.5 Moving patches from one repository to another . 21 3.5.1 All pulls . 21 3.5.2 Send and apply manually . 21 3.5.3 Push . 22 3.5.4 Push —apply-as . 22 3.5.5 Sending signed patches by email . 23 3.6 Reducing disk space usage . 26 3.6.1 Linking between repositories . 26 3.6.2 Alternate formats for the pristine tree . 26 4 Configuring darcs 29 4.1 prefs . 29 4.2 Environment variables . 32 4.3 General-purpose variables . 33 4.4 Remote repositories . 34 3 4 CONTENTS 4.5 Highlighted output . 36 4.6 Character escaping and non-ASCII character encodings . 36 5 Best practices 39 5.1 Introduction . 39 5.2 Creating patches . 39 5.2.1 Changes . 40 5.2.2 Keeping or discarding changes . 40 5.2.3 Unrecording changes .
    [Show full text]