Revision | 317 (tree) |
---|---|
Time | 2014-12-11 01:21:03 |
Author | mhayashi1120 |
small fix
@@ -72,7 +72,8 @@ | ||
72 | 72 | (equal (nth 11 (file-attributes file1)) (nth 11 (file-attributes file2)))) |
73 | 73 | |
74 | 74 | (defun fsvn-file-exact-file-p (file) |
75 | - (eq nil (car (file-attributes file)))) | |
75 | + (let ((attr (file-attributes file))) | |
76 | + (and attr (eq nil (car attr))))) | |
76 | 77 | |
77 | 78 | (defun fsvn-file-exact-directory-p (file) |
78 | 79 | ;; dired have this code. |
@@ -1,3 +1,8 @@ | ||
1 | +2014-12-10 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com> | |
2 | + | |
3 | + * Fix: Work around for peg (revisioned) filename. | |
4 | + Maybe this is bug of subversion. | |
5 | + | |
1 | 6 | 2014-11-14 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com> |
2 | 7 | |
3 | 8 | * Fix: Creating log chain problem. |
@@ -337,7 +337,7 @@ | ||
337 | 337 | (when (setq cs (fsvn-config-repository-default-coding-system url)) |
338 | 338 | (throw 'guessed cs))) |
339 | 339 | ((fsvn-url-local-p url) |
340 | - (unless (file-directory-p url) | |
340 | + (when (fsvn-file-exact-file-p url) | |
341 | 341 | (when (setq cs (fsvn-file-guessed-coding-system url)) |
342 | 342 | (throw 'guessed cs))))))) |
343 | 343 | ((string-match "\\`--[a-zA-Z]" arg) |
@@ -345,7 +345,7 @@ | ||
345 | 345 | ((not (fsvn-url-local-p arg))) |
346 | 346 | (t |
347 | 347 | (let ((file (fsvn-magic-create-name arg))) |
348 | - (unless (file-directory-p file) | |
348 | + (when (fsvn-file-exact-file-p file) | |
349 | 349 | (throw 'guessed (fsvn-file-guessed-coding-system file))))))) |
350 | 350 | flatten-args) |
351 | 351 | (default-value 'buffer-file-coding-system)))) |
@@ -32,8 +32,15 @@ | ||
32 | 32 | (defconst fsvn-magic-file-name-regexp |
33 | 33 | (let ((top "\\`/fsvn") |
34 | 34 | tmp) |
35 | - (concat top "@" "\\(" "HEAD" "\\|" "[0-9]+" "\\|" | |
36 | - fsvn-revision-date-regexp "\\)" "/"))) | |
35 | + (concat top "@" | |
36 | + "\\(" | |
37 | + "HEAD" | |
38 | + "\\|" | |
39 | + "[0-9]+" | |
40 | + "\\|" | |
41 | + fsvn-revision-date-regexp | |
42 | + "\\)" | |
43 | + "/"))) | |
37 | 44 | |
38 | 45 | (defconst fsvn-magic-handler-alist |
39 | 46 | '( |
@@ -20,7 +20,13 @@ | ||
20 | 20 | |
21 | 21 | |
22 | 22 | (defconst fsvn-url-encoding fsvn-svn-common-coding-system) |
23 | -(defconst fsvn-url-with-revision-regexp "\\`\\(.*\\)@\\([^/@]*\\)\\(@*\\)\\'") | |
23 | +(defconst fsvn-url-with-revision-regexp | |
24 | + (concat | |
25 | + "\\`" | |
26 | + "\\(.*\\)@" | |
27 | + "\\(" "[^/@]*" "\\)" | |
28 | + "\\(@*\\)" | |
29 | + "\\'")) | |
24 | 30 | |
25 | 31 | ;; url utility |
26 | 32 |