##// END OF EJS Templates
Allow adding symlinks that don't point to files
Alexis S. L. Carvalho -
r4018:dfe87137 default
parent child Browse files
Show More
@@ -933,11 +933,12 b' class localrepository(repo.repository):'
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:
General Comments 0
You need to be logged in to leave comments. Login now