Show More
@@ -21,6 +21,14 b' def ishunk(x):' | |||||
21 | hunkclasses = (crecordmod.uihunk, patch.recordhunk) |
|
21 | hunkclasses = (crecordmod.uihunk, patch.recordhunk) | |
22 | return isinstance(x, hunkclasses) |
|
22 | return isinstance(x, hunkclasses) | |
23 |
|
23 | |||
|
24 | def newandmodified(chunks, originalchunks): | |||
|
25 | newlyaddedandmodifiedfiles = set() | |||
|
26 | for chunk in chunks: | |||
|
27 | if ishunk(chunk) and chunk.header.isnewfile() and chunk not in \ | |||
|
28 | originalchunks: | |||
|
29 | newlyaddedandmodifiedfiles.add(chunk.header.filename()) | |||
|
30 | return newlyaddedandmodifiedfiles | |||
|
31 | ||||
24 | def parsealiases(cmd): |
|
32 | def parsealiases(cmd): | |
25 | return cmd.lstrip("^").split("|") |
|
33 | return cmd.lstrip("^").split("|") | |
26 |
|
34 | |||
@@ -109,11 +117,7 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||||
109 | # We need to keep a backup of files that have been newly added and |
|
117 | # We need to keep a backup of files that have been newly added and | |
110 | # modified during the recording process because there is a previous |
|
118 | # modified during the recording process because there is a previous | |
111 | # version without the edit in the workdir |
|
119 | # version without the edit in the workdir | |
112 |
newlyaddedandmodifiedfiles = |
|
120 | newlyaddedandmodifiedfiles = newandmodified(chunks, originalchunks) | |
113 | for chunk in chunks: |
|
|||
114 | if ishunk(chunk) and chunk.header.isnewfile() and chunk not in \ |
|
|||
115 | originalchunks: |
|
|||
116 | newlyaddedandmodifiedfiles.add(chunk.header.filename()) |
|
|||
117 | contenders = set() |
|
121 | contenders = set() | |
118 | for h in chunks: |
|
122 | for h in chunks: | |
119 | try: |
|
123 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now