[Bug 5244] New: 'hg prev' while rewording a changeset description causes weird merge conflicts
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue May 24 23:43:15 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5244
Bug ID: 5244
Summary: 'hg prev' while rewording a changeset description
causes weird merge conflicts
Product: Mercurial
Version: unspecified
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: evolution
Assignee: bugzilla at selenic.com
Reporter: hg at pewpew.net
CC: mercurial-devel at selenic.com,
pierre-yves.david at ens-lyon.org
Created attachment 1918
--> https://bz.mercurial-scm.org/attachment.cgi?id=1918&action=edit
blackbox.log
Something I've been doing frequently is I am modifying the text of a change to
add benchmark numbers, and I'll need to run the benchmark at the previous
change, so I'll leave the editor open and run `hg prev` in another terminal.
This blocks on the editor in the first terminal, so this doesn't actually work,
and you'd think I'd have learned this by now, but I keep doing it. This isn't
a request to make that work.
The problem is that after I close the editor, I get a weird error message about
an unknown parent, and then merge conflicts.
This is easily reproducible:
> cat hgrc
[ui]
username=Kyle Lippincott <spectral at google.com>
[defaults]
commit = -d "0 0"
[extensions]
blackbox=
evolve=
[alias]
reword=commit --amend --edit 're:^$'
> cat fake_editor
#!/bin/bash
sleep 5
echo "new desc for two" >$1
> export HGRCPATH=$PWD/hgrc
> export EDITOR=$PWD/fake_editor
> hg init repo; cd repo
> echo hi > foo; hg ci -Am 'one'
adding foo
> echo bye > foo; hg ci -Am 'two'
> hg log
changeset: 1:a5b6f0a6902d
tag: tip
user: Kyle Lippincott <spectral at google.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: two
changeset: 0:47c8e9cf8411
user: Kyle Lippincott <spectral at google.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: one
> hg reword &; sleep 1; hg prev # This can be done in two terminals instead
[1] 6647
waiting for lock on working directory of
/usr/local/google/home/spectral/src/hg/bug_reports/prev_while_rewording/repo
held by 'dragonair.mtv.corp.google.com:6647'
[1] + done hg reword
got lock after 5 seconds
warning: ignoring unknown working parent 58871a4123aa!
merging foo
warning: conflicts while merging foo! (edit, then use 'hg resolve --mark')
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges
[0] one
> hg log
changeset: 2:58871a4123aa
tag: tip
parent: 0:47c8e9cf8411
user: Kyle Lippincott <spectral at google.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: new desc for two
changeset: 0:47c8e9cf8411
user: Kyle Lippincott <spectral at google.com>
date: Thu Jan 01 00:00:00 1970 +0000
summary: one
Blackbox output attached.
Version information (using Google's current versions):
> hg version
Mercurial Distributed SCM (version 3.8.1+37-983353035cec)
(see https://mercurial-scm.org for more information)
> dpkg --list \*evolve\*
ii mercurial-evolve 5.2.1-1 all
evolve extension for Mercurial
(I'm not sure we get accurate version numbers for evolve into our packages,
though!)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list