comparison contrib/mercurial.el @ 4875:97dbf330069a

Re: mercurial.el and hg-version-other-window hg-version-other window is unimplemented in mercurial.el. The version below works for me, YMMV.
author jon.christopher@Rigaku.com
date Sat, 14 Jul 2007 11:27:58 -0500
parents 6bf58c9400e2
children 2ffe3e2a1ac2
comparison
equal deleted inserted replaced
4874:d9e385a7a806 4875:97dbf330069a
1259 1259
1260 (defun hg-update () 1260 (defun hg-update ()
1261 (interactive) 1261 (interactive)
1262 (error "not implemented")) 1262 (error "not implemented"))
1263 1263
1264 (defun hg-version-other-window () 1264 (defun hg-version-other-window (rev)
1265 (interactive) 1265 "Visit version REV of the current file in another window.
1266 (error "not implemented")) 1266 If the current file is named `F', the version is named `F.~REV~'.
1267 If `F.~REV~' already exists, use it instead of checking it out again."
1268 (interactive "sVersion to visit (default is workfile version): ")
1269 (let* ((file buffer-file-name)
1270 (version (if (string-equal rev "")
1271 "tip"
1272 rev))
1273 (automatic-backup (vc-version-backup-file-name file version))
1274 (manual-backup (vc-version-backup-file-name file version 'manual)))
1275 (unless (file-exists-p manual-backup)
1276 (if (file-exists-p automatic-backup)
1277 (rename-file automatic-backup manual-backup nil)
1278 (hg-run0 "-q" "cat" "-r" version "-o" manual-backup file)))
1279 (find-file-other-window manual-backup)))
1267 1280
1268 1281
1269 (provide 'mercurial) 1282 (provide 'mercurial)
1270 1283
1271 1284