Show More
@@ -1261,9 +1261,22 b' Names are displayed relative to the repo' | |||
|
1261 | 1261 | (interactive) |
|
1262 | 1262 | (error "not implemented")) |
|
1263 | 1263 | |
|
1264 | (defun hg-version-other-window () | |
|
1265 | (interactive) | |
|
1266 | (error "not implemented")) | |
|
1264 | (defun hg-version-other-window (rev) | |
|
1265 | "Visit version REV of the current file in another window. | |
|
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 | 1282 | (provide 'mercurial) |
General Comments 0
You need to be logged in to leave comments.
Login now