SVN with PB

Tried 3 different svn clients for PB today.

  1. PBSccProxy
  2. Unified SCC
  3. PuskOK SvnSCC

I couldn’t find how to connect to a remote svn repository through PBSccProxy. Thanks to Juan, it seems PBSCC is checking in to local repository mirror folder first, then commit to remote repo. I think the IDE won’t have the out of sync flag then, need to comfirm.

Unified SCC needs me to uncheck the “Delete PB generated file” option, which made my working folder a huge mess. Also, I kept getting NullRefException when doing show diff in IDE. The readonly flag of those sr files always confused me.

PushOK is the most user-friendly one, fast, and clean. I think it doesn’t need Tortoise at all. But merge has to do through tortoise and based on sr? files, then it’s better to turn off “Delete PB generated file option”, otherwise the out-of-sync warning sign on folder will become very annoying.

Something new when using PB with SVN:

  • We can check in distributed files into repository along with source file. To do this, set the global ignore list to “*.pbl, bin/*”, then use ant task to build executable and zip the pbl moving to a “dist” folder, which can be imported into repository as a different folder. Developers just need to extract it to quickly setup the working environment.My ignore list: ” *.pbl, executable/*, *.log, *.pbc”
  • Instead of “sharing” in vss, we do “branch and merge”. Create a branch is easy, the hard part is merge back to trunk (re-integrate branch). One important thing is, there must be a working folder mapping to trunk on merging operator’s machine. Another thing shocked me is, tortoise can only do “tree merge”, which means we can only merge a “folder” back to trunk. I tried to merge one single file using Tortoise, always failed with an error said: source_url@revision must ancestrally related to dest_url@revision#”, switching back to folder/tree level merge, it passed.
  • Merge a single file from trunk to a branch is OK.

I think that’s the way it works. We should consider those cross-project files as a separated library, we don’t want just merge one single object and release. Test whole, release whole.

    <target name="build" depends="delete_last_build">
        <exec executable="orcascr9.exe" failonerror="true" >
            <arg line='/D version_nums="${year},${major},${minor},${build}" ${basedir}/build.orca' />
         </exec>        

        <antcall target="deploy" />        
    </target>

    <target name="delete_last_build">
        <delete>
            <fileset dir="${bin.dir}" includes="*.exe"  />
            <fileset dir="${bin.dir}" includes="*.pbd"  />
        </delete>
    </target>

    <target name="deploy">
        <move todir="${bin.dir}">
            <fileset dir="${basedir}/" includes="*.exe"  />
            <fileset dir="${basedir}/" includes="*.pbd"  />   
        </move>

        <antcall target="archive" />    
    </target>

    <target name="archive">
        <delete file="${dist.dir}/source.zip" />
        <delete file="${dist.dir}/executable.zip" />

        <zip destfile="${dist.dir}/source.zip"
           basedir="${basedir}"
           excludes="**/*.sr*, Executable/"
        />    

        <zip destfile="${dist.dir}/executable.zip"
           basedir="${basedir}"
           includes="Executable/"
        />
    </target>
Advertisements

9 thoughts on “SVN with PB

  1. Hi Frank. Great post.

    I use PBSCC Proxy daily and works well for me, but it needs a working copy to connect to. The procedure I followed is the next:

    1. Install TortoiseSVN and SlikSVN (or any other terminal-based svn client), and install the proxy.
    2. Make a folder in the repository where the sources will be stored and check out that folder from the repository.
    2. Open the workspace of the project to be imported into SVN.
    3. Configure the Source Control settings pointing to the local copy of the folder as the ‘Project’.
    4. Add the target(s) and its contents.
    5. Do normal check-out, check-in.

    An annoying issue is the error with the missing ddb.csv and the warning (in french) it puts in every commit log. To get rid of it, the ‘noDDB’ key of the registry (HKEY_LOCAL_MACHINE\SOFTWARE\FM2i\PBSCC Proxy) should be set to value ‘1’.

    An off-topic question, if you don’t mind: is it necessary to delete the generated PB files for orcascript to be able to write the new ones?

    I’m not sure how the orcascript should be configured to only regenerate the updated files (from SVN) and do an incremental build. I wrote an script to do an incremental build (without deleting any files) but it didn’t write anything at all. I haven’t played much with orcascript yet anyway. =P

  2. Thanks Juan for your intro about PBSCC Proxy. Obviously, it’s not directly connect to remote repository. I think you then lost the ‘out of sync’ sign in your IDE.

    For orca, we let CI server do the build, so it always delete sr file and do the full build. I think incremental build should be OK and I tried it before. I’ll update it when I figured out the trick.

  3. Hi guys, I’m in the middle of migrating our company PB projects to svn. I’m not a PB guy, so I’m trying to help them organize and automate the build process. I’ve successfully installed PBSCC and made it work. I followed some recomendations of having a folder for each pbl, so I ended up with 73 folders under Source. I also put in this folder de pbt file, but leave the pbw file outside.

    Now I wish to setup a new developer machine. Do you have any good recomendations? so far I had to rar the pbw and the PBL files and copy them over to the new machine, a process that doesn’t seems very optimized to me. Should I move the pbw file into the Source folder? I plan later to setup the svn access using apache for remote working.

    Thanks for the advice you can give me.

    PB 10.5, SVN+Tortoise+PBSCC.

  4. First of all, I never understand of creating separated folder for each pbl, but it seems PB12 is also going to this way (in WPF PB app).

    I always check pbw file into svn repository, what you can do is in your auto build script, creating a task for releasing source files which includes pbw file. So developers just need to grab this src release to start their routine work. Do a svn update right before can grantee it’s the latest, but it’s not necessary.

    Another option is not copying, instead just check out / update from svn repository, then run the same build script to auto-gen all the pbls, this is exactly same as what your CI server is doing.

  5. Hey Frank,

    I don’t know if you’re still involved with PB or not, but I am trying to integrate my PB build with my CI tool (hudson). I already have my project using pbscc proxy + tortoise + CollabNet Subversion and it is working just fine…

    now I am trying to do a build using orcascript. Actually what I want is to update the latest code just before the build.

    Is there anyway if orcascript or do I have to use a ant/whatever script to update then call the orca to build?

    Cheers,
    Sergio

  6. Pingback: SVN for PowerBuilder |

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s