[Bug 5651] New: interactive revert of no-eol hunk fails
mercurial-bugs at mercurial-scm.org
mercurial-bugs at mercurial-scm.org
Thu Aug 10 13:48:38 UTC 2017
https://bz.mercurial-scm.org/show_bug.cgi?id=5651
Bug ID: 5651
Summary: interactive revert of no-eol hunk fails
Product: Mercurial
Version: 4.3-rc
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Keywords: regression
Severity: bug
Priority: urgent
Component: Mercurial
Assignee: bugzilla at mercurial-scm.org
Reporter: yuya at tcha.org
CC: arcppzju+hgbug at gmail.com,
mercurial-devel at mercurial-scm.org
STR (works on 4.2):
$ hg init repo
$ cd repo
$ echo 0 > a
$ hg ci -qAm 0
$ printf 1 >> a
$ hg ci -qAm 1
$ cat a
0
1 (no-eol)
$ hg revert -ir.^ --config ui.interactive=1 <<EOF
> y
> y
> EOF
reverting a
diff --git a/a b/a
1 hunks, 1 lines changed
examine changes to 'a'? [Ynesfdaq?] y
@@ -1,1 +1,2 @@
0
+1
\ No newline at end of file
revert this change to 'a'? [Ynesfdaq?] y
$ cat a
0
$ cd ..
On 4.3-rc:
+ Traceback (most recent call last):
+ File "hg", line 45, in <module>
+ mercurial.dispatch.run()
+ File "mercurial/dispatch.py", line 86, in run
+ status = (dispatch(req) or 0) & 255
+ File "mercurial/dispatch.py", line 167, in dispatch
+ ret = _runcatch(req)
+ File "mercurial/dispatch.py", line 307, in _runcatch
+ return _callcatch(ui, _runcatchfunc)
+ File "mercurial/dispatch.py", line 315, in _callcatch
+ return scmutil.callcatch(ui, func)
+ File "mercurial/scmutil.py", line 145, in callcatch
+ return func()
+ File "mercurial/dispatch.py", line 297, in _runcatchfunc
+ return _dispatch(req)
+ File "mercurial/dispatch.py", line 927, in _dispatch
+ cmdpats, cmdoptions)
+ File "mercurial/dispatch.py", line 663, in runcommand
+ ret = _runcommand(ui, options, cmd, d)
+ File "mercurial/dispatch.py", line 935, in _runcommand
+ return cmdfunc()
+ File "mercurial/dispatch.py", line 924, in <lambda>
+ d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
+ File "mercurial/util.py", line 1056, in check
+ return func(*args, **kwargs)
+ File "mercurial/commands.py", line 4520, in revert
+ return cmdutil.revert(ui, repo, ctx, (parent, p2), *pats, **opts)
+ File "mercurial/cmdutil.py", line 3332, in revert
+ _performrevert(repo, parents, ctx, actions, interactive, tobackup)
+ File "mercurial/cmdutil.py", line 3434, in _performrevert
+ chunks = patch.reversehunks(chunks)
+ File "mercurial/patch.py", line 1526, in reversehunks
+ c = c.reversehunk()
+ File "mercurial/patch.py", line 970, in reversehunk
+ hunk = ['%s%s' % (m[l[0]], l[1:]) for l in self.hunk]
+ KeyError: '\\'
+ [1]
The first bad revision is:
changeset: 43372:66117dae87f9
user: Jun Wu <quark at fb.com>
date: Tue Jun 20 23:22:38 2017 -0700
summary: patch: rewrite reversehunks (issue5337)
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list