equal
deleted
inserted
replaced
24 dst) |
24 dst) |
25 |
25 |
26 targetdir = os.path.dirname(absdst) |
26 targetdir = os.path.dirname(absdst) |
27 if not os.path.isdir(targetdir): |
27 if not os.path.isdir(targetdir): |
28 os.makedirs(targetdir) |
28 os.makedirs(targetdir) |
29 try: |
29 |
30 shutil.copyfile(abssrc, absdst) |
30 util.copyfile(abssrc, absdst) |
31 shutil.copymode(abssrc, absdst) |
|
32 except shutil.Error, inst: |
|
33 raise util.Abort(str(inst)) |
|
34 |
31 |
35 # public functions |
32 # public functions |
36 |
33 |
37 def extract(ui, fileobj): |
34 def extract(ui, fileobj): |
38 '''extract patch from data read from fileobj. |
35 '''extract patch from data read from fileobj. |