Show More
@@ -226,6 +226,10 b' class ChangingFiles(object):' | |||||
226 |
|
226 | |||
227 | def compute_all_files_changes(ctx): |
|
227 | def compute_all_files_changes(ctx): | |
228 | """compute the files changed by a revision""" |
|
228 | """compute the files changed by a revision""" | |
|
229 | p1 = ctx.p1() | |||
|
230 | p2 = ctx.p2() | |||
|
231 | if p1.rev() == node.nullrev and p2.rev() == node.nullrev: | |||
|
232 | return _process_root(ctx) | |||
229 | filescopies = computechangesetcopies(ctx) |
|
233 | filescopies = computechangesetcopies(ctx) | |
230 | filesadded = computechangesetfilesadded(ctx) |
|
234 | filesadded = computechangesetfilesadded(ctx) | |
231 | filesremoved = computechangesetfilesremoved(ctx) |
|
235 | filesremoved = computechangesetfilesremoved(ctx) | |
@@ -240,6 +244,17 b' def compute_all_files_changes(ctx):' | |||||
240 | return files |
|
244 | return files | |
241 |
|
245 | |||
242 |
|
246 | |||
|
247 | def _process_root(ctx): | |||
|
248 | """compute the appropriate changed files for a changeset with no parents | |||
|
249 | """ | |||
|
250 | # Simple, there was nothing before it, so everything is added. | |||
|
251 | md = ChangingFiles() | |||
|
252 | manifest = ctx.manifest() | |||
|
253 | for filename in manifest: | |||
|
254 | md.mark_added(filename) | |||
|
255 | return md | |||
|
256 | ||||
|
257 | ||||
243 | def computechangesetfilesadded(ctx): |
|
258 | def computechangesetfilesadded(ctx): | |
244 | """return the list of files added in a changeset |
|
259 | """return the list of files added in a changeset | |
245 | """ |
|
260 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now