Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
b0a08954
Commit
b0a08954
authored
Mar 06, 2008
by
Stefan Monnier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(vc-bzr-resolve-when-done, vc-bzr-find-file-hook): New functions.
parent
d530654e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/vc-bzr.el
lisp/vc-bzr.el
+27
-0
No files found.
lisp/ChangeLog
View file @
b0a08954
2008-03-06 Stefan Monnier <monnier@iro.umontreal.ca>
* vc-bzr.el (vc-bzr-resolve-when-done, vc-bzr-find-file-hook):
New functions.
* info.el (Info-bookmark-make-cell): Don't use the info-node argument.
2008-03-06 Lennart Borgman <lennart.borgman@gmail.com> (tiny change)
...
...
lisp/vc-bzr.el
View file @
b0a08954
...
...
@@ -232,6 +232,33 @@ If any error occurred in running `bzr status', then return nil."
(
unknown
.
nil
)
(
unchanged
.
up-to-date
)))))))
(
defun
vc-bzr-resolve-when-done
()
"Call \"bzr resolve\" if the conflict markers have been removed."
(
save-excursion
(
goto-char
(
point-min
))
(
unless
(
re-search-forward
"^<<<<<<< "
nil
t
)
(
vc-bzr-command
"resolve"
nil
0
buffer-file-name
)
;; Remove the hook so that it is not called multiple times.
(
remove-hook
'after-save-hook
'vc-bzr-resolve-when-done
t
))))
(
defun
vc-bzr-find-file-hook
()
(
when
(
and
buffer-file-name
;; FIXME: We should check that "bzr status" says "conflict".
(
file-exists-p
(
concat
buffer-file-name
".BASE"
))
(
file-exists-p
(
concat
buffer-file-name
".OTHER"
))
(
file-exists-p
(
concat
buffer-file-name
".THIS"
))
;; If "bzr status" says there's a conflict but there are no
;; conflict markers, it's not clear what we should do.
(
save-excursion
(
goto-char
(
point-min
))
(
re-search-forward
"^<<<<<<< "
nil
t
)))
;; TODO: the merge algorithm used in `bzr merge' is nicely configurable,
;; but the one in `bzr pull' isn't, so it would be good to provide an
;; elisp function to remerge from the .BASE/OTHER/THIS files.
(
smerge-start-session
)
(
add-hook
'after-save-hook
'vc-bzr-resolve-when-done
nil
t
)
(
message
"There are unresolved conflicts in this file"
)))
(
defun
vc-bzr-workfile-unchanged-p
(
file
)
(
eq
'unchanged
(
car
(
vc-bzr-status
file
))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment