Merge lp:~umang/quickly/593404-share-ver into lp:quickly

Proposed by Umang Varma
Status: Rejected
Rejected by: Didier Roche-Tolomelli
Proposed branch: lp:~umang/quickly/593404-share-ver
Merge into: lp:quickly
Diff against target: 40 lines (+10/-13)
1 file modified
data/templates/ubuntu-application/internal/packaging.py (+10/-13)
To merge this branch: bzr merge lp:~umang/quickly/593404-share-ver
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Needs Fixing
Review via email: mp+30749@code.launchpad.net

Description of the change

Fixed lp:593404.

I've changed the updateversion so that the version while sharing is `<old_version>+r<bzr_revno>`.

I've not touched anything else, and I'm not sure whether I was supposed to or not. Like before, the version is saved to setup.py after sharing - I've not changed that. Let me know if fixing lp:593404 involved that also.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Thanks for your merge request there.

I think we don't need "-public" if we include +r<rev> there. Let's discuss the naming on IRC, shall we?
Thanks again for your work ;)

review: Needs Fixing
Revision history for this message
Umang Varma (umang) wrote :

On 08/03/2010 01:30 PM, Didier Roche wrote:
> Let's discuss the naming on IRC, shall we?
Sure. I can't say for sure when I'll have time this week, but I'll try
anyway.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I think this MR doesn't apply anymore, cleaning the list :)

Unmerged revisions

525. By Umang Varma

Fixed lp:593404. `quickly share` now shares with the following version number
format: "<oldversion>+r<bzr_revno>".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/templates/ubuntu-application/internal/packaging.py'
2--- data/templates/ubuntu-application/internal/packaging.py 2010-06-25 11:16:49 +0000
3+++ data/templates/ubuntu-application/internal/packaging.py 2010-07-23 09:11:26 +0000
4@@ -21,6 +21,7 @@
5 import sys
6
7 from bzrlib.workingtree import WorkingTree
8+from bzrlib.branch import Branch
9
10 from quickly import configurationhandler
11 from quickly import launchpadaccess
12@@ -339,19 +340,15 @@
13
14 # sharing only add -publicX to last release, no other update, no bumping
15 if sharing:
16- splitted_release_version = old_version.split("-public")
17- if len(splitted_release_version) > 1:
18- try:
19- share_version = float(splitted_release_version[1])
20- except ValueError:
21- msg = _("Share version specified after -public in "\
22- "setup.py is not a valid number: %s") \
23- % splitted_release_version[1]
24- raise invalid_versionning_scheme(msg)
25- new_version = splitted_release_version[0] + '-public' + \
26- str(int(share_version + 1))
27- else:
28- new_version = old_version + "-public1"
29+ # remove -public (applies if last share was with old YY.MM-publicX
30+ # version)
31+ new_version = old_version.split("-public")[0]
32+ # remove +r[0-9]+ if last version was with new
33+ # <previous-version>+r<bzr_revno>
34+ new_version = new_version.split("+")[0]
35+ cur_branch = Branch.open(".")
36+ bzr_revno = cur_branch.revno()
37+ new_version = "%s+r%d"%(new_version, bzr_revno)
38
39 # automatically version to year.month(.subversion)
40 else:

Subscribers

People subscribed via source and target branches