equal
deleted
inserted
replaced
931 def add(self, list, wlock=None): |
931 def add(self, list, wlock=None): |
932 if not wlock: |
932 if not wlock: |
933 wlock = self.wlock() |
933 wlock = self.wlock() |
934 for f in list: |
934 for f in list: |
935 p = self.wjoin(f) |
935 p = self.wjoin(f) |
936 if not os.path.exists(p): |
936 islink = os.path.islink(p) |
|
937 if not islink and not os.path.exists(p): |
937 self.ui.warn(_("%s does not exist!\n") % f) |
938 self.ui.warn(_("%s does not exist!\n") % f) |
938 elif not os.path.isfile(p): |
939 elif not islink and not os.path.isfile(p): |
939 self.ui.warn(_("%s not added: only files supported currently\n") |
940 self.ui.warn(_("%s not added: only files and symlinks " |
940 % f) |
941 "supported currently\n") % f) |
941 elif self.dirstate.state(f) in 'an': |
942 elif self.dirstate.state(f) in 'an': |
942 self.ui.warn(_("%s already tracked!\n") % f) |
943 self.ui.warn(_("%s already tracked!\n") % f) |
943 else: |
944 else: |
944 self.dirstate.update([f], "a") |
945 self.dirstate.update([f], "a") |
945 |
946 |