Open ggardet opened 10 months ago
I'm afraid I'm unable to reproduce the behavior. I used the latest osc from master, but that shouldn't be that far from 1.5.0.
Here's what I tried:
git clone https://github.com/openSUSE/osc.git
cd osc/behave
./container-pull.sh
./container-run.sh
# username is Admin
# password is opensuse
copypac -r 1 test:factory test-pkgA home:Admin
>>> Sending meta data...
>>> Copying files...
>>> <revision rev="1" vrev="1">
>>> ...
>>> <comment>osc copypac from project:test:factory package:test-pkgA revision:1</comment>
>>> ...
osc -A https://localhost:1443 cat test:factory test-pkgA test-pkgA.spec
>>> Version: 1 - corresponds with revision 1
osc -A https://localhost:1443 sr -r 1 test:factory test-pkgA test:factory -m "revert to rev 1" --nodevelproject
# --nodevelproject is important, otherwise osc attempts to submit the request from the devel project instead
>>> created request id 1
osc -A https://localhost:1443 rq show 1 --diff
>>> -Version: 3
>>> +Version: 1
The behaviour is most likely correct, but surprising. The reason is that the old revision of the unexpanded source contains a link to latest source revision of the package in openSUSE:Factory.
However, we should make it possible at least to copy the old sources merged as they were on commit time.
So we may add an option like
osc copypac --expand-rev=110 ...
which then would make the api call with
..&expand&orev=110&olinkrev=base
It would result in an expanded copy without a link. So the user would need to specify the target on "osc sr".
The alternative would be to do the copy like we do today, but modifing the _link file afterwards to reference to the link target old revision.
Describe the bug osc commands with revision are broken since it ignores revision setting. For example:
returns a copy of the current revision instead of revision 110. Another one is submitting an older revision:
which returns:
Versions
To Reproduce Try one of the commands above, or similar.
Expected behavior We should be able to checkout, copy or submit older revisions.
Screenshots, console outputs N/A
Additional context N/A