diff --git a/workspace_tools/export/.hgignore b/workspace_tools/export/.hgignore new file mode 100755 index 0000000000..a4e91129a7 --- /dev/null +++ b/workspace_tools/export/.hgignore @@ -0,0 +1,20 @@ +syntax: regexp +\.hgignore$ +\.git$ +\.svn$ +\.orig$ +\.msub$ +\.meta$ +\.ctags +\.uvproj$ +\.uvopt$ +\.project$ +\.cproject$ +\.launch$ +\.project$ +\.cproject$ +\.launch$ +Makefile$ +\.ewp$ +\.eww$ +\.htm$ \ No newline at end of file diff --git a/workspace_tools/export/__init__.py b/workspace_tools/export/__init__.py index 5f52968d43..85a960929c 100755 --- a/workspace_tools/export/__init__.py +++ b/workspace_tools/export/__init__.py @@ -16,7 +16,7 @@ limitations under the License. """ import os, tempfile from os.path import join, exists, basename -from shutil import copytree, rmtree +from shutil import copytree, rmtree, copy from workspace_tools.utils import mkdir from workspace_tools.export import uvision4, codesourcery, codered, gccarm, ds5_5, iar, emblocks, coide, kds @@ -85,7 +85,9 @@ def export(project_path, project_name, ide, target, destination='/tmp/', zip_path = None if report['success']: # add readme file to every offline export. - open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write(''% (ide)) + open(os.path.join(tempdir, 'GettingStarted.htm'),'w').write(''% (ide)) + # copy .hgignore file to exported direcotry as well. + copy(os.path.join(exporter.TEMPLATE_DIR,'.hgignore'),tempdir) zip_path = zip_working_directory_and_clean_up(tempdir, destination, project_name, clean) return zip_path, report