Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 11513:0c944b7af564 stable
mq: fixed ENOENT when qrename to new/directory.patch
MQ patch name can contain slashes, e.g. 'foo/bar.patch'.
Currently "qnew foo/bar.patch" works, but
"qrename foo/bar.patch new/dir.patch" fails with
"No such file or directory".
Also added test case for "qnew foo/bar.patch"
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 28 Mar 2010 15:23:11 +0900 |
parents | 1b82a26635d7 |
children | 958022f0f1d5 |
line wrap: on
line diff
--- a/hgext/mq.py Fri Jul 02 14:14:30 2010 -1000 +++ b/hgext/mq.py Sun Mar 28 15:23:11 2010 +0900 @@ -2311,6 +2311,9 @@ q.applied[info[0]] = statusentry(info[1], name) q.applied_dirty = 1 + destdir = os.path.dirname(absdest) + if not os.path.isdir(destdir): + os.makedirs(destdir) util.rename(q.join(patch), absdest) r = q.qrepo() if r: