Creating the GEOSagcm bridge repo: Difference between revisions

Add section for updating repo
Initialize a bare bridge repo: Add line for setgid
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{rightTOC}}
{{rightTOC}}


This page will detail the process of making the GEOSagcm bridge repo.
This page will detail the process of making the GEOSagcm bridge repo. To use the bridge repo, visit [[Cloning a Git Bridge Repo | this page]].


Following http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/
Following http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/
Line 12: Line 12:
  $ git init --bare GEOSagcm
  $ git init --bare GEOSagcm
  $ chgrp -R gmaosi GEOSagcm/
  $ chgrp -R gmaosi GEOSagcm/
  $ chmod -R g+w GEOSagcm/
  $ chmod -R g+rwX GEOSagcm/
$ find GEOSagcm/ -type d -exec chmod g+s '{}' +
  $ lt
  $ lt
  total 0
  total 0
  drwxrwxr-x 3 adasilva gmaosi 512 2014-07-07 14:59 AEROsa/
  drwxrwxr-x 3 adasilva gmaosi 512 2014-07-07 14:59 AEROsa/
  drwxrwxr-x 3 adasilva gmaosi 512 2014-07-07 15:00 GEOSadas/
  drwxrwxr-x 3 adasilva gmaosi 512 2014-07-07 15:00 GEOSadas/
  drwxrwxr-x 7 mathomp4 gmaosi 512 2014-07-16 12:06 GEOSagcm/
  drwxrwsr-x 7 mathomp4 gmaosi 512 2014-07-16 12:06 GEOSagcm/


We now have an empty bridge repo.
We now have an empty bridge repo.
Line 650: Line 651:
     Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04
     Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04
</nowiki>
</nowiki>
== Fixing a tag commit message ==
Sometimes an updater is an idiot. For example, the log looks okay:
<nowiki>(1413) $ git log --decorate=full
commit 5566fd1d8d2baad2fa111ade2d72dfb3e75e3f84 (HEAD, tag: refs/tags/Ganymed-4_1, refs/heads/master)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:13:30 2014 -0500
    MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_1 retrieved with: ecvs -q upd -kk -r Ganymed-4_1 on 2014-Dec-03
commit bf2b9584f29972078803985791b0df0b68a74a83 (tag: refs/tags/Ganymed-4_0_p1)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:03:20 2014 -0500
    MAT: Remove deleted file shown by git status
commit 2515d09f0085fd9370e0b39c538793c9c5ce753d
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:01:27 2014 -0500
    MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 on 2014-Dec-03
commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:07:59 2014 -0400
    MAT: Add .gitignore file
commit c13a2dc367c3c709e21a82b7f8c858486c292acd
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:06:40 2014 -0400
    Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2014-Sep-04
</nowiki>
but you realize you made a mistake:
<nowiki>(1414) $ git tag -l -n1
Ganymed-4_0    MAT: Before updating to Ganymed-4_1, tag as Ganymed-4_0
Ganymed-4_0_p1  MAT: Tag Ganymed-4_1
Ganymed-4_1    MAT: Tag Ganymed-4_1
</nowiki>
But with git you can fix that:
<nowiki>(1415) $ git tag Ganymed-4_0_p1 Ganymed-4_0_p1 -f -m "MAT: Tag Ganymed-4_0_p1 CVS update"
Updated tag 'Ganymed-4_0_p1' (was 6d57042)
(1416) $ git tag -l -n1
Ganymed-4_0    MAT: Before updating to Ganymed-4_1, tag as Ganymed-4_0
Ganymed-4_0_p1  MAT: Tag Ganymed-4_0_p1 CVS update
Ganymed-4_1    MAT: Tag Ganymed-4_1
</nowiki>
== Pulling updates from the Bridge repo on JIBB ==
Now let's pull the updates on JIBB:
<nowiki>(1023) $ git log --decorate=full                                                            [jibb03:...bridge/GEOSagcm 9:25am]
commit a803acd43fc803511fdac603a6912ebc1b95f41b (HEAD, refs/remotes/origin/master, refs/remotes/origin/HEAD, refs/heads/master)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:07:59 2014 -0400
    MAT: Add .gitignore file
commit c13a2dc367c3c709e21a82b7f8c858486c292acd
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:06:40 2014 -0400
    Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2
