diff --git a/scmrepo/fs.py b/scmrepo/fs.py index b0908cd8..09d0ceb7 100644 --- a/scmrepo/fs.py +++ b/scmrepo/fs.py @@ -90,7 +90,7 @@ def _open( obj.size = bytesio_len(obj) return obj except KeyError as exc: - msg = os.strerror(errno.ENOENT) + f"in branch '{self.rev}'" + msg = os.strerror(errno.ENOENT) + f" in branch '{self.rev}'" raise FileNotFoundError(errno.ENOENT, msg, path) from exc except IsADirectoryError as exc: raise IsADirectoryError( diff --git a/scmrepo/git/backend/pygit2.py b/scmrepo/git/backend/pygit2.py index 58e6e3b0..d483efc8 100644 --- a/scmrepo/git/backend/pygit2.py +++ b/scmrepo/git/backend/pygit2.py @@ -646,7 +646,7 @@ def merge( return str(obj.id) if ff_pref & GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY: - raise SCMError("Cannot fast-forward HEAD to '{rev}'") + raise SCMError(f"Cannot fast-forward HEAD to '{rev}'") if commit: if not msg: