Show More
@@ -776,6 +776,19 b' class path_auditor(object):' | |||||
776 | # want to add "foo/bar/baz" before checking if there's a "foo/.hg" |
|
776 | # want to add "foo/bar/baz" before checking if there's a "foo/.hg" | |
777 | self.auditeddir.update(prefixes) |
|
777 | self.auditeddir.update(prefixes) | |
778 |
|
778 | |||
|
779 | def nlinks(pathname): | |||
|
780 | """Return number of hardlinks for the given file.""" | |||
|
781 | return os.lstat(pathname).st_nlink | |||
|
782 | ||||
|
783 | if hasattr(os, 'link'): | |||
|
784 | os_link = os.link | |||
|
785 | else: | |||
|
786 | def os_link(src, dst): | |||
|
787 | raise OSError(0, _("Hardlinks not supported")) | |||
|
788 | ||||
|
789 | def lookup_reg(key, name=None, scope=None): | |||
|
790 | return None | |||
|
791 | ||||
779 | if os.name == 'nt': |
|
792 | if os.name == 'nt': | |
780 | from windows import * |
|
793 | from windows import * | |
781 | def expand_glob(pats): |
|
794 | def expand_glob(pats): | |
@@ -817,16 +830,6 b' def readlock(pathname):' | |||||
817 | pass |
|
830 | pass | |
818 | return posixfile(pathname).read() |
|
831 | return posixfile(pathname).read() | |
819 |
|
832 | |||
820 | def nlinks(pathname): |
|
|||
821 | """Return number of hardlinks for the given file.""" |
|
|||
822 | return os.lstat(pathname).st_nlink |
|
|||
823 |
|
||||
824 | if hasattr(os, 'link'): |
|
|||
825 | os_link = os.link |
|
|||
826 | else: |
|
|||
827 | def os_link(src, dst): |
|
|||
828 | raise OSError(0, _("Hardlinks not supported")) |
|
|||
829 |
|
||||
830 | def fstat(fp): |
|
833 | def fstat(fp): | |
831 | '''stat file object that may not have fileno method.''' |
|
834 | '''stat file object that may not have fileno method.''' | |
832 | try: |
|
835 | try: | |
@@ -962,9 +965,6 b' def gui():' | |||||
962 | '''Are we running in a GUI?''' |
|
965 | '''Are we running in a GUI?''' | |
963 | return os.name == "nt" or os.name == "mac" or os.environ.get("DISPLAY") |
|
966 | return os.name == "nt" or os.name == "mac" or os.environ.get("DISPLAY") | |
964 |
|
967 | |||
965 | def lookup_reg(key, name=None, scope=None): |
|
|||
966 | return None |
|
|||
967 |
|
||||
968 | def mktempcopy(name, emptyok=False, createmode=None): |
|
968 | def mktempcopy(name, emptyok=False, createmode=None): | |
969 | """Create a temporary file with the same contents from name |
|
969 | """Create a temporary file with the same contents from name | |
970 |
|
970 |
General Comments 0
You need to be logged in to leave comments.
Login now