~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Aaron Bentley
  • Date: 2005-09-26 01:47:27 UTC
  • mto: (1185.14.1) (1393.1.21)
  • mto: This revision was merged to the branch mainline in revision 1391.
  • Revision ID: aaron.bentley@utoronto.ca-20050926014727-63b762d5b2472d77
Disabled hardlinks on cygwin, mac OS

Show diffs side-by-side

added added

removed removed

Lines of Context:
500
500
            return None
501
501
        raise
502
502
 
 
503
def hardlinks_good():
 
504
    sys.platform not in ('win32', 'cygwin', 'darwin')
 
505
 
503
506
def link_or_copy(src, dest):
504
507
    """Hardlink a file, or copy it if it can't be hardlinked."""
505
 
    if sys.platform == 'win32':
 
508
    if not hardlinks_good():
506
509
        copyfile(src, dest)
507
510
        return
508
511
    try: