Skip to content

Conversation

zeripath
Copy link
Contributor

Repository Transfer requires that the repository directory is renamed - which
is not possible on Windows if the git repository is open.

Fix #17885

Signed-off-by: Andrew Thornton art27@cantab.net

Repository Transfer requires that the repository directory is renamed - which
is not possible on Windows if the git repository is open.

Fix go-gitea#17885

Signed-off-by: Andrew Thornton <art27@cantab.net>
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Dec 20, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 20, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #18049 (a97a6e8) into main (1c7db70) will decrease coverage by 0.02%.
The diff coverage is 47.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18049      +/-   ##
==========================================
- Coverage   45.20%   45.18%   -0.03%     
==========================================
  Files         823      824       +1     
  Lines       91371    91441      +70     
==========================================
+ Hits        41305    41317      +12     
- Misses      43471    43528      +57     
- Partials     6595     6596       +1     
Impacted Files Coverage Δ
cmd/dump.go 0.89% <0.00%> (ø)
models/asymkey/ssh_key_verify.go 0.00% <ø> (ø)
modules/log/colors.go 69.86% <0.00%> (ø)
modules/util/path.go 56.17% <0.00%> (ø)
routers/api/v1/repo/pull.go 28.69% <0.00%> (-0.15%) ⬇️
routers/api/v1/repo/transfer.go 56.52% <0.00%> (-3.95%) ⬇️
routers/web/repo/pull.go 30.38% <0.00%> (-0.17%) ⬇️
routers/web/repo/repo.go 31.87% <0.00%> (-0.31%) ⬇️
routers/web/user/auth_openid.go 0.00% <0.00%> (ø)
routers/web/user/oauth.go 35.38% <0.00%> (ø)
... and 66 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be91df4...a97a6e8. Read the comment docs.

@lunny lunny merged commit bef93ab into go-gitea:main Dec 21, 2021
@lunny
Copy link
Member

lunny commented Dec 21, 2021

Please send backport.

@zeripath zeripath deleted the fix-17885-close-git-repo-before-transfer branch December 21, 2021 11:12
zeripath added a commit to zeripath/gitea that referenced this pull request Dec 21, 2021
Backport go-gitea#18049

Repository Transfer requires that the repository directory is renamed - which
is not possible on Windows if the git repository is open.

Fix go-gitea#17885

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@zeripath zeripath added the backport/done All backports for this PR have been created label Dec 21, 2021
zeripath added a commit that referenced this pull request Dec 21, 2021
Backport #18049

Repository Transfer requires that the repository directory is renamed - which
is not possible on Windows if the git repository is open.

Fix #17885

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this pull request Dec 28, 2021
* BUGFIXES
  * Revert "Fix delete u2f keys bug (go-gitea#18042)" (go-gitea#18107)
  * Migrating wiki don't require token, so we should move it out of the require form (go-gitea#17645) (go-gitea#18104)
  * Prevent NPE if gitea uploader fails to open url (go-gitea#18080) (go-gitea#18101)
  * Reset locale on login (go-gitea#17734) (go-gitea#18100)
  * Correctly handle failed migrations (go-gitea#17575) (go-gitea#18099)
  * Instead of using routerCtx just escape the url before routing (go-gitea#18086) (go-gitea#18098)
  * Quote references to the user table in consistency checks (go-gitea#18072) (go-gitea#18073)
  * Add NotFound handler (go-gitea#18062) (go-gitea#18067)
  * Ensure that git repository is closed before transfer (go-gitea#18049) (go-gitea#18057)
  * Use common sessioner for API and web routes (go-gitea#18114)
* TRANSLATION
  * Fix code search result hint on zh-CN (go-gitea#18053)

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath mentioned this pull request Dec 28, 2021
lunny added a commit that referenced this pull request Dec 30, 2021
* BUGFIXES
  * Revert "Fix delete u2f keys bug (#18042)" (#18107)
  * Migrating wiki don't require token, so we should move it out of the require form (#17645) (#18104)
  * Prevent NPE if gitea uploader fails to open url (#18080) (#18101)
  * Reset locale on login (#17734) (#18100)
  * Correctly handle failed migrations (#17575) (#18099)
  * Instead of using routerCtx just escape the url before routing (#18086) (#18098)
  * Quote references to the user table in consistency checks (#18072) (#18073)
  * Add NotFound handler (#18062) (#18067)
  * Ensure that git repository is closed before transfer (#18049) (#18057)
  * Use common sessioner for API and web routes (#18114)
* TRANSLATION
  * Fix code search result hint on zh-CN (#18053)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
Repository Transfer requires that the repository directory is renamed - which
is not possible on Windows if the git repository is open.

Fix go-gitea#17885

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Action (accept_transfer): The process cannot access the file because it is being used by another process.
6 participants