equal
deleted
inserted
replaced
871 for c in ('#', ':'): |
871 for c in ('#', ':'): |
872 if c in name: |
872 if c in name: |
873 raise util.Abort(_('"%s" cannot be used in the name of a patch') |
873 raise util.Abort(_('"%s" cannot be used in the name of a patch') |
874 % c) |
874 % c) |
875 |
875 |
|
876 def checkpatchname(self, name, force=False): |
|
877 self.check_reserved_name(name) |
|
878 if not force and os.path.exists(self.join(name)): |
|
879 if os.path.isdir(self.join(name)): |
|
880 raise util.Abort(_('"%s" already exists as a directory') |
|
881 % name) |
|
882 else: |
|
883 raise util.Abort(_('patch "%s" already exists') % name) |
876 |
884 |
877 def new(self, repo, patchfn, *pats, **opts): |
885 def new(self, repo, patchfn, *pats, **opts): |
878 """options: |
886 """options: |
879 msg: a string or a no-argument function returning a string |
887 msg: a string or a no-argument function returning a string |
880 """ |
888 """ |