Mid-resolution InfRAreD Astronomical Spectrograph

Similar documents
Hg Tutorial. For : COP Object oriented Programming (Using C++) Biswas Parajuli

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Task-Oriented Solutions to Over 175 Common Problems. Covers. Eclipse 3.0. Eclipse CookbookTM. Steve Holzner

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

1 Installation (briefly)

Software Development I

2 Initialize a git repository on your machine, add a README file, commit and push

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

Understanding Acrobat Form Tools

Programming with Haiku

Make sure to mark it private. Make sure to make it a Mercurial one and not a Git one.

Software Revision Control for MASS. Git Installation / Configuration / Use

Hg Mercurial Cheat Sheet

Intro to Linux & Command Line

Development in code_aster Using Mercurial. Code_Aster, Salome-Meca course material GNU FDL licence (

CSC 2700: Scientific Computing

USING DRUPAL. Hampshire College Website Editors Guide

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Submitting your Work using GIT

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

1. Welcome. (1) Hello. My name is Dr. Christopher Raridan (Dr. R). (3) In this tutorial I will introduce you to the amsart documentclass.

Section 1 Microsoft Excel Overview

Chapter 3. Revision Control

AMS 200: Working on Linux/Unix Machines

TDDC88 Lab 4 Software Configuration Management

Using the Zoo Workstations

About CVS. 1 Version Control - what is it? why is it useful?

EVERY NATION OUTLOOK WEB ACCESS (OWA) USER S GUIDE

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

Git: Distributed Version Control

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Creating Pages with the CivicPlus System

Getting ready for L A TEX. Alexis Dimitriadis. Version: March 28, 2013

MICROSOFT WORD 2010 Quick Reference Guide

Portions adapted from A Visual Guide to Version Control. Introduction to CVS

Version control CSE 403

And check out a copy of your group's source tree, where N is your one-digit group number and user is your rss username

AccuBridge for IntelliJ IDEA. User s Guide. Version March 2011

Unix Tutorial Haverford Astronomy 2014/2015

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

9 and 11-Jan CSCI 4152/6509 Natural Language Processing Lab 1: FCS Computing Environment, SVN Tutorial. FCS Computing Environment, SVN Tutorial

Warmup. A programmer s wife tells him, Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

STAT 625: Statistical Case Studies

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

CpSc 1111 Lab 1 Introduction to Unix Systems, Editors, and C

Manual one2edit Version April 2015

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Version control CSE 403

Git & Github Fundamental by Rajesh Kumar.

Revision Control and GIT

COMMUNITIES USER MANUAL. Satori Team

Lab #2 Physics 91SI Spring 2013

CS 261 Recitation 1 Compiling C on UNIX

TYPO3 Editing Guide Contents

Version control CSE 403

1. Git. Robert Snapp

In the fourth unit you will learn how to upload and add images and PDF files.

CSE 391 Lecture 9. Version control with Git

Web Site Documentation Eugene School District 4J

Where Did My Files Go? How to find your files using Windows 10

Object Oriented Programming. Week 1 Part 2 Git and egit

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

USER GUIDE. MADCAP FLARE 2017 r3. Source Control: Git

CS108, Stanford Handout #37. Source Control CVS

Introduction to Version Control

15-122: Principles of Imperative Computation

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han

Eugene, Niko, Matt, and Oliver

USER GUIDE MADCAP LINGO Source Control: Git

Cancer Waiting Times. Getting Started with Beta Testing. Beta Testing period: 01 February May Copyright 2018 NHS Digital

Storing and Managing Code with CVS

From: Sudarshan N Raghavan (770)

Linux File System and Basic Commands

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Eclipse Plug-in for AccuRev User s Guide Version April 2012

Introduction to Linux

CSE 331 Software Design & Implementation

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Lab Objective. Lab Assignment. Downloads and Installation

Interface. 2. Interface Adobe InDesign CS2 H O T

RSARTE Git Integration

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

Git, the magical version control

USER GUIDE MADCAP FLARE Project Creation

CS Fundamentals of Programming II Fall Very Basic UNIX

Introduction. SSH Secure Shell Client 1

Fundamentals of Git 1

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

Git: Distributed Version Control

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at

OUTLOOK WEB ACCESS (OWA) USER S GUIDE. Exchange 2003 Version - OWA Guide

CSE 374 Programming Concepts & Tools. Hal Perkins Winter 2012 Lecture 16 Version control and svn

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

Assumptions. GIT Commands. OS Commands

Product Overview. All text and design is copyright 2009 Seavus, All rights reserved

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Transcription:

Mirada (transl., Spanish feminine noun): A look or gaze, especially one of particular meaning or interest. Mid-resolution InfRAreD Astronomical Spectrograph Workflows for the Final Design Report S. N. Raines On behalf of the MIRADAS Consortium 2015-02-11 mi_063_001_fdrd-workflows Processed: 2015-02-11 at 17:10 hg tag «1.A» for changeset

Colophon Comment About Printing This document s native paper size is ISO 216 A4. However, the margins are set such that the document may be printed to US letter paper with 100% scaling (Page Scaling = None in Adobe Reader) with Auto-Rotate and Center enabled. Please print at full scale on either paper sizes for best legibility! Document Construction Information This document was created with pdflatex, available in current up-to-date latex distributions (specifically TeX Live). The memoir document class was used; this class provides a number of carefully-designed document structures. Examples in the class manual showed how to produce a document which should fit on both US Letter and A4 papers. Tracking information The files for this document are tracked with Mercurial, and the currently assigned tag should be on the cover page. Mercurial hgtag: «1.A» for changeset.

Full Contents Full Contents List of Figures Revisions Mercurial Commands Reference Basic commands...................................... Example command line hg sequence.......................... iii iv v vii vii viii 1 Hg and LATEX workflows for the FDRD 1 1.1 Preliminary setups................................. 3 1.2 Make edits on laptops, and create PDF..................... 3 1.2.1 Mac edits with Texshop.......................... 4 1.2.2 Windows edits with TeXworks..................... 4 1.3 Commit changes to laptop sandbox....................... 4 1.3.1 Linux or Mac sandbox commits..................... 4 1.3.2 Windows laptop commits........................ 7 1.4 Backup laptop sandbox changes to instlab sandboxes........... 8 1.4.1 Connect to the VPN, if needed..................... 8 1.4.2 Linux or Mac backup to instlab................... 8 1.4.3 Windows backup to instlab...................... 9 1.5 Acquire changes from another s instlab sandbox.............. 10 1.6 Acquire changes from your instlab sandbox to your laptop........ 10 1.6.1 Linux or Mac pull from instlab.................... 11 1.6.2 Windows pull from instlab...................... 11 1.7 Merging....................................... 11 1.8 Useful Linux commands.............................. 12 iii

List of Figures 1.1 Mercurial tracked directories............................. 2 1.2 Texshop windows................................... 5 1.3 Texshop menu bar................................... 6 1.4 Texshop console.................................... 6 1.5 TeXworks windows.................................. 13 1.6 Tortoisehg Workbench................................ 14 1.7 Tortoisehg buttons for different views of the repository.............. 15 1.8 Tortoisehg synchronization sub windows..................... 15 1.9 Tortoisehg push and pull buttons.......................... 15 1.10 Tortoisehg Workbench commit sub window.................... 16 1.11 Tortoisehg detect outgoing changes........................ 17 iv

Revisions Tag Who Date Description «1.A» S. N. Raines 2014-02-11 Initial draft. «initial» S. N. Raines 2014-02-04 Initial LATEX templates, no real content. Notes The files for this document are tracked with Mercurial. v

Mercurial Commands Reference Basic commands From the command line, typing hg with no arguments will print out the basic command set, with a brief one line description: chalion:msdn_063_fdr_doc_workflows raines$ hg Mercurial Distributed SCM basic commands: add annotate clone commit diff export forget init log merge pull push remove serve status summary update add the specified files on the next commit show changeset information by line for each file make a copy of an existing repository commit the specified files or all outstanding changes diff repository (or selected files) dump the header and diffs for one or more changesets forget the specified files on the next commit create a new repository in the given directory show revision history of entire repository or files merge working directory with another revision pull changes from the specified source push changes to the specified destination remove the specified files on the next commit start stand-alone webserver show changed files in the working directory summarize working directory state update working directory (or switch revisions) use "hg help" for the full list of commands or "hg -v" for details Note, if you use the graphlog extension 1 you can replace log with glog it is more useful. 1. See nraines/.hgrc for an example. vii

Mercurial Commands Reference Example command line hg sequence Here s a listing of commands, in a sequence that Nick usually uses from the command line on barrayar, to pull changes from his laptop (chalion): hg sum Tells you if you are at the tip or elsewhere. hg stat If there are no changes this returns nothing. hg glog -Gl2 This will return the graph for the last two commits: @ changeset: 4:4b16fbbcb841 tag: tip user: Nick Raines <raines@astro.ufl.edu> date: Mon Feb 09 16:43:54 2015-0500 summary: Worked on laptop commits, added figures for Tortoisehg. o changeset: 3:893b0b8842f9 user: Nick Raines <raines@astro.ufl.edu> date: Fri Feb 06 17:57:03 2015-0500 summary: More work on workflows with hg commits. Note the @ symbol shows the repository is at the most recent version, the tip. hg incoming -stat -bundle incoming.hg ssh://raines@chalion// Users/raines/«rest of path» Note the two instances of double // marks they are required. You ll need to enter your password on the machine. Note the two double slashes are required with ssh. And the incoming changeset will be bundled into the file incoming.hg hg incoming -p incoming.hg Will allow you to see all of the differences in each file before accepting the changes (I don t always execute this command). Note, if you have added images for figures, this will not be so useful!. hg pull incoming.hg Pulls the changes into the repository, but note you are no longer at the tip! You need to update: hg update Read the messages carefully. When pulling changes on instlab from other s sandboxes, it may state viii / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

Example command line hg sequence that it needs to merge try what it states it usually works. If you have any questions, contact Nick. If the update appears to have succeeded, now if you re-execute hg blog -Gl2 you ll find yourself at the most recently imported set of changes. hg merge Only if needed. hg tags See if there are any newly tagged versions. Now compile the document to PDF on the Linux host: pdflatex MIRADAS_Final_Design_0018_001.tex mi_063_001_fdrd-workflows; hg tag: «1.A» ix / 17

1 Hg and LATEX workflows for the FDRD This document attempts to summarize workflows used in the creation of the MIRADAS Final Design Report document (FDRD). Multiple people will work on different sections of this document, most likely Steve, Claudia, Veronica, and Nick. The document will be written in the typesetting language L A TEX. The goal is to track and share the changes made by each of us using Mercurial (hg), a distributed version control system tool. Mercurial can be used on the department Linux computers, on Macs, and on Windows 7 machines 1,2. When using Mercurial on a project, it keeps all of the files within the project in a hidden repository, or store; it tracks changes to files, and notably it distributes the entire project, i.e. all files within the project, to those wanting a copy. The FDRD will thus be worked on in parallel by multiple people at the same time. The key aspect of Mercurial is that we can communicate changes back and forth between us; Mercurial keeps track of which files are different so you don t have to keep track of them yourself. For security purposes, I will create a Master repository on instlab from which anyone may obtain (i.e. pull) changes, but only I, or maybe Steve, may push updates to the Master repository. You should always be able to work out of the sandbox directories on instlab, and indeed that would be safest, as it is backed up daily. But more likely you will want to work from your laptop sandboxes. The key is to every day, possibly several times a day, log into your Linux accounts and pull the laptop s changes to the Linux sandboxes. The suggested layout is shown in Figure 1.1 (page 2). The workflow will be 1. Setup workspaces 2. Email what chapters or sections you ll be working on (suggested) 3. First see if Linux sandboxes detect changes from other team members (could be funneled through the Master by Nick) 4. Pull incoming changes from others to Linux sandbox 5. Pull incoming changes from Linux sandbox to your laptop 6. Edit on laptop 7. Commit changes to laptop hg sandbox 1. At least those are the ones I have successfully used SNR. 2. I will need to assist everyone with setting up hg to work from your Linux accounts and from your laptops. 1

1. Hg and L A TEX workflows for the FDRD «Master:/astro/data/instlab/INST_GROUP/PROJECTS/MIRADAS/Documents/MI_staging/» MI_0012_Common_master/, MI_0014_FPRD_wFPRs_master/, MI_0018_FDRD_master/ pull push pull pull pull «HVD : instlab» «CSV : instlab» «SSE : instlab» «SNR : instlab» hvd_mi_0012_common/ hvd_mi_0014_fprd_wfprs/ hvd_mi_0018_fdrd/ csv_mi_0012_common/ csv_mi_0014_fprd_wfprs/ csv_mi_0018_fdrd/ sse_mi_0012_common/ sse_mi_0014_fprd_wfprs/ sse_mi_0018_fdrd/ snr_mi_0012_common/ snr_mi_0014_fprd_wfprs/ snr_mi_0018_fdrd/ «HVD : Mac» «CSV : laptop» «SSE : laptop» «SNR : Mac» hvd_mi_0012_common/ hvd_mi_0014_fprd_wfprs/ hvd_mi_0018_fdrd/ csv_mi_0012_common/ csv_mi_0014_fprd_wfprs/ csv_mi_0018_fdrd/ sse_mi_0012_common/ sse_mi_0014_fprd_wfprs/ sse_mi_0018_fdrd/ snr_mi_0012_common/ snr_mi_0014_fprd_wfprs/ snr_mi_0018_fdrd/ Figure 1.1. A diagram showing the Master directories, and personal sandbox directories on instlab, and on personal laptops. Everyone can pull changes from the Master directories, and from each other. Only Nick, and maybe Steve, can push or pull new updates into the Masters. Note, the sandbox names are suggestions only they may be anything. 2 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.1. Preliminary setups 8. Push or pull changes to Linux sandbox 9. Email team that changes exist to pull into their Linux and laptop sandboxes 1.1 Preliminary setups We need to setup TeXLive and hg for everyone: 1. Setup software hg setup on Linux hosts TeXLive setup on Linux hosts hg setup on laptops TeXLive setup on laptops Putty setup on Windows laptops 2. Setup sandboxes Clone Master directories to Linux sandboxes Clone Linux sandboxes to laptops 1.2 Make edits on laptops, and create PDF We will use the tool pdflatex to create PDF documents from source files that are simple text files. A key feature is that the source files are written in a markup language, i.e. you indicate what is a Chapter, a Section, or a list, etc., but a separate style file configures how the final appearance of the document. There several different editors that will be used for updating the FDRD, depending on the computer platform: Linux Mac Windows 7/8 Emacs TeXShop TeXworks When writing new sentences, or modifying existing text, only hit return after a period. Do not reformat existing text, if not changing the content! A single sentence is the fundamental atom of thought; Mercurial will report changes on a line by line basis, i.e. by each full sentence if it is hard-wrapped after each period. The Texshop and Texworks editors will wrap any sentence that is longer than the editor window, by wrapping the sentence at a space between words. Emacs 23 and higher 3 has an Option to configure this wrapping; look for Line Wrapping in this Buffer -> Word Wrap (Visual Line mode), so editing the text should be just as readable as with the other tools. 3. My desktop, barryyar is running RedHatEnterprise 6.6, 64 bit., and it has Emacs version 23.1.1; Steve s desktop, shaggy, is running opensuse 11.2, and it also appears to have Emacs 23.1.1 in /usr/bin/emacs. mi_063_001_fdrd-workflows; hg tag: «1.A» 3 / 17

1. Hg and L A TEX workflows for the FDRD 1.2.1 Mac edits with Texshop The Texshop editor for Mac has one or more windows where the text may be edited (Figure 1.2, page 5). After running pdflatex by pressing the Typeset button in the top left of the editing window s menu bar (Figure 1.3, page 6) another window called the console will appear (Figure 1.4, page 6) with compilation messages, and when completed another window with the final PDF will appear. Note, sometimes after pressing Typeset, messages will appear in the console saying, e.g. LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right. and the Preview window may show? marks where it cannot resolve a cross-reference. If this happens, press the Typeset button one or more times until the message goes away. If the message does not go away, try pressing the Goto Error button at top left in the Console window, to see if the label has just been entered with a typo. Pdflatex can get confused the worst cases; if you think there are no errors but the console says the document will not compile, press the Console button at top right labelled Trash Aux files, then re-press the Typeset button several times in a row to see if it will now compile. 1.2.2 Windows edits with TeXworks Texworks has intentionally written to look very similar to Texshop. It has an editing window, and a Preview window, and is meant to run pdflatex on source files. A screen shot from www.tug.org/texworks/ is shown in Figure 1.5 (page 13). 1.3 Commit changes to laptop sandbox On Linux or Mac I use the command line, as it is fast. On the Windows 7 laptop I use a GUI tool called TortoiseHg. 1.3.1 Linux or Mac sandbox commits On a Mac, open the Terminal.app; it may be in the Utilities directory; on Linux open a terminal. 1. cd into the working on the laptop; e.g. on Veronica s laptop cd Documents/hvd_MI_0018_FDRD/ 2. hg stat. This will show what files have been modified, with a leading M, or added with a leading?. For example on my laptop, chalion:msdn_063_fdr_doc_workflows raines$ hg stat M C-Content/msdn_063_010_workflows_text.tex M MSDN_063_fdrd_workflows_001.tex M Tikz/Deployment/msdn_063_200_deployment_diagram.pdf M Tikz/Deployment/msdn_063_200_deployment_diagram.tex? C-Content/Figures/texshop-console-window.png 4 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.3. Commit changes to laptop sandbox Figure 1.2. Texshop has one or more editing windows [one is shown on the left], and after pressing Typeset, a Preview window [right] showing the compiled document. mi_063_001_fdrd-workflows; hg tag: «1.A» 5 / 17

1. Hg and L A TEX workflows for the FDRD Figure 1.3. The Texshop menu bar has a button at the top left Typeset, which will run pdflatex on the document. Figure 1.4. The Texshop console appears and shows messages when thetypeset button is pressed. 6 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.3. Commit changes to laptop sandbox? C-Content/Figures/texshop-typeset-button.png? C-Content/Figures/texshop-windows.png? C-Content/Figures/texworks-win7.png where 4 files have been modified and 4 files (images) have been added. 3. hg add, to tell it to include the new files identified with the? marks. It will now show adding C-Content/Figures/texshop-console-window.png adding C-Content/Figures/texshop-typeset-button.png adding C-Content/Figures/texshop-windows.png adding C-Content/Figures/texworks-win7.png 4. If you retype hg stat now, the? marks have been replaced with A, for added: chalion:msdn_063_fdr_doc_workflows raines$ hg stat M C-Content/msdn_063_010_workflows_text.tex M MSDN_063_fdrd_workflows_001.tex M Tikz/Deployment/msdn_063_200_deployment_diagram.pdf M Tikz/Deployment/msdn_063_200_deployment_diagram.tex A C-Content/Figures/texshop-console-window.png A C-Content/Figures/texshop-typeset-button.png A C-Content/Figures/texshop-windows.png A C-Content/Figures/texworks-win7.png 5. Now type hg com (for commit ). An editor window will appear; mine is set to vi. a) Press i for insert text. b) Type a brief 1 line sentence describing changes. c) Hit return 2 times, then add any other descriptions. d) Hit Esc to stop adding text. e) Type :wq to write (save) and quit vi. 6. Type hg stat again, to verify that the hg commit was taken. If it was, the command will do nothing. 1.3.2 Windows laptop commits On Windows we use the Tortoisehg Workbench, shown in Figure 1.6 (page 14). The main Workbench window shows all of the repositories it maintains, and in a sub window the graph log history of the selected project. Details about each changeset may also be explored. Figure 1.7 (page 15) describes four important toolbar buttons which change the view presented by the sub windows, allowing you to see Revision Details, changes ready for Commit, Search, Console, and Synchronize. The Synchronize button opens sub windows shown in Figure 1.8 (page 15), from which different sandboxes may be linked to the one in use. 1. Select the FDR document repository in the registry in the left sub window. 2. Press F5 or the left-most button in the toolbar, with the two blue arrows in a circle. This will Refresh current repository, i.e. detect any changes. mi_063_001_fdrd-workflows; hg tag: «1.A» 7 / 17