014-Sep-04
(1025) $ git pull                                                                            [jibb03:...bridge/GEOSagcm 9:26am]
This U.S. Government resource is for authorized users only.  By accessing
this system you are consenting to complete monitoring with no expectation
of privacy.  Unauthorized access or use may subject you to disciplinary
action and criminal prosecution.
PASSCODE:
Password:
remote: Counting objects: 2722, done.
remote: Compressing objects: 100% (1500/1500), done.
Killed by signal 1. 66% (1354/2051) 
remote: Total 2051 (delta 873), reused 1720 (delta 545)
Receiving objects: 100% (2051/2051), 368.91 KiB | 0 bytes/s, done.
Resolving deltas: 100% (873/873), completed with 252 local objects.
From discover:/discover/swdev/adasilva/bridge/GEOSagcm
  a803acd..5566fd1  master    -> origin/master
* [new tag]        Ganymed-4_0 -> Ganymed-4_0
* [new tag]        Ganymed-4_1 -> Ganymed-4_1
This U.S. Government resource is for authorized users only.  By accessing
this system you are consenting to complete monitoring with no expectation
of privacy.  Unauthorized access or use may subject you to disciplinary
action and criminal prosecution.
PASSCODE:
Password:
remote: Counting objects: 2, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2 (delta 0), reused 0 (delta 0)
Killed by signal 1.
Unpacking objects: 100% (2/2), done.
From discover:/discover/swdev/adasilva/bridge/GEOSagcm
* [new tag]        Ganymed-4_0_p1 -> Ganymed-4_0_p1
Updating a803acd..5566fd1
Fast-forward
src/Applications/CVS/Entries                                                    |    2 +-
src/Applications/CVS/Entries.Static                                              |    0
src/Applications/GEOSgcm_App/.AGCM_VERSION                                      |    2 +-
src/Applications/GEOSgcm_App/AGCM.rc.tmpl                                        |  11 +-
src/Applications/GEOSgcm_App/CVS/Entries                                        |  62 +-
src/Applications/GEOSgcm_App/CVS/Tag                                            |    2 +-
...
src/GMAO_Shared/MAPL_Base/tests/CVS/Tag                                          |    2 +-
src/GMAO_Shared/MAPL_cfio/CVS/Entries                                            |  34 +-
src/GMAO_Shared/MAPL_cfio/CVS/Tag                                                |    2 +-
src/GMAO_Shared/MAPL_cfio/examples/CVS/Entries                                  |  32 +-
src/GMAO_Shared/MAPL_cfio/examples/CVS/Tag                                      |    2 +-
src/g5_modules                                                                  |  19 +-
747 files changed, 19732 insertions(+), 6893 deletions(-)
delete mode 100644 src/Applications/CVS/Entries.Static
create mode 100644 src/GMAO_Shared/GEOS_Shared/sphere.F
create mode 100644 src/GMAO_Shared/MAPL_Base/quicksort.c
create mode 100644 src/GMAO_Shared/MAPL_Base/swap_shuffle.c
</nowiki>
Huh. Someone forgot to set up an SSH tunnel. Oops.
<nowiki>(1045) $ git log --decorate=full                                                            [jibb03:...bridge/GEOSagcm 9:31am]
commit 5566fd1d8d2baad2fa111ade2d72dfb3e75e3f84 (HEAD, tag: refs/tags/Ganymed-4_1, refs/remotes/origin/master, refs/remotes/orig
in/HEAD, refs/heads/master)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:13:30 2014 -0500
    MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_1 retrieved with: ecvs -q upd -kk -r Ganymed-4_1 on 2014
-Dec-03
commit bf2b9584f29972078803985791b0df0b68a74a83
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:03:20 2014 -0500
    MAT: Remove deleted file shown by git status
commit 2515d09f0085fd9370e0b39c538793c9c5ce753d
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:01:27 2014 -0500
    MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 o
n 2014-Dec-03
commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:07:59 2014 -0400
    MAT: Add .gitignore file
commit c13a2dc367c3c709e21a82b7f8c858486c292acd
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:06:40 2014 -0400
    Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2
