Skip to content

Commit

Permalink
Add new files to VCS after updating from templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
friedelwolff committed Apr 26, 2012
1 parent 525e0a6 commit c9095b6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion local_apps/pootle_translationproject/models.py
Expand Up @@ -258,9 +258,17 @@ def update_from_templates(self, pootle_path=None):

convert_template(self, store, new_pootle_path, new_path, monolingual)

self.scan_files()
all_files, new_files = self.scan_files()
#self.update(conservative=False)

from pootle_misc.versioncontrol import hasversioning
project_path = self.project.get_real_path()
if new_files and hasversioning(real_path):
from translate.storage import versioncontrol
vcs = versioncontrol.get_versioned_object(real_path)
output = vcs.add([s.abs_real_path for s in new_files],
"New files added from %s based on templates" % (settings.TITLE))

if pootle_path is None:
newstats = self.getquickstats()

Expand Down

0 comments on commit c9095b6

Please sign in to comment.