1. Hg and L A TEX workflows for the FDRD 3. Look at the Graph, to see if the default tip branch has a dark circle to indicate that the repository is pointed to the most recently committed versions. 4. Now click the top of the graph with the description WorkingDirectory, and then Refresh again. 5. Look at the Commit sub-window, shown in Figure 1.10 (page 16), will list all of the changed files and allow you to view the changes to each. 6. Verify that all of the files you wish to commit have a check mark in the box next to the filename (left sub window); if you fail to select that box the difference view in the lower right sub window will show a message at the top stating these changes shall be excluded from the next commit (probably not what you wanted). 7. If the changes look good, the top right sub-window should be an empty text window. Type a brief one line message describing the changes, hit return two times and then describe the changes in more detail if needed. 8. Now look for and press the Commit button within the sub-window. Tortoisehg will pause for a few seconds while it accepts the changes and updates the Graph. 1.4 Backup laptop sandbox changes to instlab sandboxes After making a bunch of changes within your laptop sandbox, please backup the changes to your sandbox to instlab. Do this even if you are not ready to pass the changes on to someone else. 1.4.1 Connect to the VPN, if needed If your laptop is on the Department s wired Ethernet, the VPN is not required as you can ssh or network map to instlab. However, if your laptop s on the uf WIFI network, or off campus, you will first need to make a VPN connection. 1. Start VPN connection to «Your user name»@ufl.edu/astro. 2. This may be useful: look up the VPN IP address for your connection from the status screen; it should be a number starting with 10. 1.4.2 Linux or Mac backup to instlab On a Mac, open the Terminal.app; it may be in the Utilities directory; on Linux open a terminal. This section will sketch out the command sequence, but look at the command sequence described in more detail in Example command line hg sequence (page viii). 1. Through your VPN connection log into Nick s desktop via ssh: ssh -Y -l hipatia@barrayar.astro.ufl.edu 2. Change directories to your sandbox on instlab: cd /astro/data/instlab/inst_group/projects/miradas/ 3. Either hg pull or hg push your changes to your instlab sandbox; I prefer pull: 8 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.4. Backup laptop sandbox changes to instlab sandboxes hg incoming -stat -bundle incoming.hg ssh://«vero»@«vpn IP #»//Users/«Path to sandbox»/ Enter your password on your laptop. 4. hg pull incoming.hg 5. hg up 1.4.3 Windows backup to instlab From the Tortoisehg Workbench 1. Press the Synchronize button to open the connection sub windows (see Figure 1.8, page 15). 2. Verify the synchronization path in the lower left sub window. 3. Assuming you know that your instlab sandbox is only waiting for changes from you, press the Detect outgoing changes button (see Figure 1.9, page 15). 4. The changesets that are not on the remote repository will be listed. An example is shown in Figure 1.11 (page 17). 5. If all looks good, press the Push all button. After a few seconds it should show the graph. 6. Now use putty.exe to connect to Nick s desktop via ssh: ssh -Y -l cvega23@barrayar.astro.ufl.edu 7. Change directories to your sandbox on instlab: cd /astro/data/instlab/inst_group/projects/miradas/ 8. Get a summary of the status of the repository, it should indicated that there are new changesets waiting, and you should update: barrayar[snr/n_at_spur_mi_0018_fdrd] hg sum parent: 10:9111b3a7471e Added text and figures from PDR for Instrument Overview chapter. branch: default commit: (clean) update: 2 new changesets (update) The two most important bits shown above are that the commit is clean, i.e. there s nothing changed, but update reveals that you are not at the tip of the repository. 9. You can verify this by looking at the graph log: barrayar[snr/n_at_spur_mi_0018_fdrd] hg glog -Gl3 o changeset: 12:de4b96a09446 tag: tip user: nraines at spur date: Tue Feb 10 16:32:06 2015-0500 summary: Test2 mi_063_001_fdrd-workflows; hg tag: «1.A» 9 / 17

