equal
deleted
inserted
replaced
29 abssrc, absdst = [os.path.join(basedir, n) for n in (src, dst)] |
29 abssrc, absdst = [os.path.join(basedir, n) for n in (src, dst)] |
30 if os.path.exists(absdst): |
30 if os.path.exists(absdst): |
31 raise util.Abort(_("cannot create %s: destination already exists") % |
31 raise util.Abort(_("cannot create %s: destination already exists") % |
32 dst) |
32 dst) |
33 |
33 |
34 targetdir = os.path.dirname(absdst) |
34 if not os.path.isdir(basedir): |
35 if not os.path.isdir(targetdir): |
35 os.makedirs(basedir) |
36 os.makedirs(targetdir) |
|
37 |
36 |
38 util.copyfile(abssrc, absdst) |
37 util.copyfile(abssrc, absdst) |
39 |
38 |
40 # public functions |
39 # public functions |
41 |
40 |