hg displays errors in pre-commit.d/20warn-problem-files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
etckeeper (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
After running aptitude, I got a slew of these error messages for all files inside of /etc/.hg
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
abort: path contains illegal component: .hg/store/
Looking at /etc/etckeeper/
line 13: hardlinks=$(find . -type f -not -links 1 -exec hg status {} \; | exclude_internal ) || true
For every file found, a new process is started, retrieving the status about a single file. Afterwards, an attempt is made at filtering out all the internal files belonging to the SCM itself.
Too bad error output is not written to stdout, so the entries are never filtered.
I suggest to change this line to:
hardlinks=$(find . -type f -not -links 1 | exclude_internal | xargs hg status -n ) || true
Effects:
1. does not start a new process for each file found
2. filters the files before asking Mercurial for the status
3. does not display a status prefix for each file (like it's done for git)
Changed in etckeeper (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
This affects me too. But only ever since 12.04. I'm trying to use LTS versions exclusively.
For now I am using bzr instead. It's not my preferred VCS, but it does the job and is apparently better maintained in conjunction with etckeeper.