Mercurial > public > mercurial-scm > hg
diff hgext/histedit.py @ 19039:41669a18a7d6
histedit: handle multiple spaces between action and hash (issue3893)
There is some clue that the previous code intended to handle that but it was
actually not the case.
As a result action could apply to the empty string '' changeset,
leading to the use the current working directory parent in some
operations.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 18 Apr 2013 11:52:34 -0400 |
parents | 26b41a902195 |
children | 080b801c34f1 |
line wrap: on
line diff
--- a/hgext/histedit.py Fri Feb 01 15:00:23 2013 -0800 +++ b/hgext/histedit.py Thu Apr 18 11:52:34 2013 -0400 @@ -722,10 +722,7 @@ if ' ' not in r: raise util.Abort(_('malformed line "%s"') % r) action, rest = r.split(' ', 1) - if ' ' in rest.strip(): - ha, rest = rest.split(' ', 1) - else: - ha = r.strip() + ha = rest.strip().split(' ', 1)[0] try: if repo[ha] not in ctxs: raise util.Abort(