mq: allow to apply patches in subdir of repo again
authorVadim Gelfer <vadim.gelfer@gmail.com>
Sat, 29 Jul 2006 11:05:39 -0700
changeset 2728 5d134f04060f
parent 2725 9ffee4f07323
child 2729 8ce86d2c9737
mq: allow to apply patches in subdir of repo again i broke it in 35caf437a201.
hgext/mq.py
--- a/hgext/mq.py	Fri Jul 28 14:31:20 2006 -0700
+++ b/hgext/mq.py	Sat Jul 29 11:05:39 2006 -0700
@@ -344,7 +344,11 @@
                 p1, p2 = repo.dirstate.parents()
                 repo.dirstate.setparents(p1, merge)
             if len(files) > 0:
-                commands.addremove_lock(self.ui, repo, files,
+                cwd = repo.getcwd()
+                cfiles = files
+                if cwd:
+                    cfiles = [util.pathto(cwd, f) for f in files]
+                commands.addremove_lock(self.ui, repo, cfiles,
                                         opts={}, wlock=wlock)
             n = repo.commit(files, message, user, date, force=1, lock=lock,
                             wlock=wlock)