[Bug 6303] New: hg complains about "ignoring uknown working directory parent" in commands that don't even need the working copy
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Mon Apr 20 16:28:44 UTC 2020
https://bz.mercurial-scm.org/show_bug.cgi?id=6303
Bug ID: 6303
Summary: hg complains about "ignoring uknown working directory
parent" in commands that don't even need the working
copy
Product: Mercurial
Version: 5.3
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: vgatien-baron at janestreet.com
CC: mercurial-devel at mercurial-scm.org
Python Version: ---
If I commit in a loop and in parallel log in a loop, and the log command
doesn't need to know about the dirstate, it looks at it anyway since 5.3 (it
seems because of this localrepo._quick_access_changeid_wc business) and cause
racy prints:
commit-loop:
#!/bin/bash
export HGRCPATH=
cd /tmp
rm -rf repo
hg init repo
cd repo
echo a > a
hg commit -Am_
i=0
while true; do
i=$((i + 1))
echo $i
echo $i > a
hg commit -m _
done
log-loop:
#!/bin/bash
export HGRCPATH=
cd /tmp/repo
while true; do
i=$((i + 1))
echo $i
hg log -q > /dev/null
done
$ ./commit-loop & ./log-loop
...
4
5
warning: ignoring unknown working parent c52cf1df54c5!
6
7
...
I expect there should be no print, which is what happens in 5.2.
There are two bugs here:
- there's no reason the dirstate should be read (strace confirms hg log reads
the .hg/dirstate in 5.3 but not 5.2)
- for better transactionality, the dirstate should be open (not necessarily
read) before opening the changelog, so the revisions in the dirstate point to
existing revisions (if we ignore removal of committed revision with hg
rollbacks or hg strip)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list