changeset 2488:2785aeb51be4

mq: add qimported patches if patch dir is a repo
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 23 Jun 2006 12:52:42 -0700
parents 041363739ca8
children 568e58eed096
files hgext/mq.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Fri Jun 23 08:10:06 2006 +0200
+++ b/hgext/mq.py	Fri Jun 23 12:52:42 2006 -0700
@@ -1000,6 +1000,7 @@
             self.ui.warn("-n option not valid when importing multiple files\n")
             sys.exit(1)
         i = 0
+        added = []
         for filename in files:
             if existing:
                 if not patch:
@@ -1028,8 +1029,12 @@
             self.read_series(self.full_series)
             self.ui.warn("adding %s to series file\n" % patch)
             i += 1
+            added.append(patch)
             patch = None
         self.series_dirty = 1
+        qrepo = self.qrepo()
+        if qrepo:
+            qrepo.add(added)
 
 def delete(ui, repo, patch, **opts):
     """remove a patch from the series file"""