[Bug 4378] New: mq regression: repo in invalid state during 'hg qrefresh --edit'
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Sep 19 19:29:39 UTC 2014
http://bz.selenic.com/show_bug.cgi?id=4378
Priority: normal
Bug ID: 4378
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: mq regression: repo in invalid state during 'hg
qrefresh --edit'
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: patrickdepinguin+mercurial at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 3.0
Component: mq
Product: Mercurial
Starting from Mercurial 3.0 (still present in master Mercurial), the repository
is not in a fully valid state _during_ an interactive qrefresh (qrefresh
--edit). If you try to run 'hg diff' during this time, an error message
appears.
I bisected and found the culprit to be:
49148d7868df default|3.0 2014-05-05 FUJIWARA Katsunori qrefresh: use
"editor" argument of "commit()" instead of explicit "ui.edit()"
Based on the commit log I don't think this change is expected behavior, hence I
consider it as a regression.
Below is a test case:
-------------
preparation:
$ cat > $HGRCPATH << EOF
> [extensions]
> mq=
> [diff]
> git = True
> EOF
$ hg init a
$ cd a
$ hg qnew somepatch
$ echo foo > bar
$ hg add bar
$ hg diff
diff --git a/bar b/bar
new file mode 100644
--- /dev/null
+++ b/bar
@@ -0,0 +1,1 @@
+foo
set editor that invokes 'hg diff'
$ cat > $TESTTMP/editor.sh << EOF
> hg diff
> EOF
qrefresh --edit
$ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
diff --git a/bar b/bar
new file mode 100644
--- /dev/null
+++ b/bar
@@ -0,0 +1,1 @@
+foo
------------
Output before and after culprit commit:
$ hg up 49148d7868df^
Updating from rev. '49148d7868df' to rev. '51069bf6366b'
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ python run-tests.py test-mq-check-diff-during-qrefresh.t
.
# Ran 1 tests, 0 skipped, 0 warned, 0 failed.
$ hg up 49148d7868df
Updating from rev. '51069bf6366b' to rev. '49148d7868df'
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ python run-tests.py test-mq-check-diff-during-qrefresh.t
--- /home/tdescham/repo/contrib/hg/tests/test-mq-check-diff-during-qrefresh.t
+++
/home/tdescham/repo/contrib/hg/tests/test-mq-check-diff-during-qrefresh.t.err
@@ -28,6 +28,7 @@
qrefresh --edit
$ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
+ warning: ignoring unknown working parent 05f751788dc0!
diff --git a/bar b/bar
new file mode 100644
--- /dev/null
ERROR: test-mq-check-diff-during-qrefresh.t output changed
!
Failed test-mq-check-diff-during-qrefresh.t: output changed
# Ran 1 tests, 0 skipped, 0 warned, 1 failed.
python hash seed: 1496284083
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list