Use a non-newest git checkout in a buildout-based Plone site
I have a buildout-based Plone site, with an productive and a development/test instance. I noticed I currently have a problem building the development instance, and the difference which is likely to be related to the problem is different versions of a product which is “developed” in both instances.
Unfortunately the older version is the one which works … so I tried to reset that package to the older revision and rebuild:
- Using git for a project with many, many repos
- Openshift plone quickstart permission denied
- Develop whole Zope&Plone app in git (decentralised and without ZMI)
cd /path/to/my/instance . bin/activate cd src/plone.formwidget.recaptcha/ git checkout a0c334406c0d991f4facedce0334ab5566729b2f cd - bin/buildout buildout:newest=false
buildout tries to pull, and fails:
mr.developer: git pull of 'plone.formwidget.recaptcha' failed. mr.developer: You are not currently on a branch. Please specify which mr.developer: branch you want to merge with. See git-pull(1) for details. mr.developer: mr.developer: git pull <remote> <branch> mr.developer: mr.developer:
Well, I don’t want a
git pull to occur; so I looked for mr.developer options to help and added
mr.developer:auto-checkout= to the command line.
There is still that
git pull. How can I suppress it? And what would be the recommended way to pin the package to the desired revision?
2 Solutions collect form web for “Use a non-newest git checkout in a buildout-based Plone site”
With mr.developer you can fix a checkout to a fixed revision:
my.package = git git://some.url.git rev=abcdef
my.package will always be pointint to
abcdef, which can be either a branch or a revision sha.
For other version control systems, see mr.developer docs.
I cannot help you with your build process, but you can make a simple hack to prevent pull from failing.
git checkout -b temp a0c334406c0d991f4facedce0334ab5566729b2f git branch temp2 temp git branch --set-upstream-to=temp2 temp
Since both branches are pointing to the same place you will have any issues.
If you need to do this again, you will need to redo the two fake branches. It is probably easier to just delete them (which should be done when you are done anyway.)
git branch -D temp temp2