• R/O
  • SSH
  • HTTPS

fsvn: Commit


Commit MetaInfo

Revision307 (tree)
Time2013-12-21 16:25:11
Authormhayashi1120

Log Message

fix bug
fix release file contents

Change Summary

Incremental Difference

--- trunk/fsvn-data.el (revision 306)
+++ trunk/fsvn-data.el (revision 307)
@@ -204,19 +204,27 @@
204204 (mapc
205205 (lambda (logentry)
206206 (setq rev (fsvn-xml-log->logentry.revision logentry))
207- (mapc
208- (lambda (path)
209- (unless (string= (fsvn-xml-log->logentry->path.copyfrom-path path) "")
210- (let ((logpath (fsvn-xml-log->logentry->paths->path$ path))
211- (copyfrom (fsvn-xml-log->logentry->path.copyfrom-path path)))
212- (cond
213- ((string= logpath current)
214- (setq current copyfrom)
215- (setq ret (cons (cons rev current) ret)))
216- ((string-match (concat "^" (regexp-quote logpath) "/") current)
217- (setq current (fsvn-expand-url (substring current (match-end 0)) copyfrom))
218- (setq ret (cons (cons rev current) ret)))))))
219- (fsvn-xml-log->logentry->paths logentry)))
207+ (catch 'done
208+ (let ((target current)
209+ next)
210+ (mapc
211+ (lambda (path)
212+ (unless (string= (fsvn-xml-log->logentry->path.copyfrom-path path) "")
213+ (let ((logpath (fsvn-xml-log->logentry->paths->path$ path))
214+ (copyfrom (fsvn-xml-log->logentry->path.copyfrom-path path)))
215+ (cond
216+ ((string= logpath target)
217+ ;; match to exact path
218+ (setq current copyfrom)
219+ (setq ret (cons (cons rev copyfrom) ret))
220+ (throw 'done t))
221+ ((string-match (concat "^" (regexp-quote logpath) "/") target)
222+ ;; match to ancestor of the target
223+ ;; may exact match to target
224+ (setq next (fsvn-expand-url (substring target (match-end 0)) copyfrom)))))))
225+ (fsvn-xml-log->logentry->paths logentry))
226+ (when next
227+ (setq ret (cons (cons rev next) ret))))))
220228 log-entries)
221229 (nreverse ret)))
222230
--- trunk/fsvn-logview.el (revision 306)
+++ trunk/fsvn-logview.el (revision 307)
@@ -1106,7 +1106,7 @@
11061106 (match-string-no-properties 1))))
11071107
11081108 (defun fsvn-log-sibling-draw-list (logentry path)
1109- (let (regexps buffer-read-only)
1109+ (let (moves buffer-read-only)
11101110 (erase-buffer)
11111111 (mapc
11121112 (lambda (path-entry)
@@ -1125,20 +1125,40 @@
11251125 (setq copied (fsvn-xml-log->logentry->path.copyfrom-path path-entry))
11261126 (not (string= copied ""))
11271127 (fsvn-url-contains-p text path))
1128- ;; delayed highlight by font-lock
1129- (let ((qcopied (regexp-quote (fsvn-url-decode-string copied))))
1130- (setq regexps (cons (format "^D \\(%s\\)$" qcopied) regexps))))))
1128+ (setq moves (cons (cons copied text) moves)))))
11311129 (fsvn-log-sibling-sorted-paths logentry))
1130+ ;; delayed highlight by font-lock
11321131 (setq fsvn-log-sibling-font-lock-keywords
11331132 (mapcar
1134- (lambda (regexp)
1135- (list regexp '(1 fsvn-header-key-face)))
1136- regexps))
1133+ (lambda (move)
1134+ (let* ((target (fsvn-log-sibling-replace-parent (car move) moves))
1135+ (qtarget (regexp-quote (fsvn-url-decode-string target)))
1136+ (regexp (format "^D \\(%s\\)$" qtarget)))
1137+ (list regexp '(1 fsvn-header-key-face))))
1138+ moves))
11371139 (if (fboundp 'font-lock-refresh-defaults)
11381140 (font-lock-refresh-defaults)
11391141 ;; FIXME To suppress the warnings
11401142 (set 'font-lock-set-defaults nil))))
11411143
1144+(defun fsvn-log-sibling-replace-parent (target rules)
1145+ ;; resolve complicated rename in one commit
1146+ ;; e.g.
1147+ ;; file "/some/path/from/a1" exists
1148+ ;; svn mv /some/path/from /some/path/to
1149+ ;; svn mv /some/path/to/a1 /some/path/to/b1
1150+ ;; svn commit
1151+ (catch 'done
1152+ (mapc
1153+ (lambda (r)
1154+ (let* ((from (car r))
1155+ (to (cdr r))
1156+ (from-regexp (concat "\\`" (regexp-quote from) "/\\(.+\\)")))
1157+ (when (string-match from-regexp target)
1158+ (throw 'done (concat to "/" (match-string 1 target))))))
1159+ rules)
1160+ target))
1161+
11421162 (defun fsvn-log-sibling-point-status ()
11431163 (save-excursion
11441164 (forward-line 0)
--- trunk/ChangeLog (revision 306)
+++ trunk/ChangeLog (revision 307)
@@ -1,3 +1,7 @@
1+2013-12-21 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com>
2+
3+ * Fix: wrong log chain when complicated rename.
4+
15 2013-10-24 Masahiro Hayashi (林 雅博) <mhayashi1120@gmail.com>
26
37 * Fix: cygwin support. Update cygwin settings whether or not
Show on old repository browser