Configure background fetch to only operate on repositories in that window

30 views
Skip to first unread message

Chris Jaquet

unread,
Jul 1, 2021, 6:09:55 AMJul 1
to SmartGit

Good morning,

It seems that the background fetch operation is not "global" but can operate for each window that is open. (Please correct me if I am wrong.) I understand that SmartGit always only has one instance running, regardless of how many windows are open. My workflow uses the repository grouping to manage the very large number of repositories I work with (approx. 100 repositories in each group) so I often have four or five windows open, along with various log views.

The problem I am experiencing is that when a background fetch starts in any particular window, it fetches for all the open repositories across all windows, rather than just the repositories for that specific window. This appears to have the following side effects:
  1. The UI is "locked" (i.e. you cannot interact with repos) during a background fetch and since I have so many repos open, background fetches take a very long time so I usually Cancel the fetch in the command output window. Canceling means that all windows' repo states are now stale in all windows (no green arrows for incoming changes), rather than just the window where I pressed cancel.
  2. I think that because I have so many repos open that multiple background fetches start happening (or are queued to start happening) in different windows at the same time, so often as soon as the background fetch has canceled, it immediately starts a new one, which I must also cancel.
  3. The UI is only disabled in the window that is performing the background fetch, which means I can still interact with a repo currently being background fetched in the window where I actually opened it if they are different windows. Can this result in conflicts, e.g. pulling that repo while it is being fetched?
So, my questions are:
  1. Is it possible to ask SmartGit to only perform background fetches for the repos open in the current window? This way canceling will only cancel the background fetches for that window, not affecting repos open in other windows.
  2. Should I be cautious and make all background fetch processes stop before trying to interact with any repos in any windows to prevent possible repo "corruption", or will git itself prevent this?
I would rather not disable background fetches since it is an incredibly useful feature, especially given the large number of repos I have to work with. Knowing which repos to pull is a great time saver.

Please let me know if there is any other info I can provide.

Kind regards,
Chris

Asbjørn Mikkelsen

unread,
Jul 1, 2021, 6:30:29 AMJul 1
to smar...@googlegroups.com
I have been discussing this with SmartGit also, it feels like this is something that have changed in the later versions, in version 18/19, I think this was smoother, is that just my imagination?

Anyway, I also have many repositories to group our project, 23 repositories, of which 11 is "favorites", I used to have background fetch/update, to see when repositories are updated, an to know what I need to lookout for when pulling.
But now I have to turn it off, because the UI is blocked while fetch is going on.

I would propose that when a repository is marked as remote changed (the green arrow), then the fetch could be done for that repo, but not blindly fetch all repos at all time which blocks.
From time to time I have been thinking about doing something myself on the commandline, "foreach directory do git fetch" :)

I'm using bitbucket btw, I wonder if bitbucket also have become much slower lately, if that would contribute to this.






--
You received this message because you are subscribed to the Google Groups "SmartGit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smartgit+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smartgit/9e48fe4c-8b01-487d-a2ff-2bf238bf423an%40googlegroups.com.


--
mvh
Asbjørn

syntevo Support

unread,
Jul 1, 2021, 6:45:56 PMJul 1
to smar...@googlegroups.com
> The problem I am experiencing is that when a background fetch starts in any
> particular window, it fetches for all the open repositories across all
> windows, rather than just the repositories for that specific window.

Thanks for reporting, Chris and Asbjørn ... now I understand. For N repositories to fetch with M windows open, this will actually result in N*M fetches which will quickly block everything.

For 21.1 build 17127 this should be fixed now. There is also another problem fixed which might result in breaking the periodical fetches entirely if two or more windows are open (though this might be unlikely to occur with reasonable delays which are not too short).

You can download 21.1 RC from:

https://www.syntevo.com/smartgit/preview/

and then invoke Help|Check for Latest Build

--
Best regards,
Marc Strapetz
syntevo GmbH
http://www.syntevo.com


07/01/2021 12:10 - Chris Jaquet wrote:

>
> Good morning,
>
> It seems that the background fetch operation is not "global" but can
> operate for each window that is open. (Please correct me if I am wrong.) I
> understand that SmartGit always only has one instance running, regardless
> of how many windows are open. My workflow uses the repository grouping to
> manage the very large number of repositories I work with (approx. 100
> repositories in each group) so I often have four or five windows open,
> along with various log views.
>
> The problem I am experiencing is that when a background fetch starts in any
> particular window, it fetches for all the open repositories across all
> windows, rather than just the repositories for that specific window. This
> appears to have the following side effects:
>
> 1. The UI is "locked" (i.e. you cannot interact with repos) during a
> background fetch and since I have so many repos open, background fetches
> take a very long time so I usually Cancel the fetch in the command output
> window. Canceling means that all windows' repo states are now stale in all
> windows (no green arrows for incoming changes), rather than just the window
> where I pressed cancel.
> 2. I think that because I have so many repos open that multiple
> background fetches start happening (or are queued to start happening) in
> different windows at the same time, so often as soon as the background
> fetch has canceled, it immediately starts a new one, which I must also
> cancel.
> 3. The UI is only disabled in the window that is performing the
> background fetch, which means I can still interact with a repo currently
> being background fetched in the window where I actually opened it if they
> are different windows. Can this result in conflicts, e.g. pulling that repo
> while it is being fetched?
>
> So, my questions are:
>
> 1. Is it possible to ask SmartGit to only perform background fetches for
> the repos open in the current window? This way canceling will only cancel
> the background fetches for that window, not affecting repos open in other
> windows.
> 2. Should I be cautious and make all background fetch processes stop
> before trying to interact with any repos in any windows to prevent possible
> repo "corruption", or will git itself prevent this?
>
> I would rather not disable background fetches since it is an incredibly
> useful feature, especially given the large number of repos I have to work
> with. Knowing which repos to pull is a great time saver.
>
> Please let me know if there is any other info I can provide.
>
> Kind regards,
> Chris
>

Chris Jaquet

unread,
Jul 2, 2021, 5:02:58 AMJul 2
to SmartGit
Thanks for the update. I have downloaded it and will test it out for a bit, then provide further feedback.

Kind regards,
Chris

Chris Jaquet

unread,
Jul 2, 2021, 7:45:34 AMJul 2
to SmartGit
The update has fixed the issue, thanks. Only the repos in the open window are now being background fetched. Thanks for all the help and the speedy turnaround time.
Reply all
Reply to author
Forward
0 new messages