Skip to content

Accept -1 as HEAD revision and canonicalize paths/URLs#205

Merged
jelmer merged 1 commit intomainfrom
canonicalize
Mar 17, 2026
Merged

Accept -1 as HEAD revision and canonicalize paths/URLs#205
jelmer merged 1 commit intomainfrom
canonicalize

Conversation

@jelmer
Copy link
Owner

@jelmer jelmer commented Mar 17, 2026

  • Add to_revnum_or_head() that maps negative revision numbers to Revnum::invalid() (SVN_INVALID_REVNUM), which SVN interprets as HEAD. Replace all to_revnum().ok_or_else() patterns with this function.
  • Add to_relpath() helper for proper SVN relpath canonicalization. Replace ad-hoc trim_start_matches('/') with RelPath::canonicalize().
  • Canonicalize URLs in RemoteAccess.init() and reparent() to prevent assertion failures in libsvn.
  • Canonicalize URLs in wc.ensure_adm().

- Add to_revnum_or_head() that maps negative revision numbers to
  Revnum::invalid() (SVN_INVALID_REVNUM), which SVN interprets as HEAD.
  Replace all to_revnum().ok_or_else() patterns with this function.
- Add to_relpath() helper for proper SVN relpath canonicalization.
  Replace ad-hoc trim_start_matches('/') with RelPath::canonicalize().
- Canonicalize URLs in RemoteAccess.__init__() and reparent() to prevent
  assertion failures in libsvn.
- Canonicalize URLs in wc.ensure_adm().
@jelmer jelmer merged commit 843fed7 into main Mar 17, 2026
49 of 79 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.

1 participant