tests/hghave.py
branchstable
changeset 1102 51afb47e2399
parent 1101 89f984505cbb
child 1105 9b2932ca75fd
equal deleted inserted replaced
1101:89f984505cbb 1102:51afb47e2399
   186         os.symlink(".", name)
   186         os.symlink(".", name)
   187         os.unlink(name)
   187         os.unlink(name)
   188         return True
   188         return True
   189     except (OSError, AttributeError):
   189     except (OSError, AttributeError):
   190         return False
   190         return False
       
   191 
       
   192 def has_hardlink():
       
   193     from mercurial import util
       
   194     fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix)
       
   195     os.close(fh)
       
   196     name = tempfile.mktemp(dir='.', prefix=tempprefix)
       
   197     try:
       
   198         try:
       
   199             util.oslink(fn, name)
       
   200             os.unlink(name)
       
   201             return True
       
   202         except OSError:
       
   203             return False
       
   204     finally:
       
   205         os.unlink(fn)
   191 
   206 
   192 def has_tla():
   207 def has_tla():
   193     return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
   208     return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
   194 
   209 
   195 def has_gpg():
   210 def has_gpg():
   264     "execbit": (has_executablebit, "executable bit"),
   279     "execbit": (has_executablebit, "executable bit"),
   265     "fifo": (has_fifo, "named pipes"),
   280     "fifo": (has_fifo, "named pipes"),
   266     "gettext": (has_gettext, "GNU Gettext (msgfmt)"),
   281     "gettext": (has_gettext, "GNU Gettext (msgfmt)"),
   267     "git": (has_git, "git command line client"),
   282     "git": (has_git, "git command line client"),
   268     "gpg": (has_gpg, "gpg client"),
   283     "gpg": (has_gpg, "gpg client"),
       
   284     "hardlink": (has_hardlink, "hardlinks"),
   269     "icasefs": (has_icasefs, "case insensitive file system"),
   285     "icasefs": (has_icasefs, "case insensitive file system"),
   270     "inotify": (has_inotify, "inotify extension support"),
   286     "inotify": (has_inotify, "inotify extension support"),
   271     "lsprof": (has_lsprof, "python lsprof module"),
   287     "lsprof": (has_lsprof, "python lsprof module"),
   272     "mtn": (has_mtn, "monotone client (>= 1.0)"),
   288     "mtn": (has_mtn, "monotone client (>= 1.0)"),
   273     "outer-repo": (has_outer_repo, "outer repo"),
   289     "outer-repo": (has_outer_repo, "outer repo"),