Comments (6)
This was actually a glitch which got silently fixed with this commit. It should have never worked and actually never has on a Jenkins. There "tags/" was already added since the beginning.
If I understand correctly you have a multiPackage where you set a variable that is used for the common checkoutSCM. This variable could point to any tag, branch or commit? In this case we could introduce a new "ref" property. It could have the following format and that would unify the "branch", "tag" and "commit" properties:
- -> commit
- refs/heads/ -> branch
- refs/tags/ -> tag
Would that match your use case?
from bob.
Yes.
I've tried to remember what the reason was, we are using tag:
-- maybe it was, because branch:
didn't had the error. But isn't there a different behavior for tag:
and branch:
? Such as branch:
always updating and tag not because a tag is deterministic?
from bob.
Good point. That is an important distinction that I forgot.
I'll prepare a prototype. Not sure that I'll have it ready this week, though.
from bob.
I've pushed a prototype of the new 'rev' property to a topic branch (git-scm-rev-property). It implements a new property that unifies the branch/tag/commit properties. It does retain all properties of the existing ones, e.g. "refs/tags/..." is considered deterministic. The documentation is also available on the branch.
Could you please have a look if it works for you? If yes I would add some more unit tests and merge the feature.
from bob.
I have tested the prototype and it works for what we are doing.
If you had created a (WIP)-Pull-Request, it would have been easier to comment on the code ...
I don't think it's a good idea to only accept commit-IDs of full length:
rev = spec["rev"]
if rev.startswith("refs/heads/"):
self.__branch = rev[11:]
elif rev.startswith("refs/tags/"):
self.__tag = rev[10:]
elif len(rev) == 40:
self.__commit = rev
else:
raise ParseError("Invalid rev format: " + rev)
The following test for hex numbers is sufficient as far as I am concerned.
from bob.
Cool. A pull request would certainly have made it easier. I will add some test and merge it...
Regarding the commit-ID: even though git accepts prefixes of commit IDs they have to be unambiguous. This depends on the context. One could argue that >64bits of commit ID are unique enough but I'm not sure where to draw the line. I would like to keep the full commit id for that reason. BTW, the regex is testing for 40 characters too.
from bob.
Related Issues (20)
- Trying to build a non-existend package should be an error HOT 4
- Always use python as extractor on native Windows HOT 5
- empty 'set' in scmOverrides not handled HOT 1
- Exception in common IDE generator
- Bob 0.22.0 misses sandbox HOT 7
- Azure Archive is broken HOT 7
- checkoutUpdateIf: run checkout script if recipe changed? HOT 1
- bob rebuilds everytime if environment changed by bob -c HOT 3
- python3.11 pip install failing HOT 2
- latest sphinx version breaks pip install HOT 7
- "bob status" seems to get confused when different tags exist for the same commit HOT 3
- Shared packages are corrupted if recipe changes
- Pwsh language: Usage of undefined variable in function "mangleFingerprints" HOT 2
- bob fails mid air with a stacktrace HOT 3
- binary archive: check recipes against archives? HOT 3
- native windows: control of PATH white-list HOT 3
- Build steps can get finished with large delay in multi job mode HOT 5
- 0.19.1 internal exception HOT 1
- gitscm: branch "issue" HOT 1
- Pseudoterminals failing in sandbox HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bob.