mq: fix strip failing to unlink a bundle
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 26 Dec 2006 21:57:20 +0100
changeset 4008 6e0cb0790e23
parent 3988 9dcf9d45cab8
child 4009 86098ec4b77a
mq: fix strip failing to unlink a bundle os.unlink doesn't know how to deal with urls
hgext/mq.py
--- a/hgext/mq.py	Tue Dec 26 14:17:48 2006 +0100
+++ b/hgext/mq.py	Tue Dec 26 21:57:20 2006 +0100
@@ -702,7 +702,6 @@
         if saveheads:
             backupch = repo.changegroupsubset(savebases.keys(), saveheads, 'strip')
             chgrpfile = bundle(backupch)
-            chgrpfile = 'file:%s' % chgrpfile
 
         stripall(rev, revnum)
 
@@ -711,7 +710,8 @@
         repo.manifest.strip(repo.manifest.rev(change[0]), revnum)
         if saveheads:
             self.ui.status("adding branch\n")
-            commands.unbundle(self.ui, repo, chgrpfile, update=False)
+            commands.unbundle(self.ui, repo, "file:%s" % chgrpfile,
+                              update=False)
             if backup != "strip":
                 os.unlink(chgrpfile)