Bug 226864 - MFH commit fails: Commit blocked by pre-commit hook
Summary: MFH commit fails: Commit blocked by pre-commit hook
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-23 03:39 UTC by Yuri Victorovich
Modified: 2019-02-23 01:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2018-03-23 03:39:17 UTC
This command fails:
> /usr/ports/Tools/scripts/mfh 464472 465275

---log---
commit.txt: 27 lines, 900 characters.
Sending        2018Q1
Sending        2018Q1/databases/sqlite3/Makefile
Sending        2018Q1/databases/sqlite3/distinfo
Replacing      2018Q1/databases/sqlite3/files
Transmitting file data ..done
Committing transaction...
svn: E165001: Commit failed (details follow):
svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
Do not replace a file. This can lose history. Path: "/branches/2018Q1/databases/sqlite3/files"
== Additional errors may compound and may not be accurate ==
Do not replace a file. This can lose history. Path: "/branches/2018Q1/databases/sqlite3/files"
== Pre-commit problem count: 2

Commit failed. Re-edit message and try again? [y/n]
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2018-03-23 04:36:18 UTC
The first commit deletes databases/sqlite3/files, the second commit creates it again. Pre-commit hook doesn't like this.
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2018-03-23 07:56:13 UTC
Then do it in two steps.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-02-23 01:59:30 UTC
A commit references this bug:

Author: zi
Date: Sat Feb 23 01:59:04 UTC 2019
New revision: 493633
URL: https://svnweb.freebsd.org/changeset/ports/493633

Log:
  - Make error message useful

  PR:		226864, 231327
  Approved by:	portmgr (implicit, noop)

Changes:
  svnadmin/hooks/scripts/verify.py