- Commits:
-
Summary ID Author 6f101b1efcb232d48d2ebee12194aa0d9dd01be3 Andre Klitzing a3a504b58fc175d0eff3b240c65d6c4760bf0481 Andre Klitzing 414e2b36569a8a28450a645be93380dc6f5c486f Andre Klitzing 21d2ca3192a8382660e9c7637ec603bf4352c7ba Andre Klitzing - Diff:
-
Revision 2 (+78 -2)
Use fsnotify to refresh hgweb
Review Request #2412 — Created March 31, 2023 and discarded
If a repository got renamed or removed hgweb was not updated and
show the old repository in the index. Also the new repo path
was not added.So let's add a watcher to refreshes it immediately.
Summary | ID | Author |
---|---|---|
71af3d389d47d07a461a85b61456ed8adb2cb465 | Andre Klitzing |
Description | From | Last Updated |
---|---|---|
I will try something else... so lets wait here. :-) |
aklitzing@gmail.com | |
you can drop waitForEvent and just use a break on line 24. |
grim | |
This code assumes that the go routine for previous watcher has finished. I'm not very familar with the fsnotify package, … |
grim | |
Maybe we should add the parent directory only if not already watched. Otherwise we will watch all content in that … |
aklitzing@gmail.com |
- Commits:
-
Summary ID Author 414e2b36569a8a28450a645be93380dc6f5c486f Andre Klitzing 21d2ca3192a8382660e9c7637ec603bf4352c7ba Andre Klitzing c180cfdb8b6021c09186deed742c0348ca352514 Andre Klitzing 7a246d766172adef77fa60c2c2032dae358d8ae4 Andre Klitzing - Diff:
-
Revision 3 (+78 -2)
- Summary:
-
Use fsnotify to refresh hgwebUse fsnotify to refresh hgweb, enforcer and keys
- Description:
-
If a repository got renamed or moved hgweb was not updated and
show the old repository in the index. Also the new repo path was not added. + It watches all files in hgkeeper repo, too. So it this
+ is changed by an admin manually this will be refreshed, too. + So let's add a watcher to refreshes it immediately.
This fixes HGKEEPER-25.
- - Use fullname for COPYRIGHT
- Commits:
-
Summary ID Author c180cfdb8b6021c09186deed742c0348ca352514 Andre Klitzing 7a246d766172adef77fa60c2c2032dae358d8ae4 Andre Klitzing 7b2e2670d20f8cac07fa9d821bc5f6199fecd8bd Andre Klitzing - Diff:
-
Revision 4 (+72)
- Description:
-
If a repository got renamed or moved hgweb was not updated and
show the old repository in the index. Also the new repo path was not added. ~ It watches all files in hgkeeper repo, too. So it this
~ It watches files in hgkeeper repo, too. So it this
is changed by an admin manually this will be refreshed, too. So let's add a watcher to refreshes it immediately.
This fixes HGKEEPER-25.
-
-
Maybe we should add the parent directory only if not already watched. Otherwise we will watch all content in that directory, too. That would be nice in hgkeeper working directory. But
Refresh()
hgkeeper repo stuff if another repository has an updated working-directory is strange.Maybe you want to change this a little bit. :-)
- Change Summary:
-
meta data tweaks
- Description:
-
If a repository got renamed or moved hgweb was not updated and
show the old repository in the index. Also the new repo path was not added. ~ It watches files in hgkeeper repo, too. So it this
~ It watches files in hgkeeper repo, too. So if this
is changed by an admin manually this will be refreshed, too. So let's add a watcher to refreshes it immediately.
- - This fixes HGKEEPER-25.
- Bugs:
-
-
-
This code assumes that the go routine for previous watcher has finished. I'm not very familar with the
fsnotify
package, but I'm also worried we're going to trigger this a lot.For example, a push to the admin repo is going create multiple file system events, which, if I'm not mistaken, is going to run the refresh multiple times when it really just needs to be once during that push.
Maybe we need to cancel the
fsnotify.Watcher
while we're getting an admin repo update?That wouldn't cover the case where someone renames a repository and a bunch of files change though. So maybe we need a way to manually add stop and create the watcher, so that we can better control it.
For example, during admin repo push, stop the watcher, handle the push, and then
access.Refresh
and tell it to create thefsnotify.Watcher
.Likewise, the
fsnotify.Watcher
should ignore additional events for some duration of time, or not create itself until the queue of events is gone?Actually do we need to recreate this each time? If we can just have a single instance and tell it to ignore events for a bit, that seems like the best case.
- Summary:
-
Use fsnotify to refresh hgweb, enforcer and keysUse fsnotify to refresh hgweb
- Commits:
-
Summary ID Author 7b2e2670d20f8cac07fa9d821bc5f6199fecd8bd Andre Klitzing cefac11acf0c00adb881041dea5d477930d79c82 Andre Klitzing - Diff:
-
Revision 5 (+86)
- Description:
-
~ If a repository got renamed or moved hgweb was not updated and
~ If a repository got renamed or removed hgweb was not updated and
show the old repository in the index. Also the new repo path was not added. - It watches files in hgkeeper repo, too. So if this
- is changed by an admin manually this will be refreshed, too. - So let's add a watcher to refreshes it immediately.
- Commits:
-
Summary ID Author cefac11acf0c00adb881041dea5d477930d79c82 Andre Klitzing 71af3d389d47d07a461a85b61456ed8adb2cb465 Andre Klitzing - Diff:
-
Revision 6 (+96)