mercurial/hg.py
changeset 20091 abfe6a8e619b
parent 20089 2d0ab571b822
child 20116 9e0219967e38
equal deleted inserted replaced
20090:88d8e568add1 20091:abfe6a8e619b
   211             if dstbase and not dstvfs.exists(dstbase):
   211             if dstbase and not dstvfs.exists(dstbase):
   212                 dstvfs.mkdir(dstbase)
   212                 dstvfs.mkdir(dstbase)
   213             if srcvfs.exists(f):
   213             if srcvfs.exists(f):
   214                 if f.endswith('data'):
   214                 if f.endswith('data'):
   215                     # lock to avoid premature writing to the target
   215                     # lock to avoid premature writing to the target
   216                     destlock = lock.lock(dstvfs.join(dstbase + "/lock"))
   216                     destlock = lock.lock(dstvfs, dstbase + "/lock")
   217                 hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f),
   217                 hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f),
   218                                              hardlink)
   218                                              hardlink)
   219                 num += n
   219                 num += n
   220         if hardlink:
   220         if hardlink:
   221             ui.debug("linked %d files\n" % num)
   221             ui.debug("linked %d files\n" % num)