014-Sep-04
</nowiki>
Note, I'm not sure why the Ganymed-4_0_p1 didn't get pulled. I cannot seem to get it with <tt>git fetch --tags</tt>, but it also seems to be there:
<syntaxhighlight lang="bash">(1049) $ git tag -n1 -l                                                                      [jibb03:...bridge/GEOSagcm 9:35am]
Ganymed-4_0    MAT: Before updating to Ganymed-4_1, tag as Ganymed-4_0
Ganymed-4_0_p1  MAT: Tag Ganymed-4_0_p1 CVS update
Ganymed-4_1    MAT: Tag Ganymed-4_1
</syntaxhighlight>
=== Switching between tags ===
Let's see if we can access the tags.
<nowiki>(1052) $ cd GEOSagcm-Branch-Repo/                                                            [jibb03:...mathomp4/Models 9:37am]
total 0
Directory: /jibb/nobackup/mathomp4/Models/GEOSagcm-Branch-Repo
(1053) $ git clone /jibb/nobackup/gmaosi/bridge/GEOSagcm                        [jibb03:...Models/GEOSagcm-Branch-Repo 9:37am]
Cloning into 'GEOSagcm'...
done.
Checking out files: 100% (4329/4329), done.
</nowiki>
Okay. Now:
<nowiki>(1065) $ cd GEOSagcm/src/                                                        [jibb03:...Models/GEOSagcm-Branch-Repo 9:39am]
total 448K
drwxr-xr-x  4 mathomp4 j1066  512 2014-12-03 09:37 Applications/
-rwxr-xr-x  1 mathomp4 j1066 7.3K 2014-12-03 09:37 Assert.pl*
drwxr-xr-x  2 mathomp4 j1066  512 2014-12-03 09:37 CVS/
drwxr-xr-x  3 mathomp4 j1066  64K 2014-12-03 09:37 Config/
drwxr-xr-x  4 mathomp4 j1066  512 2014-12-03 09:37 GEOSgcs_GridComp/
drwxr-xr-x 16 mathomp4 j1066  64K 2014-12-03 09:37 GMAO_Shared/
-rwxr-xr-x  1 mathomp4 j1066 4.1K 2014-12-03 09:37 GNUmakefile*
-rwxr-xr-x  1 mathomp4 j1066  14K 2014-12-03 09:37 g5_modules*
-rw-r--r--  1 mathomp4 j1066 1.2K 2014-12-03 09:37 g5_modules.sh
-rwxr-xr-x  1 mathomp4 j1066  19K 2014-12-03 09:37 parallel_build.csh*
Directory: /jibb/nobackup/mathomp4/Models/GEOSagcm-Branch-Repo/GEOSagcm/src
(1066) $ git tag -n1 -l                                                                        [jibb03:...GEOSagcm/src 9:40am]
Ganymed-4_0    MAT: Before updating to Ganymed-4_1, tag as Ganymed-4_0
Ganymed-4_0_p1  MAT: Tag Ganymed-4_0_p1 CVS update
Ganymed-4_1    MAT: Tag Ganymed-4_1
(1067) $ cvscmp Ganymed-4_1                                                                    [jibb03:...GEOSagcm/src 9:40am]
(1068) $ git checkout Ganymed-4_0_p1                                                            [jibb03:...GEOSagcm/src 9:40am]
Note: checking out 'Ganymed-4_0_p1'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
HEAD is now at bf2b958... MAT: Remove deleted file shown by git status
(1069) $ git log --decorate=full                                                                [jibb03:...GEOSagcm/src 9:40am]
commit bf2b9584f29972078803985791b0df0b68a74a83 (HEAD)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:03:20 2014 -0500
    MAT: Remove deleted file shown by git status
commit 2515d09f0085fd9370e0b39c538793c9c5ce753d
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Wed Dec 3 09:01:27 2014 -0500
    MAT: Update GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0_p1 retrieved with: ecvs -q upd -kk -r Ganymed-4_0_p1 o
n 2014-Dec-03
commit a803acd43fc803511fdac603a6912ebc1b95f41b (tag: refs/tags/Ganymed-4_0)
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:07:59 2014 -0400
    MAT: Add .gitignore file
commit c13a2dc367c3c709e21a82b7f8c858486c292acd
Author: Matthew Thompson <matthew.thompson@nasa.gov>
Date:  Thu Sep 4 13:06:40 2014 -0400
    Initialize GEOSagcm git bridge repo with CVS checkout of Ganymed-4_0 retrieved with: ecvs co -kk -r Ganymed-4_0 Ganymed on 2
014-Sep-04
(1070) $ cvscmp Ganymed-4_1                                                                    [jibb03:...GEOSagcm/src 9:40am]
The following files need to be UPDATED for tag Ganymed-4_1
|-------------|------------------------------------------------------------
|  Newest    |
|-------------|                    File Name
| Here | Tag  |
|------|------|------------------------------------------------------------
|      |  x  | Applications/GEOSgcm_App/.AGCM_VERSION
|      |  x  | Applications/GEOSgcm_App/AGCM.rc.tmpl
|      |  x  | Applications/GEOSgcm_App/ChangeLog
|      |  x  | GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSgwd_GridComp/GEOS_GwdGridComp.F90
|      |  x  | GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/GEOS_CatchGridComp.F90
|      |  x  | GEOSgcs_GridComp/GEOSgcm_GridComp/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSturbulence_GridComp/GEOS_TurbulenceGridComp.F90
|------|------|------------------------------------------------------------
</nowiki>
Well, it's there I guess. (Note, you probably don't want to checkout a tag like this. Using -b branch_name is better so you don't get into a detached HEAD state as the Note from git said.)
[[Category:SI Team]]