Show More
@@ -182,6 +182,21 def fix(ui, repo, *pats, **opts): | |||||
182 | replacerev(ui, repo, ctx, filedata[rev], replacements) |
|
182 | replacerev(ui, repo, ctx, filedata[rev], replacements) | |
183 | del filedata[rev] |
|
183 | del filedata[rev] | |
184 |
|
184 | |||
|
185 | cleanup(repo, replacements, bool(filedata[wdirrev])) | |||
|
186 | ||||
|
187 | def cleanup(repo, replacements, wdirwritten): | |||
|
188 | """Calls scmutil.cleanupnodes() with the given replacements. | |||
|
189 | ||||
|
190 | "replacements" is a dict from nodeid to nodeid, with one key and one value | |||
|
191 | for every revision that was affected by fixing. This is slightly different | |||
|
192 | from cleanupnodes(). | |||
|
193 | ||||
|
194 | "wdirwritten" is a bool which tells whether the working copy was affected by | |||
|
195 | fixing, since it has no entry in "replacements". | |||
|
196 | ||||
|
197 | Useful as a hook point for extending "hg fix" with output summarizing the | |||
|
198 | effects of the command, though we choose not to output anything here. | |||
|
199 | """ | |||
185 |
|
|
200 | replacements = {prec: [succ] for prec, succ in replacements.iteritems()} | |
186 |
|
|
201 | scmutil.cleanupnodes(repo, replacements, 'fix', fixphase=True) | |
187 |
|
202 |
General Comments 0
You need to be logged in to leave comments.
Login now