Skip to content

Commit

Permalink
1.6.1dev: adapt to Subversion 1.14.5 which svn.fs.closest_copy retu…
Browse files Browse the repository at this point in the history
…rns `(None, None)` when no given copy exists instead `None` (closes #13867)

git-svn-id: http://trac.edgewall.org/intertrac/log:/branches/1.6-stable@17883 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
jomae committed Feb 7, 2025
1 parent 74073a6 commit 660c2b3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tracopt/versioncontrol/svn/svn_fs.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,9 +834,10 @@ def get_branch_origin(self):
(wraps ``fs.revision_root_revision(fs.closest_copy)``)
"""
root_and_path = fs.closest_copy(self.root, self._scoped_path_utf8)
if root_and_path:
return fs.revision_root_revision(root_and_path[0])
root, path = fs.closest_copy(self.root, self._scoped_path_utf8) or \
(None, None)
if root is not None:
return fs.revision_root_revision(root)

def get_copy_ancestry(self):
"""Retrieve the list of `(path,rev)` copy ancestors of this node.
Expand All @@ -849,9 +850,9 @@ def get_copy_ancestry(self):
while previous:
(previous_path, previous_rev, previous_root) = previous
previous = None
root_path = fs.closest_copy(previous_root, previous_path)
if root_path:
(root, path) = root_path
root, path = fs.closest_copy(previous_root, previous_path) or \
(None, None)
if root is not None:
path = path.lstrip(b'/')
rev = fs.revision_root_revision(root)
relpath = None
Expand Down

0 comments on commit 660c2b3

Please # to comment.