changeset 2728:5d134f04060f

mq: allow to apply patches in subdir of repo again i broke it in 35caf437a201.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Sat, 29 Jul 2006 11:05:39 -0700
parents 9ffee4f07323
children 8ce86d2c9737
files hgext/mq.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)