• R/O
  • SSH
  • HTTPS

fsvn: Commit


Commit MetaInfo

Revision319 (tree)
Time2015-02-22 23:43:17
Authormhayashi1120

Log Message

fix creating log chain problem

Change Summary

Incremental Difference

--- trunk/ChangeLog (revision 318)
+++ trunk/ChangeLog (revision 319)
@@ -1,3 +1,7 @@
1+2015-02-22 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com>
2+
3+ * Fix: searching log chain problem. Rename parent directory cause error.
4+
15 2015-01-28 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com>
26
37 * Add: copy revisioned url when sibling buffer.
--- trunk/fsvn-data.el (revision 318)
+++ trunk/fsvn-data.el (revision 319)
@@ -205,7 +205,8 @@
205205 (lambda (logentry)
206206 (setq rev (fsvn-xml-log->logentry.revision logentry))
207207 (catch 'done
208- (let ((target current))
208+ (let ((target current)
209+ maxlen paren-match)
209210 (mapc
210211 (lambda (path)
211212 (unless (string= (fsvn-xml-log->logentry->path.copyfrom-path path) "")
@@ -217,14 +218,19 @@
217218 (setq current copyfrom)
218219 (setq ret (cons (cons rev copyfrom) ret))
219220 (throw 'done t))
220- ((string-match (concat "\\`" (regexp-quote logpath) "/") target)
221+ ((and (string-match (concat "\\`" (regexp-quote logpath) "/") target)
222+ ;; search longest match
223+ ;; /a/b/c/hoge.txt -> /a/B/C/hoge.txt
224+ (or (null maxlen) (< maxlen (match-end 0))))
225+ (setq maxlen (match-end 0))
221226 ;; match to ancestor of the target
222227 ;; may exact match to target
223228 (let ((old-fn (substring target (match-end 0))))
224229 (setq current (fsvn-expand-url old-fn copyfrom)))
225- (setq ret (cons (cons rev current) ret))
226- (throw 'done t))))))
227- (fsvn-xml-log->logentry->paths logentry)))))
230+ (setq paren-match (cons rev current)))))))
231+ (fsvn-xml-log->logentry->paths logentry))
232+ (when paren-match
233+ (setq ret (cons paren-match ret))))))
228234 log-entries)
229235 (nreverse ret)))
230236
Show on old repository browser