5 Replies Latest reply on Oct 16, 2014 1:32 PM by richard mcleod

    cool eh?

    richard mcleod

      server01 /git/prime/poc/richard # mkdir richard3

      server01 /git/prime/poc/richard # cd richard3

      server01 /git/prime/poc/richard/richard3 # touch file.1

      server01 /git/prime/poc/richard/richard3 # touch file.2

      server01 /git/prime/poc/richard/richard3 # git add file.1

      server01 /git/prime/poc/richard/richard3 # git add file.2

      server01 /git/prime/poc/richard/richard3 # git commit -a -m "adding files"

      [master a37cb5f] adding files

      0 files changed

      create mode 100644 richard/richard3/file.1

      create mode 100644 richard/richard3/file.2

      server01 /git/prime/poc/richard/richard3 # git push

      Counting objects: 6, done.

      Delta compression using up to 2 threads.

      Compressing objects: 100% (4/4), done.

      Writing objects: 100% (4/4), 381 bytes, done.

      Total 4 (delta 2), reused 0 (delta 0)

      Unpacking objects: 100% (4/4), done.

      remote: newrev=a37cb5f7b3d38a3cd80c527748b4edeb51d075ab

      remote: Updating Prime

      remote: From /git/hub/poc

      remote:  * branch            master     -> FETCH_HEAD

      remote: Already up-to-date.

      remote: A       richard/richard3/file.1

      remote: Operation=A

      remote: GITFILEPATH=richard/richard3/file.1

      remote: Operation=A, for Add

      remote:

      remote: File Path=richard/richard3

      remote:

      remote: File Name=file.1

      remote:

      remote: mainFileType=directory

      remote:

      remote: Contains Path=true

      remote:

      remote: blSource: /this/is/my/depot/path/git

      remote:

      remote: blTgtPath: /this/is/my/depot/path/git/richard/richard3

      remote:

      remote: fGroupExists: false

      remote:

      remote: The group does not exist currently, attempting to create it

      remote:

      remote: Created richard3 folder in /this/is/my/depot/path/git/richard. GroupId=2008620

      remote:

      remote: Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Cannot find depot object by name : file.1 in group : richard3 with type : DEPOT_FILE_OBJECT

      remote: Cannot store a failed command result

      remote: The referenced file does not currently exist in BladeLogic!

      remote:

      remote: File: file.1 was added to /this/is/my/depot/path/git/richard/richard3 from //server01/git/prime/poc/richard/richard3/file.1 successfully. FileId=7835

      remote:

      remote: A       richard/richard3/file.2

      remote: Operation=A

      remote: GITFILEPATH=richard/richard3/file.2

      remote: Operation=A, for Add

      remote:

      remote: File Path=richard/richard3

      remote:

      remote: File Name=file.2

      remote:

      remote: mainFileType=directory

      remote:

      remote: Contains Path=true

      remote:

      remote: blSource: /this/is/my/depot/path/git

      remote:

      remote: blTgtPath: /this/is/my/depot/path/git/richard/richard3

      remote:

      remote: fGroupExists: true

      remote:

      remote: /this/is/my/depot/path/git/richard/richard3 already exists, moving on

      remote:

      remote: Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Cannot find depot object by name : file.2 in group : richard3 with type : DEPOT_FILE_OBJECT

      remote: Cannot store a failed command result

      remote: The referenced file does not currently exist in BladeLogic!

      remote:

      remote: File: file.2 was added to /this/is/my/depot/path/git/richard/richard3 from //server01/git/prime/poc/richard/richard3/file.2 successfully. FileId=7836

      remote:

      To /git/hub/poc.git

         7615c0b..a37cb5f  master -> master

      server01 /git/prime/poc/richard/richard3 #

        • 1. Re: cool eh?
          Bill Robinson

          remote: Created richard3 folder in /this/is/my/depot/path/git/richard. GroupId=2008620

          remote:

          remote: Command execution failed. com.bladelogic.om.infra.mfw.util.BlException: Cannot find depot object by name : file.1 in group : richard3 with type : DEPOT_FILE_OBJECT


          so what's going on there ?

          • 2. Re: cool eh?
            richard mcleod

            purely cosmetic

             

            I couldn't find a blcli command to test if a file exists so I just try to grab the dbkey using path + name, if dbkey is null add the file, if it exists replace the file.

             

            also remember me posting about dumping blcli errors to /dev/null a few days ago...

            • 3. Re: cool eh?
              Bill Robinson

              blcli_execute DepotObject depotObjectExistsByTypeGroupAndName 74 groupKey name

              • 4. Re: cool eh?
                richard mcleod

                Yeah just found that -- was looking in the depotfile namespace. implemented. cleaner looking.

                 

                server01 /git/prime/poc/richard/richard3 # touch test.file7

                server01 /git/prime/poc/richard/richard3 # git add test.file7

                server01 /git/prime/poc/richard/richard3 # git commit -m "adding" test.file7

                [master 0de5669] adding

                0 files changed

                create mode 100644 richard/richard3/test.file7

                server01 /git/prime/poc/richard/richard3 # git push

                Counting objects: 7, done.

                Delta compression using up to 2 threads.

                Compressing objects: 100% (4/4), done.

                Writing objects: 100% (4/4), 361 bytes, done.

                Total 4 (delta 3), reused 0 (delta 0)

                Unpacking objects: 100% (4/4), done.

                remote: newrev=0de5669a82a99e174d745646962fd22309f3dac9

                remote: Updating Prime

                remote: From /git/hub/poc

                remote:  * branch            master     -> FETCH_HEAD

                remote: Already up-to-date.

                remote: A       richard/richard3/test.file7

                remote: Operation=A

                remote: GITFILEPATH=richard/richard3/test.file7

                remote: Operation=A, for Add

                remote:

                remote: File Path=richard/richard3

                remote:

                remote: File Name=test.file7

                remote:

                remote: mainFileType=directory

                remote:

                remote: Contains Path=true

                remote:

                remote: blSource: /this/is/my/depot/path/git

                remote:

                remote: blTgtPath: /this/is/my/depot/path/git/richard/richard3

                remote:

                remote: fGroupExists: true

                remote:

                remote: /this/is/my/depot/path/git/richard/richard3 already exists, moving on

                remote:

                remote: The referenced file does not currently exist in BladeLogic!

                remote:

                remote: File: test.file7 was added to /this/is/my/depot/path/git/richard/richard3 from //server01/git/prime/poc/richard/richard3/test.file7 successfully. FileId=7840

                remote:

                To /git/hub/poc.git

                   ff3d67b..0de5669  master -> master

                server01 /git/prime/poc/richard/richard3 #

                 

                 

                server01 /git/prime/poc/richard/richard3 # mkdir richard4

                server01 /git/prime/poc/richard/richard3 # cd richard4

                server01 /git/prime/poc/richard/richard3/richard4 # touch test.file8

                server01 /git/prime/poc/richard/richard3/richard4 # git add test.file8

                server01 /git/prime/poc/richard/richard3/richard4 # git commit -m "adding" test.file8

                [master 67b8bb3] adding

                0 files changed

                create mode 100644 richard/richard3/richard4/test.file8

                server01 /git/prime/poc/richard/richard3/richard4 # git push

                Counting objects: 8, done.

                Delta compression using up to 2 threads.

                Compressing objects: 100% (4/4), done.

                Writing objects: 100% (5/5), 434 bytes, done.

                Total 5 (delta 3), reused 0 (delta 0)

                Unpacking objects: 100% (5/5), done.

                remote: newrev=67b8bb32b2c3343062f8e6bf63f996aba497dddb

                remote: Updating Prime

                remote: From /git/hub/poc

                remote:  * branch            master     -> FETCH_HEAD

                remote: Already up-to-date.

                remote: A       richard/richard3/richard4/test.file8

                remote: Operation=A

                remote: GITFILEPATH=richard/richard3/richard4/test.file8

                remote: Operation=A, for Add

                remote:

                remote: File Path=richard/richard3/richard4

                remote:

                remote: File Name=test.file8

                remote:

                remote: mainFileType=directory

                remote:

                remote: Contains Path=true

                remote:

                remote: blSource: /R&D Infrastructure/G444/test/home/rmcleod8/git

                remote:

                remote: blTgtPath: /this/is/my/depot/path/git/richard/richard3/richard4

                remote:

                remote: fGroupExists: false

                remote:

                remote: The group does not exist currently, attempting to create it

                remote:

                remote: Created richard4 folder in /this/is/my/depot/path/git/richard/richard3. GroupId=2008621

                remote:

                remote: The referenced file does not currently exist in BladeLogic!

                remote:

                remote: File: test.file8 was added to /this/is/my/depot/path/git/richard/richard3/richard4 from //server01/git/prime/poc/richard/richard3/richard4/test.file8 successfully. FileId=7841

                remote:

                To /git/hub/poc.git

                   0de5669..67b8bb3  master -> master

                server01 /git/prime/poc/richard/richard3/richard4 #

                • 5. Re: cool eh?
                  richard mcleod

                  ill release the code for this once i finish documenting it