Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git: reuse most recent backend when possible #51

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

pmrowla
Copy link
Contributor

@pmrowla pmrowla commented Mar 28, 2022

  • When selecting a backend to use for a given git call, we will now try the most recently used backend first, before trying the remaining backends
  • If we are switching backends, close the previously used backend before making the git call w/new backend

Should fix iterative/dvc#7458

@pmrowla pmrowla self-assigned this Mar 28, 2022
@@ -71,6 +77,10 @@ def reset_all(self) -> None:
for backend in self.initialized.values():
backend._reset() # pylint: disable=protected-access

def move_to_end(self, key: str, last: bool = True):
Copy link
Contributor Author

@pmrowla pmrowla Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could just make this move_to_head() and get rid of the last option (since that's all we will ever use), but I went with this for now to stay consistent with the OrderedDict call

@pmrowla pmrowla marked this pull request as ready for review March 30, 2022 04:44
@pmrowla pmrowla merged commit 49024b9 into iterative:main Mar 30, 2022
@pmrowla pmrowla deleted the pygit-merge-nfs branch March 30, 2022 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

exp run: cannot clean up temp directory runs on Linux + NFS
1 participant