Mailinglist Archive: opensuse-buildservice (275 mails)

< Previous Next >
[opensuse-buildservice] Re: [PATCH] - do_update: rewrote code path for expanding/unexpanding a wc
On 2012-03-29 12:20:34 +0200, Michael Schroeder wrote:
On Wed, Mar 28, 2012 at 10:45:34PM +0200, OBS osc wrote:
From: Marcus Huewe <suse-tux@xxxxxx>

The way for determining the revision was completely "wrong".
- rev = show_upstream_xsrcmd5(p.apiurl,
p.prjname,, revision=p.rev, linkrev='base')
- p.mark_frozen()
- else:
- p.update(rev,
opts.server_side_source_service_files, opts.limit_size)
- rev = p.linkinfo.xsrcmd5
+ rev = p.latest_rev(expand=True)
print 'Expanding to rev', rev
elif opts.unexpand_link and p.islink() and p.isexpanded():
- p.update(rev, opts.server_side_source_service_files,
- # XXX: calling update again is redundant (see below)
- rev = p.rev
+ rev = show_upstream_rev(p.apiurl, p.prjname,,
print 'Unexpanding to rev', rev

That can't work if you didn't check out the latest version, but some
older rev.

Really, you can check out an expanded link (by supplying the xsrcmd5)
and then it should be possible to switch to the unexpanded view.
That's what the linkrev's lsrcmd5 is for. If you're not using it
you're doing somethink wrong ;)

IMHO it's a semantic question: what is "osc up -e" and "osc up -u"
supposed to do? The old behaviour was:
"osc up -e": update to the latest rev and expand it
"osc up -u": update to the current rev and don't expand it

That behaviour is (IMHO) inconsistent. Therefore I changed it to:
"osc up -e": update to the latest rev and expand it
"osc up -u": update to the latest rev and don't expand it

In the latter case the "show_upstream_rev" should be ok (the "plain"
rev returned by show_upstream_rev and the lsrcmd5 refer to the
same "entity") or am I wrong?

Now the question is: what is the expected behaviour for "osc up -u/-e"?

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups