mercurial/localrepo.py
changeset 5688 883d887c6408
parent 5666 9d6ad26fab10
child 5703 14789f30ac11
child 5754 75c2071385da
--- a/mercurial/localrepo.py	Mon Dec 24 01:50:07 2007 +0100
+++ b/mercurial/localrepo.py	Mon Dec 24 12:14:43 2007 +0100
@@ -1010,12 +1010,14 @@
     def add(self, list):
         wlock = self.wlock()
         try:
+            rejected = []
             for f in list:
                 p = self.wjoin(f)
                 try:
                     st = os.lstat(p)
                 except:
                     self.ui.warn(_("%s does not exist!\n") % f)
+                    rejected.append(f)
                     continue
                 if st.st_size > 10000000:
                     self.ui.warn(_("%s: files over 10MB may cause memory and"
@@ -1025,12 +1027,14 @@
                 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)):
                     self.ui.warn(_("%s not added: only files and symlinks "
                                    "supported currently\n") % f)
+                    rejected.append(p)
                 elif self.dirstate[f] in 'amn':
                     self.ui.warn(_("%s already tracked!\n") % f)
                 elif self.dirstate[f] == 'r':
                     self.dirstate.normallookup(f)
                 else:
                     self.dirstate.add(f)
+            return rejected
         finally:
             del wlock