Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
530739c9
Commit
530739c9
authored
Feb 26, 2012
by
Michael Albinus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* net/tramp.el (tramp-inodes, tramp-devices): Initialize with 0.
(tramp-get-inode, tramp-get-device): Use cached values.
parent
487915d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
20 deletions
+11
-20
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/net/tramp.el
lisp/net/tramp.el
+6
-20
No files found.
lisp/ChangeLog
View file @
530739c9
2012-02-26 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-inodes, tramp-devices): Initialize with 0.
(tramp-get-inode, tramp-get-device): Use cached values.
2012-02-26 Alan Mackenzie <acm@muc.de>
Check there is a font-lock specification before doing initial
...
...
lisp/net/tramp.el
View file @
530739c9
...
...
@@ -1650,7 +1650,7 @@ been set up by `rfn-eshadow-setup-minibuffer'."
;; applied might be not so efficient (Ange-FTP uses hashes). But
;; performance isn't the major issue given that file transfer will
;; take time.
(
defvar
tramp-inodes
nil
(
defvar
tramp-inodes
0
"Keeps virtual inodes numbers."
)
;; Devices must distinguish physical file systems. The device numbers
...
...
@@ -1658,7 +1658,7 @@ been set up by `rfn-eshadow-setup-minibuffer'."
;; So we use virtual device numbers, generated by Tramp. Both Ange-FTP and
;; EFS use device number "-1". In order to be different, we use device number
;; (-1 . x), whereby "x" is unique for a given (method user host).
(
defvar
tramp-devices
nil
(
defvar
tramp-devices
0
"Keeps virtual device numbers."
)
(
defun
tramp-default-file-modes
(
filename
)
...
...
@@ -3412,28 +3412,14 @@ the remote host use line-endings as defined in the variable
(
defun
tramp-get-inode
(
vec
)
"Returns the virtual inode number.
If it doesn't exist, generate a new one."
(
let
((
string
(
tramp-make-tramp-file-name
(
tramp-file-name-method
vec
)
(
tramp-file-name-user
vec
)
(
tramp-file-name-host
vec
)
""
)))
(
unless
(
assoc
string
tramp-inodes
)
(
add-to-list
'tramp-inodes
(
list
string
(
length
tramp-inodes
))))
(
nth
1
(
assoc
string
tramp-inodes
))))
(
with-file-property
vec
(
tramp-file-name-localname
vec
)
"inode"
(
setq
tramp-inodes
(
1+
tramp-inodes
))))
(
defun
tramp-get-device
(
vec
)
"Returns the virtual device number.
If it doesn't exist, generate a new one."
(
let
((
string
(
tramp-make-tramp-file-name
(
tramp-file-name-method
vec
)
(
tramp-file-name-user
vec
)
(
tramp-file-name-host
vec
)
""
)))
(
unless
(
assoc
string
tramp-devices
)
(
add-to-list
'tramp-devices
(
list
string
(
length
tramp-devices
))))
(
cons
-1
(
nth
1
(
assoc
string
tramp-devices
)))))
(
with-connection-property
(
tramp-get-connection-process
vec
)
"device"
(
cons
-1
(
setq
tramp-devices
(
1+
tramp-devices
)))))
(
defun
tramp-equal-remote
(
file1
file2
)
"Check, whether the remote parts of FILE1 and FILE2 are identical.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment