--- a/hgext/mq.py Wed Jan 11 02:28:36 2012 +0100
+++ b/hgext/mq.py Wed Jan 11 02:29:55 2012 +0100
@@ -2652,7 +2652,7 @@
ret = q.save(repo, msg=message)
if ret:
return ret
- q.savedirty()
+ q.savedirty() # save to .hg/patches before copying
if opts.get('copy'):
path = q.path
if opts.get('name'):
@@ -2669,10 +2669,9 @@
ui.warn(_("copy %s to %s\n") % (path, newpath))
util.copyfiles(path, newpath)
if opts.get('empty'):
- try:
- os.unlink(q.join(q.statuspath))
- except:
- pass
+ del q.applied[:]
+ q.applieddirty = True
+ q.savedirty()
return 0
@command("strip",