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

svnversion should not be executed by default #6681

Closed
asomers opened this issue Feb 29, 2020 · 9 comments
Closed

svnversion should not be executed by default #6681

asomers opened this issue Feb 29, 2020 · 9 comments

Comments

@asomers
Copy link
Contributor

asomers commented Feb 29, 2020

> fish --version
fish, version 3.1.0
> uname -a
FreeBSD fbsd-head.lauralan.noip.me 13.0-CURRENT FreeBSD 13.0-CURRENT #58 r358258M: Sun Feb 23 14:50:10 MST 2020     somers@fbsd-head.lauralan.noip.me:/usr/obj/usr/home/somers/freebsd/base/head/amd64.amd64/sys/GENERIC  amd64
> echo $TERM
xterm-256color

Fish 3.1.0 "helpfully" runs svnversion and svn status in order to change the prompt, whenever it detects that the pwd is part of a subversion working copy. That feature is probably handy when working in small repositories. But in a large repository, those commands take far too much time, especially so if the pwd lies on a remote file system. For example, on my system I have /usr/home mounted over NFS. In my FreeBSD source tree, svnversion and svn status take a combined 42 seconds to run. And fish runs them after every single command. That makes the shell entirely unusable.

I notice that fish runs git branch in git repositories. That's fine; git branch is fast. But I believe that no command that traverses the entire tree should be run by default, just to change the prompt.

@faho
Copy link
Member

faho commented Feb 29, 2020

Blergh.

Yeah, it would be lovely if svn had a thing that can just display the branch, which is why the git prompt is so much faster (well, that and git just being faster than svn and hg in general).

I see we do command svn info in fish_svn_prompt. What does that print and is it acceptably fast?

@faho faho added this to the fish 3.2.0 milestone Feb 29, 2020
@asomers
Copy link
Contributor Author

asomers commented Feb 29, 2020

svn info prints something like the following, and it is fast since it doesn't have to examine the entire WC:

> svn info
Path: .
Working Copy Root Path: /usr/home/somers/freebsd/base
URL: svn+ssh://asomers@repo.freebsd.org/base/head/sys
Relative URL: ^/head/sys
Repository Root: svn+ssh://asomers@repo.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 358258
Node Kind: directory
Schedule: normal
Last Changed Author: rlibby
Last Changed Rev: 358258
Last Changed Date: 2020-02-22 20:32:16 -0700 (Sat, 22 Feb 2020)

@faho
Copy link
Member

faho commented Mar 1, 2020

Hummm... so what part of that output would be of interest in a prompt?

I'm probably too used to git et al, so I'd be expecting a branch. Is that useful for svn? Or would we use the revision? Or just an indication that you are in an svn repo?

@asomers
Copy link
Contributor Author

asomers commented Mar 1, 2020

svn doesn't have a concept of "branch". You're branch is just part of the URL, and that's too long for the prompt. I don't think the revision would be useful, either.

@faho
Copy link
Member

faho commented Mar 1, 2020

So what should this show? Is there a useful thing to show other than the full file information (which we've ascertained is too slow)?

@asomers
Copy link
Contributor Author

asomers commented Mar 1, 2020

Probably not. In this case I don't think there's anything that's really better than nothing. (For git directories, though, I am liking the branch name).

@faho faho closed this as completed in 0f34459 Mar 1, 2020
@faho
Copy link
Member

faho commented Mar 1, 2020

It's a shame, but I just commented it in fish_vcs_prompt now. That gives it a fighting chance to be discovered.

@asomers
Copy link
Contributor Author

asomers commented Mar 1, 2020

Thanks for the quick fix!

faho added a commit that referenced this issue Mar 5, 2020
This is apparently quite slow on large svn repos (like 40 seconds
slow), and we don't have a good thing to display other than the full
file information.

So we'll have to disable it for now.

Fixes #6681.

[ci skip]
@faho
Copy link
Member

faho commented Mar 5, 2020

Cherry-picked to 3.1.1 as c37a425.

@faho faho modified the milestones: fish 3.2.0, fish 3.1.1 Mar 5, 2020
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Apr 18, 2020
Upstream bug #6681 causes fish to run _very_ slowly inside of large
Subversion repositories.  The bug will be fixed in release 3.1.1.  But it's
worthwhile to cherry-pick the fix since all FreeBSD developers use large
Subversion repositories.

fish-shell/fish-shell#6681


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@532045 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Apr 18, 2020
Upstream bug #6681 causes fish to run _very_ slowly inside of large
Subversion repositories.  The bug will be fixed in release 3.1.1.  But it's
worthwhile to cherry-pick the fix since all FreeBSD developers use large
Subversion repositories.

fish-shell/fish-shell#6681
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue Apr 19, 2020
Upstream bug #6681 causes fish to run _very_ slowly inside of large
Subversion repositories.  The bug will be fixed in release 3.1.1.  But it's
worthwhile to cherry-pick the fix since all FreeBSD developers use large
Subversion repositories.

fish-shell/fish-shell#6681


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@532045 35697150-7ecd-e111-bb59-0022644237b5
ericbsd pushed a commit to ghostbsd/ghostbsd-ports that referenced this issue Apr 22, 2020
Upstream bug #6681 causes fish to run _very_ slowly inside of large
Subversion repositories.  The bug will be fixed in release 3.1.1.  But it's
worthwhile to cherry-pick the fix since all FreeBSD developers use large
Subversion repositories.

fish-shell/fish-shell#6681
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants