R2.21 2019-09-03 Bruce Hill Add recursive support to epics-versions along w/ version mismatch check. Don't return EPICS 7 modules as dependents when base release >= 7 Misc small updates: Default depth=None in CheckoutRelease. Make sure git.TagRelease() tags the HEAD instead of index. Added check for valid BASE version. Broke out code from checkoutRelease for new func gitGetTagSha() Improved checks in RELEASE_SITE.check and EPICS_BASE.check Add define of MATLAB_PACKAGE_TOP to RELEASE_SITE file. (Needed to build labca in PROD and DEV as matlab package paths shared no common root.) Made ExpandPackagePath() handle pkgSpec's w/ release and topDir w/ base release. R2.20 2019-06-12 Bruce Hill Improved epics-release cmd line validation error handling. Cleanup imports R2.19 2019-05-08 Bruce Hill Made git svn clone cmd compatible w/ newer git versions Leave git repo writable in releases. Added confirmation prompt in svnModuleToGit before running git svn clone. Revert accidental replacement of svnModuleToGit.py w/ a bash script. R2.18 2019-04-24 Bruce Hill Added svnIocToGit script and launchers. Use tempfile.mkdtemp instead of NamedTemporaryFile to create temp directories. Accidentally replaced svnModuleToGit.py w/ a bash script. R2.17 2019-04-11 Bruce Hill Fix bad arg to find_release() and replaced deprecated mktemp() R2.16 2019-04-04 Bruce Hill Added support for epics-update --stable Fixes some package and repo handling for building and releasing IOC's. Added option to pass repo_url to find_release(). Make sure directories are created 0775 Make VersionToRelNumber more robust w/ non-standard release tags. Add rmFailed param to some BuildRelease calls Modify Releaser to always run make for module builds to force error when jenkins build fails to ckout a tag. R2.15 2019-03-01 Bruce Hill Added epics-build --rmBuild option and make launch scripts exit w/ non-zero status on failures. Needed for EPICS jenkins build server use cases. R2.14 2018-12-19 Bruce Hill Fixed another python2 vs python3 issue w/ epics-update R2.13 2018-12-11 Bruce Hill Fixed some python2 vs python3 compatibility issues. Reorganized some functions into new files to facilitate reuse of module dependency code by iocAdmin module. Fixed some epics-versions cases for handling --top Modified build checks of macros to test origin instead of just ifdef. Catches build problems where build gets EPICS_BASE, etc from env but EPICS convertRelease.pl fails due to undefined macros in RELEASE files. R2.12 2018-08-14 Bruce Hill Fixes paths from eco_modulelist when GIT_TOP is different. i.e. prod, offsite, etc Added ver soft link and tweaked default verbosity Normalized macro names for pvAccessCPP, pvDataCPP, etc. R2.11 2018-05-08 Bruce Hill Added support to epics-checkout for svn modules and ioc's. Consolidated code to fetch tags into one function each for cvs_utils, svn_utils, and git_utils. Fixes bug that caused eco failure for FastFeedback by not fetching git tags correctly. Fixed missing test of dirName before defaulting to MAIN_TRUNK when repo has no tags R2.10 2018-05-05 Bruce Hill Fixed issues when working off-site at LERF by testing before accessing AFS paths Fixed eco bug which set tag to dirName when it should not. Fixed initrepo & cvs2git and have them use -m and/or -d when provided. Added more options to where to look for common_dirs.sh Made eco_tools launch scripts simpler and more robust. R2.9 2018-05-01 Bruce Hill Added new gitGetVersionNumber() and use to avoid using --config for git version < 1.8 Fixed some issues if epics-update is asked to update the base version. Make edm directories read-only to avoid edm replacing screens in release dirs R2.8 2018-04-27 Bruce Hill Added --noCreateParent options and made createParent default to True Fixed batch file mode for eco. Added a check for cram info where epics-build would need it. Added new git utility gitGetRemoteFile(url,branchOrTag,filePath) R2.7 2018-04-19 Bruce Hill Added a --createParent option (-c) to force creation of parent dir w/ same name as package. Misc error handling and error output cleanup. Fixed epics-release.sh to handle quoted message args so now epics-release link can setup pkg_mgr env for epics-release.py. Allows python3 users to run epics-release. Disabled special case for extensions that cloned them under extensions-top repos as we're now building unbundled extensions. Added a --verbose flag to installLinks.py and made updates to previous links work. R2.6 2018-04-07 Bruce Hill Added support in installLinks.py for reading buildTop's from a configure/RELEASE file Make EPICS_BASE env var, if defined, first priority when deriving base version Fixed epics-versions for extensions and patterns like ioc/mec Add extension macros to pkgNamesToMacroNames.py Add installLinks soft link R2.5 2018-04-05 Bruce Hill Added display of old and new lines when epics-update changes release files. Fix missed import of git_utils at cvs2git_utils.py Modified update_pkg_dep_file() to handle commented out macros intelligently. Split out CVS related code from git_utils.py to cvs2git_utils.py Fix booleans in Releaser.py: False instead of FALSE R2.4 2018-03-24 Bruce Hill Added support for reading .versionFile soft link to find the versionFileName Reworked getEpicsPkgDependents for more accurate dependencies. Fix checkoutRelease to not remove build dir if git rev-parse can't find tag. Just need to do new fetch. Fixed initBareRepo to check if folder name already includes PACKAGENAME.git Modify epics-versions output to use MODNAME/VERSION notation for easier cut and paste Added checks in Releaser for writable dirs and fix as needed if user owns dir First version of installLinks.py. Use to create links for extensions release collections or other release management. Add the option to import EPICS Extensions to cvsModuleToGit.py. Fix the issue of creating the from_cvs repo inside the repo.git folder. R2.3 2017-12-15 Bruce Hill Re-enable git-utils/0.2.0 env so epics-build works on rhel5 systems. Added support for git URL's that end in a /, i.e. /path/to/bare-repo.git/ Improved error handling and disgnostics Added --dep option to epics-build which builds dependencies for specified dir. R2.2 2017-09-09 Bruce Hill Added recursive build of dependencies to Releaser.BuildRelease() Now epics-build can build multiple packages w/o needing them sorted by dependency order Made epics-versions and epics-build more robust w/ additional checks tee output to build.log Added check for target dir already existing Fixed how Releaser handles making soft links read-only. R2.1 2017-08-16 Bruce Hill Added check for valid --top in epics-build.py Made eco_tools not require CVSROOT in env as we're moving away from CVS and not everyone will have it. Added a few more special case MACRO names Modified Releaser to not rename any pre-existing diretories on build failures. Replaced obsolete branch info w/ packagePath in diag msg and made dryRun not do the tag. Added check for a configure directory in hasIncludeDotDotReleaseSite() to avoid errors for packages w/o a configure directory. Added check for a makefile before issuing make cmd in BuildRelease() R2.0 2017-06-03 Bruce Hill Added function to check if a macro is needed and used it to make eco work for newer modules in old base Rolling out new epics-update tool to help w/ updating RELEASE files. Initial options include: --RELEASE_SITE to update your TOP/RELEASE_SITE file from your env variables -p module/version One or more module dependency specifications to update. Fixed many issues for epics-release so it'll work for both svn and git Added function git_get_versionFileName() to fetch git config ecotools.versionfile Added prompts for if you updated your versionFile or RELEASE_NOTES Made output more user friendly by only showing the significant packagePath portions of directory paths for dependencies. Added support for using .cram/packageinfo to determine installDir Also loosened up tag name restrictions for epics-release Allow epics-checkout to support package specs w/a packagePath like extensions/edm. Also added --depth option so higher levels can determine whether or not to use shallow clones. Translates RELEASE macro names to module names for more user friendly output. Modified epics-checkout.py to call cloneMasterRepo() instead of using raw subprocess call. Allows eco to take advantage of faster and smaller release checkouts Created consistent usage and naming of package specification components. packageName - Always just the base name of the package: edm, asyn, base, etc packagePath - Includes package organization dirs: extensions/edm modules/asyn packageSpec - packagePath or packageName plus an optional release: modules/asyn/R30.1-0.1.0 Created a version file for the eco_tools version and add --verison support to each command line tool. R1.9 2017-04-17 Marcio Donadio - Now, if ../../RELEASE_SITE exists but is not included in a configuration file, $TOP/RELEASE_SITE is created Updated help and usage text w/ more examples and info Made templated ioc parent output only for -v and made it compatible with --wide output mode. Fixed typos in RELEASE_SITE.check Add -q option when checking out a tagged release to avoid confusing output for user. Fixed discrepancy between git and svn repos re how package is passed to Repo.BuildRelease(). Added check in svnRepo:CheckoutRelease() to see if package has already been checked out. R1.8 2017-04-06 Bruce Hill Added support for setting a TOP/configure/O.EPICS_HOST_ARCH/.is_built cookie to speed up epics-build for already built packages. Added tee to build.log in epics-build.sh Updated TEMPLATES path and expanded comments for absolute vs relative repo paths. Made BuildRelease failures rename build dir to R1.2-FAILED, but only if no target arch has previously built successfully. Exclude releases that end w/ FAILED from version report. Updated front-end launchers to all use git-utils-0.3.0 Updated cvsParseModules function to handle -d dirPath, aliases and &subModule notation in CVSROOT/modules file. Fixed some svn checkout issues. Fixed argument processing in epics-checkout when a flag follows the module name. i.e. Now this works: eco -m asyn --batch Use --recursive option when cloning in case there are submodules. Fixed epics-release function TagRelease and made it push current branch and tag to origin. Commented out code that created a branch w/ the tag name as git describe --tags is a better way to verify the tag. Moved the module parse functions from epics-checkout.py to cvs_utils.py and git_utils.py. Added --repoPath and --gitFolder options to cvsModuleToGit and cvsSpearModuleToGit and updated them to check the parsed module 2 location dictionaries for repoPath and gitFolder. R1.7 2017-03-02 Bruce Hill Tweaked RELEASE_SITE generation to make it identical w/ V_0_0_8 eco for pre R3.14.12.5 releases Moved export_release_site_file() from epics-checkout.py to version_utils.py Added cks for valid installTop dir and make it an absolute path. Improved test in checkoutModule() for whether or not desired tag is already checked out. R1.6 2017-02-27 Bruce Hill Use separate readlink to get canonical path for script vs the directory it's in. Fixes error finding eco_tools dir on double soft links. Fixed check for existing RELEASE_SITE file in epics-checkout.py Fixed some epic-release script issues when not specifying --noTag Use "git fetch origin refs/tags/tag_name" in gitRepo.py for fetching tags as it works w/ older and newer git versions Added -h and --help options to git-bare-repo.sh along s/ a soft link git-bare-repo for easier cmd line invocation. R1.5 2017-02-15 Bruce Hill Fixed some discrepancies between assemble_release_site_inputs_from_term() and assemble_release_site_inputs_from_file() by combining them into one function, assemble_release_site_inputs() with a batch parameter which is set to True for the old from_file() variant or if the --batch option is used on the cmd line. Added git-clone-github.sh script from GIT_TOP/package/epics/modules/git-clone-github.sh Added a variant called git-bare-repo.sh to facilitate creating bare repos w/ SLAC template Adding Kernel Module option to cvsModuleToGit.py R1.4 2017-02-10 Bruce Hill Fixed code in Releaser.py to set release files read-only and dirs writable. Also added some code in epics-build.py to derive installTop for EPICS modules when not supplied by cmd line param Made epics-checkout default for EPICS_MODULES use new EPICS_SITE_TOP if user changed it. Also suppress unneeded PSPKG_ROOT for pre 3.14.12.5 releases as none of them need it. Adding RELEASE_NOTES for R1.0, R1.1, R1.2, and R1.3 Made add-to-env.sh use git-utils-0.3.0 so we can use qgit Added Kernel Module option to cvsModuleToGit.py R1.3 2017-02-06 Bruce Hill Lots of cleanup to epics-release so it can pull package name from working dir for both svn and git. epics-release now works from svn and git working dirs w/ just -r and -m options. R1.2 2017-02-02 Bruce Hill Added conditional tests for creation/update of RELEASE_SITE 1. Not if its an EPICS base package, or not an EPICS package at all 2. Step on a RELEASE_SITE pulled from the repo? No for PCDS dest paths, Yes for LCLS Reorganized a bit to consolidate some cookie cutter code blocks to one function. Tweaked output order of macro definitions to more closely match prior eco and added some TODO comments re future features Added new epics path functions: isBaseTop, isEpicsPackage, isPCDSPath, and get_base_versions. Use readlink -f instead of pwd -P for canonical paths. Add git-utils-0.2.0 release to env in add_env_pkg.sh so developers and module mergers can run the module conversion scripts. R1.1 2017-02-02 Bruce Hill New routines in version_utils.py to determine epics_site_top and epics_base from env variables. Fixed various options for epics-build, epics-versions, epics-checkout, and epics-release. Made epics-release link invoke epics-release.py directly as all it needs is a python 2.7 version. That allows us to avoid issues w/ escaping quotes in epics-release.sh for --message parameters. Enhanced control over trunk branch for svnModuleToGit.py and made git_utils use our git repo template when creating new bare repos. R1.0 2017-01-14 Bruce Hill Took EPICS_BASE_VER out of RELEASE_SITE as R3.15 doesn't like to see two different macros w/ the same value like BASE_MODULE_VERSION and EPICS_BASE_VER Fixed some issues re when to create vs delete a local build branch created from the tag. Reworked the fixPermissions code to use python modules instead of shell commands and cleaned up some status and diagnostic messages for a better user experience. Added a nifty git script, git-branch-status, I found that makes it easy to keep track of whether your branches are ahead or behind their upstream branch. Fixed shell setup scripts for epics-build, epics-checkout, etc to run the version in the setup script directory instead of always going to TOOLS_SITE_TOP/eco_tools. Allows development to be done by simply sourcing the add-to-env,sh script. Updates to eco: Now it's a soft link to bash script that runs epics-checkout.py. There's also a soft link called epics-checkout to the same launch script. The command line options are the same as the prior eco script. However, now the first choice when epics-checkout searchs for the package location is a git repo, if available. The rational for this is tht the initial import of a cvs or svn package to git is easy and doesn't take long. Once in git, it's easier to do any new work using git, using lcls-trunk or pcds-trunk as needed till the merge is complete. The next stop on the search list is $TOOLS/eco_modulelist/modulelist.txt. If epics-checkout is having trouble finding your module, add a convenient shortcut name in eco_modulelist. Then CVS, and finally svn. If the package isn't found in any of those, it errors out. New EPICS utility scripts added: epics-build: Soft link to bash script that runs epics-build.py. Allows building one or more module releases either via command line or via a batch file. epics-versions: Soft link to bash script that runs epics-versions.py. Searches for the most current (or all) releases of one or more modules. Can also show module dependencies via -v option Also works for base, ioc/, and some other common patterns epics-release: Soft link to bash script that runs epics-release.py. Rework of a PCDS svn script that facilitates creating epics releases in a std fashion w/ one easy command V_0_0_8 5/6/2016, mshankar Initial version of svn support. Change command name to cvs2git per Mike Z. Improved documentation V_0_0_7 3/2/2016, mshankar Change the gitignore to iocBoot/*/envPaths Added *~ to the default .gitignore. V_0_0_6 2/19/2016, mshankar Add support for eco cvsimport V_0_0_5 2/18/2016, mshankar Move the dialogs to the front of the workflow. Use zenity to indicate success/failure. Some testing on eco initrepo Added a command initrepo that initializes an empty git repo. It also adds the package to eco_modulelist V_0_0_5 1/14/2016, mshankar Turn off the delimiters for the module name tab completion as well