1
1
# Copyright (C) 2005, 2006 Canonical Ltd
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
5
# the Free Software Foundation; either version 2 of the License, or
498
498
# ESEPARATIONOFCONCERNS: this function is diffing and using the diff
499
499
# results to create a new inventory at the same time, which results
500
# in bugs like #46635. Any reason not to use/enhance compare_trees?
500
# in bugs like #46635. Any reason not to use/enhance Tree.changes_from?
501
501
# ADHB 11-07-2006
502
502
mutter("Selecting files for commit with filter %s", self.specific_files)
503
# iter_entries does not visit the ROOT_ID node so we need to call
504
# self._emit_progress_update once by hand.
503
# at this point we dont copy the root entry:
504
entries = self.work_inv.iter_entries()
505
506
self._emit_progress_update()
506
for path, new_ie in self.work_inv.iter_entries():
507
for path, new_ie in entries:
507
508
self._emit_progress_update()
508
509
file_id = new_ie.file_id
509
mutter('check %s {%s}', path, file_id)
510
# mutter('check %s {%s}', path, file_id)
510
511
if (not self.specific_files or
511
512
is_inside_or_parent_of_any(self.specific_files, path)):
512
mutter('%s selected for commit', path)
513
# mutter('%s selected for commit', path)
513
514
ie = new_ie.copy()
514
515
ie.revision = None
516
mutter('%s not selected for commit', path)
517
# mutter('%s not selected for commit', path)
517
518
if self.basis_inv.has_id(file_id):
518
519
ie = self.basis_inv[file_id].copy()