1. Hg and L A TEX workflows for the FDRD o changeset: 11:bb17ab7eefe5 user: nraines at spur date: Tue Feb 10 12:15:46 2015-0500 summary: Test @ changeset: 10:9111b3a7471e user: Nick Raines <raines@astro.ufl.edu> date: Tue Jan 27 17:04:25 2015-0500 summary: Added text and figures from PDR for Instrument Overview chapter. Notice the @ symbol is at changeset 10, but there are two new changeset. 10. The final step is simply to update: hg up 1.5 Acquire changes from another s instlab sandbox After pulling your laptop changes to your instlab sandbox, it is probable that there are changes you need from someone else or from the Master. 1. Log in to Nick s desktop via ssh ssh -Y -l hipatia@barrayar.astro.ufl.edu 2. Change directories to your sandbox on instlab: cd /astro/data/instlab/inst_group/projects/miradas/ 3. Look for changes from different locations, three are shown: hg incoming -stat -bundle incoming.hg../../../mi_0018_fdrd_master/ hg incoming -stat -bundle incoming.hg../../snr/snr_mi_0018_fdrd/ hg incoming -stat -bundle incoming.hg../../sse/sse_mi_0018_fdrd/ 4. If there are changes, look at the file list as revealed in the output by -stat. If the file changes are only in tex files you can look at the changes in the bundle file with hg incoming -p incoming.hg 5. If the changes seem to make sense, then pull them from the bundle file and update: hg pull incoming.hg hg up 6. Now go to your laptop and pull these new changes on instlab to your laptop. 1.6 Acquire changes from your instlab sandbox to your laptop To acquire changes you just need to pull them and update. 10 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.7. Merging 1.6.1 Linux or Mac pull from instlab From a Terminal: 1. Change directories to your sandbox on your laptop, e.g. cd «Path to sandbox»/ 2. Look for changes from your instlab sandbox, e.g.: hg incoming -stat -bundle incoming.hg ssh://hipatia@barrayar.astro.ufl.edu//astro/data/ instlab/inst_group/projects/miradas/documents/ MI_staging/hvd/hvd_MI_0018_FDRD/ 3. If there are changes, pull and update: hg pull incoming.hg hg up 1.6.2 Windows pull from instlab From the Tortoisehg Workbench 1. Press the Synchronize button to open the connection sub windows (see Figure 1.8, page 15). 2. Verify the synchronization path in the lower left sub window. 3. Press the Check for incoming changes button (see Figure 1.9). It there are no changes a message will briefly appear over the graph log stating that there are no incoming changes. However if there are changes the graph log is replaced by a figure similar to the one shown in Figure 1.11 when there are outgoing changes. 4. Press Accept to pull the changes. If your preferences are set up your working directory will automatically update After Pull Operation, otherwise you will need to manually update. 5. Now return to editing content with TeXLive. 1.7 Merging When you pull changesets in to your repository, hg does an implicit merge of the differences in each file. If for some reason merging fails at this step, hg will tell you the file(s) having conflicts. The easiest way to view them is to use a differencing file editor, to see the two files side by side, line by line. After examining the difference, you can move changes between the two files. There several options depending on computer platform: Linux Windows Mac KDiff3 or Meld KDiff3 TextWrangler The general scheme would be to 1. First attempt of hg merge. mi_063_001_fdrd-workflows; hg tag: «1.A» 11 / 17

