Permalink
Browse files

added setuptools/debian support

added ExecuteCommand
tab2spaces conversion
  • Loading branch information...
1 parent 45ec6a0 commit d827e0dfe79ace3a2772e1e18855adb378184474 @ulricheck committed Mar 21, 2012
View
1 .idea/.name
@@ -0,0 +1 @@
+dupinanny
View
9 .idea/dupinanny.iml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="PYTHON_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ </component>
+</module>
+
View
5 .idea/encodings.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
+</project>
+
View
7 .idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,7 @@
+<component name="InspectionProjectProfileManager">
+ <settings>
+ <option name="PROJECT_PROFILE" />
+ <option name="USE_PROJECT_PROFILE" value="false" />
+ <version value="1.0" />
+ </settings>
+</component>
View
9 .idea/misc.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CppTools.Loader" reportImplicitCastToBool="false" reportNameReferencedOnce="false" version="3" compilerSelect="AUTO" />
+ <component name="ProjectResources">
+ <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
+ </component>
+ <component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7.1 (/Library/Frameworks/Python.framework/Versions/2.7/bin/python)" project-jdk-type="Python SDK" />
+</project>
+
View
9 .idea/modules.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/dupinanny.iml" filepath="$PROJECT_DIR$/.idea/dupinanny.iml" />
+ </modules>
+ </component>
+</project>
+
View
5 .idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+<component name="DependencyValidationManager">
+ <state>
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
+ </state>
+</component>
View
7 .idea/vcs.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
+
View
459 .idea/workspace.xml
@@ -0,0 +1,459 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ChangeListManager">
+ <list default="true" id="c8df4547-580a-4d53-89e8-ec331bc8d2a4" name="Default" comment="">
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/dupinanny.iml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/.name" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/encodings.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/scopes/scope_settings.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/README.Debian" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/changelog" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/compat" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/control" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/files" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/find_manpages.sh" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/debian/rules" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/setup.py" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/dupinanny/__init__.py" />
+ <change type="MOVED" beforePath="$PROJECT_DIR$/backup.py" afterPath="$PROJECT_DIR$/src/dupinanny/backup.py" />
+ <change type="MOVED" beforePath="$PROJECT_DIR$/config.py" afterPath="$PROJECT_DIR$/src/dupinanny/config.py" />
+ <change type="MOVED" beforePath="$PROJECT_DIR$/lock.py" afterPath="$PROJECT_DIR$/src/dupinanny/lock.py" />
+ <change type="MOVED" beforePath="$PROJECT_DIR$/portalocker.py" afterPath="$PROJECT_DIR$/src/dupinanny/portalocker.py" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.txt" afterPath="$PROJECT_DIR$/README.txt" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/config.cfg.example" afterPath="$PROJECT_DIR$/config.cfg.example" />
+ </list>
+ <ignored path="dupinanny.iws" />
+ <ignored path=".idea/workspace.xml" />
+ <option name="TRACKING_ENABLED" value="true" />
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
+ <component name="CreatePatchCommitExecutor">
+ <option name="PATCH_PATH" value="" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="dupinanny" />
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="setup.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/setup.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="16" column="6" selection-start="274" selection-end="274" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="backup.py" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/backup.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="149" column="32" selection-start="6013" selection-end="6013" vertical-scroll-proportion="0.21771218">
+ <folding>
+ <element signature="e#924#961#0" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="__init__.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/__init__.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="58" selection-start="78" selection-end="78" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="config.cfg.example" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/config.cfg.example">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="70" column="59" selection-start="3350" selection-end="3350" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="portalocker.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/portalocker.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="45" column="0" selection-start="1106" selection-end="1110" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="config.py" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/config.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="89" column="32" selection-start="3634" selection-end="3634" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="Git.Settings">
+ <option name="CHECKOUT_INCLUDE_TAGS" value="false" />
+ <option name="UPDATE_CHANGES_POLICY" value="STASH" />
+ <option name="LINE_SEPARATORS_CONVERSION" value="ASK" />
+ </component>
+ <component name="IdeDocumentHistory">
+ <option name="changedFiles">
+ <list>
+ <option value="$PROJECT_DIR$/README.txt" />
+ <option value="$PROJECT_DIR$/src/backup.py" />
+ <option value="$PROJECT_DIR$/src/__init__.py" />
+ <option value="$PROJECT_DIR$/src/dupinanny/__init__.py" />
+ <option value="$PROJECT_DIR$/config.cfg.example" />
+ <option value="$PROJECT_DIR$/src/dupinanny/portalocker.py" />
+ <option value="$PROJECT_DIR$/src/dupinanny/backup.py" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectFrameBounds">
+ <option name="x" value="179" />
+ <option name="y" value="100" />
+ <option name="width" value="1344" />
+ <option name="height" value="972" />
+ </component>
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages />
+ <abbreviatePackageNames />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ <panes>
+ <pane id="Scope" />
+ <pane id="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="dupinanny" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="debian" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </pane>
+ </panes>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="options.splitter.main.proportions" value="0.3" />
+ <property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="options.lastSelected" value="reference.settings.ide.settings.web.browsers" />
+ <property name="options.splitter.details.proportions" value="0.2" />
+ <property name="options.searchVisible" value="true" />
+ </component>
+ <component name="PyConsoleOptionsProvider">
+ <option name="myPythonConsoleState">
+ <PyConsoleSettings />
+ </option>
+ <option name="myDjangoConsoleState">
+ <PyConsoleSettings />
+ </option>
+ </component>
+ <component name="RunManager">
+ <configuration default="true" type="PythonConfigurationType" factoryName="Python">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs>
+ <env name="PYTHONUNBUFFERED" value="1" />
+ </envs>
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <module name="dupinanny" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="PARAMETERS" value="" />
+ <option name="MULTIPROCESS" value="false" />
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="Unittests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <module name="dupinanny" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <option name="PUREUNITTEST" value="true" />
+ <method />
+ </configuration>
+ <configuration default="true" type="tests" factoryName="Doctests">
+ <option name="INTERPRETER_OPTIONS" value="" />
+ <option name="PARENT_ENVS" value="true" />
+ <envs />
+ <option name="SDK_HOME" value="" />
+ <option name="WORKING_DIRECTORY" value="" />
+ <option name="IS_MODULE_SDK" value="false" />
+ <module name="dupinanny" />
+ <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
+ <option name="SCRIPT_NAME" value="" />
+ <option name="CLASS_NAME" value="" />
+ <option name="METHOD_NAME" value="" />
+ <option name="FOLDER_NAME" value="" />
+ <option name="TEST_TYPE" value="TEST_SCRIPT" />
+ <option name="PATTERN" value="" />
+ <option name="USE_PATTERN" value="false" />
+ <method />
+ </configuration>
+ <list size="0" />
+ </component>
+ <component name="ShelveChangesManager" show_recycled="false" />
+ <component name="SvnConfiguration" maxAnnotateRevisions="500">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="mySSHConnectionTimeout" value="30000" />
+ <option name="mySSHReadTimeout" value="30000" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
+ <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
+ <option name="IGNORE_SPACES_IN_MERGE" value="false" />
+ <option name="DETECT_NESTED_COPIES" value="true" />
+ <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
+ <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
+ <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
+ <option name="FORCE_UPDATE" value="false" />
+ <configuration useDefault="true">$USER_HOME$/.subversion_IDEA</configuration>
+ <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+ </component>
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <created>1332334679056</created>
+ <updated>1332334679056</updated>
+ </task>
+ <servers />
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="179" y="100" width="1344" height="972" extended-state="0" />
+ <editor active="false" />
+ <layout>
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32942554" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="Data Sources" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32942554" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.6705744" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+ </layout>
+ </component>
+ <component name="VcsContentAnnotationSettings">
+ <option name="myLimit" value="2678400000" />
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="CHECK_NEW_TODO" value="true" />
+ <option name="myTodoPanelSettings">
+ <value>
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="false" />
+ </value>
+ </option>
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
+ <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
+ <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
+ <option name="ENABLE_BACKGROUND_PROCESSES" value="false" />
+ <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
+ <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
+ <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
+ <option name="DEFAULT_PATCH_EXTENSION" value="patch" />
+ <option name="SHORT_DIFF_HORISONTALLY" value="true" />
+ <option name="SHORT_DIFF_EXTRA_LINES" value="2" />
+ <option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
+ <option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
+ <option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
+ <option name="CREATE_PATCH_EXPAND_DETAILS_DEFAULT" value="true" />
+ <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+ <option name="LAST_COMMIT_MESSAGE" value="added setuptools/debian support&#10;added ExecuteCommand" />
+ <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ACTIVE_VCS_NAME" />
+ <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+ <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+ <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+ <MESSAGE value="added setuptools/debian support&#10;added ExecuteCommand" />
+ </component>
+ <component name="XDebuggerManager">
+ <breakpoint-manager />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/debian/control">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/debian/rules">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="-0.8081181">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/README.txt">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="3" column="27" selection-start="116" selection-end="116" vertical-scroll-proportion="0.05447942">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/config.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="89" column="32" selection-start="3634" selection-end="3634" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/setup.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="16" column="6" selection-start="274" selection-end="274" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/__init__.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="58" selection-start="78" selection-end="78" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/config.cfg.example">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="70" column="59" selection-start="3350" selection-end="3350" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/portalocker.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="45" column="0" selection-start="1106" selection-end="1110" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/src/dupinanny/backup.py">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="149" column="32" selection-start="6013" selection-end="6013" vertical-scroll-proportion="0.21771218">
+ <folding>
+ <element signature="e#924#961#0" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
View
5 README.txt
@@ -1,3 +1,8 @@
+Changed by Ulrich Eck <ueck@net-labs.de>
+
+- setuptools compatibility + dupinanny package
+- execute-command extension
+
Dupinanny backup script
=======================
View
3 config.cfg.example
@@ -68,6 +68,9 @@ DupiConfig['items'].append(
#from backup import CheckMount
#DupiConfig['prepare'] = [ CheckMount( '/mnt/backup' ) ]
+# Execute a command (e.g. db dump) before backup is started
+#DupiConfig['prepare'] = [ ExecuteCommand( 'echo "hello"' ) ]
+
# adding post-backup steps - write your own class, or use some of the provided utilities
# for instance, this displays the disk usage
#class SFTPDiskSpace( object ):
View
5 debian/README.Debian
@@ -0,0 +1,5 @@
+python-%%PKGNAME%% for Ubuntu
+----------------------------
+
+a wrapper for the duplicity backup system
+
View
7 debian/changelog
@@ -0,0 +1,7 @@
+python-dupinanny (0.1) hoary; urgency=low
+
+ [ root ]
+ * fixed invalid changes
+ *
+
+ -- root <root@db01.wienerwald.de> Mon, 09 Feb 2009 14:48:48 +0100
View
1 debian/compat
@@ -0,0 +1 @@
+4
View
13 debian/control
@@ -0,0 +1,13 @@
+Source: python-dupinanny
+Section: python
+Priority: extra
+Maintainer: Ulrich Eck <ueck@net-labs.de>
+Build-Depends: debhelper (>= 4.2.28), unzip, python, python-setuptools, python-dev, python2.6, python2.6-setuptools, python2.6-dev
+Standards-Version: 0.1
+
+Package: python2.6-dupinanny
+Architecture: all
+Depends: ${python:Depends}, python2.6-setuptools, duplicity, python-boto
+Description: Backup Wrapper for duplicity
+
+
View
1 debian/files
@@ -0,0 +1 @@
+python2.6-dupinanny_0.1_all.deb python extra
View
9 debian/find_manpages.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+dir=$(pwd)
+
+if [ -z "$1" ]; then
+ find -name '*.[1-9]*' ! -path './debian/*' -type f -exec sh ${dir}/$0 \{\} \;
+else
+ file $1 | grep -q troff && echo $1
+fi
View
92 debian/rules
@@ -0,0 +1,92 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+PKGNAME=dupinanny
+MODULENAME=dupinanny
+
+PYVERS=$(subst -dev,,\
+ $(subst python,,\
+ $(filter python%-dev,\
+ $(shell sed -n '/^Build-Depends/s/,//gp' debian/control))))
+
+PYVER := $(shell python -c 'import sys; print sys.version[:3]')
+
+MANPAGES:= $(shell sh debian/find_manpages.sh)
+
+build: build-stamp
+build-stamp: $(PYVERS:%=build-python%)
+ touch $@
+
+build-python%:
+ #python$* setup.py build
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp build-python*
+ rm -rf build dist
+ -find -name '*.py[co]' | xargs rm -f
+ dh_clean
+
+install: build install-prereq $(PYVERS:%=install-python%)
+ mkdir -p debian/python-$(PKGNAME)/usr/bin
+ -mv -f debian/python$(PYVER)-$(PKGNAME)/usr/bin/* debian/python-$(PKGNAME)/usr/bin/
+ -find debian/python$(PYVER)-$(PKGNAME)/usr/lib/python$(PYVER)/site-packages/ ! -name '*.egg' -maxdepth 1 -mindepth 1 \
+ -exec mv '{}' debian/python-$(PKGNAME)/usr/bin \;
+ -find debian/python?.?-$(PKGNAME)/usr/lib/python?.?/site-packages/ ! -name '*.egg' -maxdepth 1 -mindepth 1 \
+ -exec rm -f '{}' \;
+ rm -rf debian/python?.?-$(PKGNAME)/usr/bin
+
+install-prereq:
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+
+install-python%:
+ if grep -q setuptools setup.py; then \
+ python$* setup.py bdist_egg -d debian/python$*-$(PKGNAME)/usr/lib/python$*/site-packages/ ;\
+ python$* setup.py install_scripts -d debian/python$*-$(PKGNAME)/usr/bin/ ;\
+ EGG="$$( ls debian/python$*-$(PKGNAME)/usr/lib/python$*/site-packages/*.egg ; )" ;\
+ mv $${EGG} $${EGG}.zip ;\
+ mkdir $${EGG} ;\
+ unzip -d $${EGG} $${EGG}.zip ;\
+ rm -f $${EGG}.zip ;\
+ chmod -R a+r $${EGG} ;\
+ else\
+ python$* /usr/bin/easy_install.py -Z --ignore-conflicts-at-my-risk -d debian/python$*-$(PKGNAME)/usr/lib/python$*/site-packages/ . ;\
+ fi
+
+
+
+binary-indep: build install
+ dh_testdir -i
+ dh_testroot -i
+ dh_installchangelogs -i
+ dh_installdocs -p python-$(PKGNAME)
+ dh_installman -p python-$(PKGNAME) $(MANPAGES)
+ dh_compress -i
+ dh_fixperms -i
+ dh_python -i /usr/lib/python?.?/site-packages
+ dh_installdeb -i
+ dh_gencontrol -i
+ dh_md5sums -i
+ dh_builddeb -i
+
+binary: binary-indep
+.PHONY: build clean binary-indep binary-arch binary install
View
93 portalocker.py
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-# portalocker.py - Cross-platform (posix/nt) API for flock-style file locking.
-# Requires python 1.5.2 or better.
-# See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203/index_txt
-# Except where otherwise noted, recipes in the Python Cookbook are
-# published under the Python license.
-
-"""Cross-platform (posix/nt) API for flock-style file locking.
-
-Synopsis:
-
- import portalocker
- file = open("somefile", "r+")
- portalocker.lock(file, portalocker.LOCK_EX)
- file.seek(12)
- file.write("foo")
- file.close()
-
-If you know what you're doing, you may choose to
-
- portalocker.unlock(file)
-
-before closing the file, but why?
-
-Methods:
-
- lock( file, flags )
- unlock( file )
-
-Constants:
-
- LOCK_EX
- LOCK_SH
- LOCK_NB
-
-I learned the win32 technique for locking files from sample code
-provided by John Nielsen <nielsenjf@my-deja.com> in the documentation
-that accompanies the win32 modules.
-
-Author: Jonathan Feinberg <jdf@pobox.com>
-Version: $Id: portalocker.py,v 1.3 2001/05/29 18:47:55 Administrator Exp $
-"""
-import os
-
-if os.name == 'nt':
- import win32con
- import win32file
- import pywintypes
- LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK
- LOCK_SH = 0 # the default
- LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY
- # is there any reason not to reuse the following structure?
- __overlapped = pywintypes.OVERLAPPED()
-elif os.name == 'posix':
- import fcntl
- LOCK_EX = fcntl.LOCK_EX
- LOCK_SH = fcntl.LOCK_SH
- LOCK_NB = fcntl.LOCK_NB
-else:
- raise RuntimeError("PortaLocker only defined for nt and posix platforms")
-
-if os.name == 'nt':
- def lock(file, flags):
- hfile = win32file._get_osfhandle(file.fileno())
- win32file.LockFileEx(hfile, flags, 0, -0x10000, __overlapped)
-
- def unlock(file):
- hfile = win32file._get_osfhandle(file.fileno())
- win32file.UnlockFileEx(hfile, 0, -0x10000, __overlapped)
-
-elif os.name =='posix':
- def lock(file, flags):
- fcntl.flock(file.fileno(), flags)
-
- def unlock(file):
- fcntl.flock(file.fileno(), fcntl.LOCK_UN)
-
-if __name__ == '__main__':
- from time import time, strftime, localtime
- import sys
- import portalocker
-
- log = open('log.txt', "a+")
- portalocker.lock(log, portalocker.LOCK_EX)
-
- timestamp = strftime("%m/%d/%Y %H:%M:%S\n", localtime(time()))
- log.write( timestamp )
-
- print "Wrote lines. Hit enter to release lock."
- dummy = sys.stdin.readline()
-
- log.close()
-
View
32 setup.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+
+from setuptools import setup, find_packages
+
+packages=find_packages('src')
+
+
+setup(
+ name="dupinanny",
+ version="0.1",
+ install_requires=[
+ ],
+ zip_safe=False,
+ packages=packages,
+ package_dir = {'':'src'},
+ keywords=[
+ ],
+ classifiers=[
+ 'Development Status :: 3 - Alpha',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Software Development :: Libraries :: Python Modules',
+ ],
+ entry_points = {
+ 'console_scripts': [
+ 'dupinanny = dupinanny.backup:start',
+ ],
+ },
+ # Uncomment next line and create a default.cfg file in your project dir
+ # if you want to package a default configuration in your egg.
+ #data_files = [('config', ['default.cfg'])],
+ )
View
2 src/dupinanny/__init__.py
@@ -0,0 +1,2 @@
+__author__ = 'jack'
+from backup import Backup, BackupTarget, LVMBackupTarget, CheckMount, ExecuteCommand
View
20 backup.py → src/dupinanny/backup.py
@@ -23,7 +23,7 @@
import sys, commands, os, subprocess, pickle, datetime
-import config, lock
+from src.dupinanny import lock, config
class Backup( config.ConfigBase ):
def __init__( self, conf ):
@@ -114,6 +114,19 @@ def Prepare( self, backup ):
if ( status != 0 ):
raise Exception( 'CheckMount: %s is not mounted' % self.directory )
+class ExecuteCommand( object ):
+ def __init__( self, cmd ):
+ self.cmd = cmd
+
+ def Prepare( self, backup ):
+ print 'ExecuteCommand.Prepare'
+ print self.cmd
+ ( status, output ) = commands.getstatusoutput( self.cmd )
+ if ( status != 0 ):
+ print repr( ( status, output ) )
+ raise Exception( 'ExecuteCommand failed: %s' % self.cmd )
+
+
class BackupTarget( object ):
def __init__( self, root, destination, exclude = [], shortFilenames = False , include = [] ):
self.root = root
@@ -134,7 +147,7 @@ def Setup( self, backup ):
if ( os.path.exists( self.fullFileFlag ) ):
full = 'full backup enabled'
else:
- full = 'not present'
+ full = 'not present'
print 'full backup indicator file: %s - %s' % ( repr( self.fullFileFlag ), full )
def Run( self, recursed = False ):
@@ -206,7 +219,7 @@ def Run( self, recursed = False ):
return
raise Exception( 'backup failed' )
- # clear the full flag if needed
+ # clear the full flag if needed
if ( backup_type == 'full' ):
os.unlink( self.fullFileFlag )
@@ -276,6 +289,5 @@ def Run( self, recursed = False ):
subprocess.check_call( cmd )
if ( __name__ == '__main__' ):
- import config
backup = config.readConfig( sys.argv )
backup['backup'].Run()
View
4 config.py → src/dupinanny/config.py
@@ -18,8 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##########################################################################
-import os, re
-
from optparse import OptionParser
class ConfigBase:
@@ -93,7 +91,7 @@ def readConfig( cmdargs ):
# setup default backup class if needed
if ( not DupiConfig.has_key( 'backup' ) ):
- from backup import Backup
+ from src.dupinanny.backup import Backup
DupiConfig['backup'] = Backup( DupiConfig )
DupiConfig['backup'].commandLineOverrides( options )
View
3 lock.py → src/dupinanny/lock.py
@@ -22,7 +22,8 @@
# NOTE: the lock has to be released and does not expire
# when the object goes out of scope it will try to release
-import sys, os, pickle, portalocker, datetime, time, platform, subprocess
+import sys, os, pickle, datetime, time, platform, subprocess
+from src.dupinanny import portalocker
class lock( object ):
def __init__( self, lockfile, lockinfo, debug = True ):
View
92 src/dupinanny/portalocker.py
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+# portalocker.py - Cross-platform (posix/nt) API for flock-style file locking.
+# Requires python 1.5.2 or better.
+# See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203/index_txt
+# Except where otherwise noted, recipes in the Python Cookbook are
+# published under the Python license.
+
+"""Cross-platform (posix/nt) API for flock-style file locking.
+
+Synopsis:
+
+ import portalocker
+ file = open("somefile", "r+")
+ portalocker.lock(file, portalocker.LOCK_EX)
+ file.seek(12)
+ file.write("foo")
+ file.close()
+
+If you know what you're doing, you may choose to
+
+ portalocker.unlock(file)
+
+before closing the file, but why?
+
+Methods:
+
+ lock( file, flags )
+ unlock( file )
+
+Constants:
+
+ LOCK_EX
+ LOCK_SH
+ LOCK_NB
+
+I learned the win32 technique for locking files from sample code
+provided by John Nielsen <nielsenjf@my-deja.com> in the documentation
+that accompanies the win32 modules.
+
+Author: Jonathan Feinberg <jdf@pobox.com>
+Version: $Id: portalocker.py,v 1.3 2001/05/29 18:47:55 Administrator Exp $
+"""
+import os
+
+if os.name == 'nt':
+ import win32con
+ import win32file
+ import pywintypes
+ LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK
+ LOCK_SH = 0 # the default
+ LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY
+ # is there any reason not to reuse the following structure?
+ __overlapped = pywintypes.OVERLAPPED()
+elif os.name == 'posix':
+ import fcntl
+ LOCK_EX = fcntl.LOCK_EX
+ LOCK_SH = fcntl.LOCK_SH
+ LOCK_NB = fcntl.LOCK_NB
+else:
+ raise RuntimeError("PortaLocker only defined for nt and posix platforms")
+
+if os.name == 'nt':
+ def lock(file, flags):
+ hfile = win32file._get_osfhandle(file.fileno())
+ win32file.LockFileEx(hfile, flags, 0, -0x10000, __overlapped)
+
+ def unlock(file):
+ hfile = win32file._get_osfhandle(file.fileno())
+ win32file.UnlockFileEx(hfile, 0, -0x10000, __overlapped)
+
+elif os.name =='posix':
+ def lock(file, flags):
+ fcntl.flock(file.fileno(), flags)
+
+ def unlock(file):
+ fcntl.flock(file.fileno(), fcntl.LOCK_UN)
+
+if __name__ == '__main__':
+ from time import time, strftime, localtime
+ import sys
+
+ log = open('log.txt', "a+")
+ portalocker.lock(log, portalocker.LOCK_EX)
+
+ timestamp = strftime("%m/%d/%Y %H:%M:%S\n", localtime(time()))
+ log.write( timestamp )
+
+ print "Wrote lines. Hit enter to release lock."
+ dummy = sys.stdin.readline()
+
+ log.close()
+

0 comments on commit d827e0d

Please sign in to comment.