Skip to content

client: Fix revision parameter parsing when it is set to None#209

Merged
jelmer merged 2 commits intojelmer:mainfrom
anlambert:fix-none-revision-parsing
Mar 19, 2026
Merged

client: Fix revision parameter parsing when it is set to None#209
jelmer merged 2 commits intojelmer:mainfrom
anlambert:fix-none-revision-parsing

Conversation

@anlambert
Copy link
Contributor

When the revision or peg_revision parameter from numerous client methods
is set to None from Python it must be parsed on the rust side as
subversion::Revision::Unspecified to avoid unexpected behaviors when
calling related client methods.

This was the previous behavior with subvertpy < 0.12 with the extension
modules written in C.

Also the logic to select the right revision when revision or peg_revision
parameters are set as unspecified is already handled by the libsvn_subr
C library so there is no need to do it from rust.

Fixes #208.

I also noticed a couple of client methods were no longer offering the peg_revision parameter in 0.12 while they were in 0.11 so I restore them in another commit.

When the revision or peg_revision parameter from numerous client methods
is set to None from Python it must be parsed on the rust side as
subversion::Revision::Unspecified to avoid unexpected behaviors when
calling related client methods.

This was the previous behavior with subvertpy < 0.12 with the extension
modules written in C.

Also the logic to select the right revision when revision or peg_revision
parameters are set as unspecified is already handled by the libsvn_subr
C library so there is no need to do it from rust.
Client.list and Client.proplist were offering the peg_revision
parameter in subvertpy < 0.12 so restore them.
@jelmer jelmer merged commit 6f9dc97 into jelmer:main Mar 19, 2026
24 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

client regression in 0.12 related to revision parameters handling

2 participants