1. Hg and L A TEX workflows for the FDRD 2. If merge fails, fix conflicts with differencing editor. 3. Re-run hg merge (I think I ve only had to do this a couple of times...). 4. Then update with hg up. 1.8 Useful Linux commands cd «destination» Change directories to «destination» Note, subdirectories use / slashes. ls List the directory contents man «command» Print the manual page for command mv «source»«destination» Move or rename files do not use if files are tracked by Mercurial! pwd Present working directory; where you are in the file system 12 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.8. Useful Linux commands Figure 1.5. TeXworks has one or more editing windows [one is shown on the left], and after pressing the green (like a CD play button) button, a Preview window [right] showing the compiled document. mi_063_001_fdrd-workflows; hg tag: «1.A» 13 / 17

1. Hg and L A TEX workflows for the FDRD Figure 1.6. The Tortoisehg Workbench is a bit busy and can display many aspects of a project s repository; it has multiple sub windows. Top left: Below the toolbar at top, and along the left side is the Repository Registry; each of the projects tracked with Tortoisehg may be switched between here. All of the sandboxes shown in Figure 1.1 (page 2) will show up here select the one for the the FDRD. Top right: The top right sub window shows the history of the repository, and allows you to navigate through time. The one in the image is very busy, with multiple parallel branches in concurrent development our project should have only a single branch, and if it every creates multiple heads Nick will need to merge them to one branch. Note the dark blue circle at the left-most branch, and the description in bold. The dark blue circle indicates that the view of the repository is back in time. After editing the LATEX, double-click the top most line of the description, where it says WorkingDirectory. Then press F5, or click the left-most button in the tool bar with the blue arrows in a circle, to Refresh current repository. 14 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.8. Useful Linux commands Figure 1.7. Tortoisehg has four (4) useful buttons to see different views of the repository. Revision Details shows a green person next to a file. This will change the bottom two sub windows to shows the files and changes made to a changeset, as you select different ones from the Graphlog; you want select the top-most WorkingDirectory. Commit is a large green check mark. The two sub windows will be essentially the same as with the Revision Details, but will only show files that have been changed and need to be committed to the repository. Search is a magnifying glass. You can use this to search through different commits. Console looks like a clipboard with the word LOG at the top. This opens a window where hg actions may be typed on the command line. Synchronize looks like two green arrows pointing from bottom left to top right. This opens a useful window to show you paths to other versions of the sandboxes you have access to; these should be owned by you but conceivably could be owned by others for read-only access. Figure 1.8. The sub windows here show the default path to another repository to synchronize with, but note multiple paths may be used. The path shown in the example is a network mapping of drive I: to a sandbox on instlab. Figure 1.9. The Synchronize button opens a sub window with these four buttons at its top left; the buttons also appear on the Workbench s top toolbar. Check for incoming changes from the selected path. Pull incoming changes from the selected path. Detect outgoing changes to the selected path. Push outgoing changes to the selected path. mi_063_001_fdrd-workflows; hg tag: «1.A» 15 / 17

1. Hg and L A TEX workflows for the FDRD Figure 1.10. The commit window also has three sub-windows and a menubar. The menu bar shows a status pulldown button and a Refresh current repository button. Left A list of files, indicating if modified (M), or new (?), just as shown in the command line example given in 1.3.1. Bottom right After highlighting a file in the left sub-window, the bottom right sub-window shows what is different between the current state of the file and its previously committed version. Top right Should be an empty sub window, where you can enter message describing the changes to be committed. Bottom right In the figure shown here, the Commit button is along the bottom; in my version it is at the top right. After pressing the Commit button TortoiseHg should pause for a few seconds as it saves the changes and then updates the Graph. 16 / 17 mi_063_001_fdrd-workflows; hg tag: «1.A»

1.8. Useful Linux commands Figure 1.11. After pressing the outgoing changes button the graph log is replaced with a listing of all changesets that need to be exported to the remote repository. mi_063_001_fdrd-workflows; hg tag: «1.A» 17 / 17