- to_patchdir = os.path.join(git.base_dir, 'patches', to_name)
- if os.path.isdir(to_patchdir):
- raise CmdException, '"%s" already exists' % to_patchdir
- to_base = os.path.join(git.base_dir, 'refs', 'bases', to_name)
- if os.path.isfile(to_base):
- raise CmdException, '"%s" already exists' % to_base