Provide deb-version substitute {svn}
Bug #412722 reported by
Dimitri John Ledkov
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bzr-builder |
Fix Released
|
Low
|
Jelmer Vernooij |
Bug Description
Bzr can handle svn, git and a little bit of hg.
I'm turning into daily builds a svn based project. It has a bzr branch on launchpad and all is fine.
But in the daily builds I'd rather have +svn{revno:svn} instead of +bzr{revno}.
Upstream hasn't switched to bzr yet (I'm trying ;-) ) and it would be nice to be able to report svn revision numbers instead of revision number bzr-svn came up with (there is a difference)
ps. this is not svn native co which is operated with bzr. It's a bzr-svn branch eg bzr branch https:/
Feel free to experiment with lp:xiphos it has ~1000 difference between bzr revision numbr and svn revision number.
Related branches
lp:~jelmer/bzr-builder/svn-substitute
- bzr-builder developers: Pending requested
-
Diff: 135 lines (+83/-7)2 files modifiedrecipe.py (+62/-7)
tests/test_recipe.py (+21/-0)
summary: |
- Revno for foreign branches eg svn, git, hg etc + Provide deb-version substitute {svn} |
Changed in bzr-builder: | |
status: | New → In Progress |
Changed in bzr-builder: | |
importance: | Undecided → Low |
tags: | added: extra-substvars |
Changed in bzr-builder: | |
status: | Confirmed → Triaged |
Changed in bzr-builder: | |
status: | Triaged → In Progress |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in bzr-builder: | |
status: | In Progress → Fix Committed |
Changed in bzr-builder: | |
milestone: | none → 0.7 |
Changed in bzr-builder: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Recent bzr-svn generates revno / revid which looks like this:
In [13]: b.last_ revision_ info() 95a4280c- 1b0e-0410- 9f8f-80a059958c 3c:trunk: 3257')
Out[13]: (2311, 'svn-v4:
So to substitute {svn} in deb_version revision:
1) check that it starts with 'svn-v4'
2) And strip rev-id to last ":" and return last digits as {svn}
I've tried to write a patch myself but I failed =(
As far as I understood it a new def is required in class BaseRecipeBranch.
I took substitute as a template basis but I don't see where get_revno_cb() is defined and where should I place alternative get_svn_revno_cb() which will return svn revision as bisected above.