Most development in CVS is done on the Controls Network. Make sure you select your profile at login.

SLAC MATLAB CVS

Edit Permissions

Contact Ken Brobeck brobeck@slac.stanford.edu and request access to the facet CVS repositories for either/both matlab and edm. Once you have access, from mcclogin, run

kinit

Instructions for Updating MATLAB 2012 Files

Make edits to your file, then commit and move the file to production:

[fphysics@facet-srv01 ~/dstorey/cvswork/matlab/toolbox ]$ cvs commit -m "First version of the Diff Pumping watcher script" DPSvacWatcher.m
dstorey@mcclogin's password: 
RCS file: /afs/slac/g/lcls/cvs/matlab/toolbox/DPSvacWatcher.m,v
done
Checking in DPSvacWatcher.m;
/afs/slac/g/lcls/cvs/matlab/toolbox/DPSvacWatcher.m,v  <--  DPSvacWatcher.m
initial revision: 1.1
done

[fphysics@facet-srv01 ~/dstorey/cvswork/matlab/toolbox ]$ cvs2prod DPSvacWatcher.m
dstorey@mcclogin's password: 
U DPSvacWatcher.m
 

Instructions for Updating EDM Files

Ensure you set_profile before any of these steps. Otherwise it will fail in opaque ways. 

First Pass

Most of the time, we are checking out a package or folder, for example some EDM displays. First, make working directory (mine is called 'blah'). Then:

[fphysics@facet-srv01 ~/sgess/blah ]$ cvs co tools/edm/display/facet
sgess@mcclogin's password: 
cvs checkout: Updating tools/edm/display/facet
U tools/edm/display/facet/all_all_main.edl
U tools/edm/display/facet/all_all_main_help.edl
U tools/edm/display/facet/all_eplus_main.edl
U tools/edm/display/facet/all_eplus_main_help.edl
U tools/edm/display/facet/all_in10_all.edl
...

Next, make an edit and commit the changes:

[fphysics@facet-srv01 ~/sgess/blah/tools/edm/display/facet ]$ cvs commit -m "add a rectangle" IPProfs2.edl
sgess@mcclogin's password: 
Checking in IPProfs2.edl;
/afs/slac/g/lcls/cvs/tools/edm/display/facet/IPProfs2.edl,v  <--  IPProfs2.edl
new revision: 1.5; previous revision: 1.4
done

Finally, 'cd' to production directory and pull changes:

[fphysics@facet-srv01 ~/sgess/blah/tools/edm/display/facet ]$ cd $TOOLS/edm/display/facet
[fphysics@facet-srv01 /usr/local/facet/tools/edm/display/facet ]$ cvs update IPProfs2.edl
sgess@mcclogin's password: 
P IPProfs2.edl

Typical workflow

Always check that your files are up-to-date before making and committing changes. Do this by passing the '-A' argument to 'cvs update':

[fphysics@facet-srv01 ~/sgess/blah/tools/edm/display/facet ]$ cvs update -A IPProfs2.edl 
sgess@mcclogin's password: 
[fphysics@facet-srv01 ~/sgess/blah/tools/edm/display/facet ]$ 

There is no output which means my repo is current.

I have a second version of the repo checked out which doesn't have the new changes:

[fphysics@facet-srv01 ~/sgess/test/tools/edm/display/facet ]$ cvs update -A IPProfs2.edl 
sgess@mcclogin's password: 
P IPProfs2.edl

The 'P' means I need to pull the changes. After that, resume "normal" flow:

[fphysics@facet-srv01 ~/sgess/blah/tools/edm/display/facet ]$ cvs commit -m "add a rectangle" IPProfs2.edl
sgess@mcclogin's password: 
Checking in IPProfs2.edl;
/afs/slac/g/lcls/cvs/tools/edm/display/facet/IPProfs2.edl,v  <--  IPProfs2.edl
new revision: 1.5; previous revision: 1.4
done

'cd' to production directory and pull changes:

[fphysics@facet-srv01 ~/sgess/blah/tools/edm/display/facet ]$ cd $TOOLS/edm/display/facet
[fphysics@facet-srv01 /usr/local/facet/tools/edm/display/facet ]$ cvs update IPProfs2.edl
sgess@mcclogin's password: 
P IPProfs2.edl
  • No labels

2 Comments

  1. Notes on adding a new file (since I will forget). Someone can correct me if there is an error or a more efficient way to do it.

    [fphysics@facet-srv01 ~/dstorey/cvswork/matlab/toolbox ]$ cvs add DPSvacWatcher.m
    dstorey@mcclogin's password: 
    cvs add: scheduling file `DPSvacWatcher.m' for addition
    cvs add: use 'cvs commit' to add this file permanently

    [fphysics@facet-srv01 ~/dstorey/cvswork/matlab/toolbox ]$ cvs commit -m "First version of the Diff Pumping watcher script" DPSvacWatcher.m
    dstorey@mcclogin's password: 
    RCS file: /afs/slac/g/lcls/cvs/matlab/toolbox/DPSvacWatcher.m,v
    done
    Checking in DPSvacWatcher.m;
    /afs/slac/g/lcls/cvs/matlab/toolbox/DPSvacWatcher.m,v  <--  DPSvacWatcher.m
    initial revision: 1.1
    done

    [fphysics@facet-srv01 ~/dstorey/cvswork/matlab/toolbox ]$ cvs2prod DPSvacWatcher.m
    dstorey@mcclogin's password: 
    U DPSvacWatcher.m

    [fphysics@facet-srv01 ~/dstorey/cvswork/matlab/toolbox ]$ cd /usr/local/facet/tools/matlab/toolbox

    [fphysics@facet-srv01 /usr/local/facet/tools/matlab/toolbox ]$ cvs update DPSvacWatcher.m 

    And to check it is really there:

    [fphysics@facet-srv01 /usr/local/facet/tools/matlab/toolbox ]$ ls -l DPSvacWatcher.m 
    -r--r--r-- 1 fphysics facet 15069 Mar 17 15:26 DPSvacWatcher.m
  2. Note on updating files with sticky tags.

    When updating a file with a 'sticky tag', if you follow the instructions above (make changes in your repo, commit changes, cd to production repo, pull changes) at the last step you should use the "-A" option when doing cvs update my_file.edl. 

    This came up when I was updating the facet_s10_laser_tools.edl display on 3/15/2023 and Mike Zelazny Mike Zelazny figured out that adding the "-A" option was the fix