Commits

Dan Villiom Podlaski Christiansen committed 9d97b03

Add cleanup patches.

  • Participants
  • Parent commits b52f53f

Comments (0)

Files changed (4)

File remove-project-files.diff

+# HG changeset patch
+# Parent 8457ccd64b972d5cf35f118cc17a4e270e25500e
+# User Dan Villiom Podlaski Christiansen  <danchr@gmail.com>
+Remove Eclipse project files.
+
+diff --git a/.project b/.project
+deleted file mode 100644
+--- a/.project
++++ /dev/null
+@@ -1,17 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8"?>
+-<projectDescription>
+-	<name>HgSubversion</name>
+-	<comment></comment>
+-	<projects>
+-	</projects>
+-	<buildSpec>
+-		<buildCommand>
+-			<name>org.python.pydev.PyDevBuilder</name>
+-			<arguments>
+-			</arguments>
+-		</buildCommand>
+-	</buildSpec>
+-	<natures>
+-		<nature>org.python.pydev.pythonNature</nature>
+-	</natures>
+-</projectDescription>
+diff --git a/.pydevproject b/.pydevproject
+deleted file mode 100644
+--- a/.pydevproject
++++ /dev/null
+@@ -1,11 +0,0 @@
+-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+-<?eclipse-pydev version="1.0"?>
+-
+-<pydev_project>
+-<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+-<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+-<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+-<path>/HgSubversion</path>
+-<path>/HgSubversion/tests</path>
+-</pydev_pathproperty>
+-</pydev_project>
+diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
+deleted file mode 100644
+--- a/.settings/org.eclipse.core.resources.prefs
++++ /dev/null
+@@ -1,3 +0,0 @@
+-#Fri Oct 22 12:19:35 CST 2010
+-eclipse.preferences.version=1
+-encoding/<project>=UTF-8

File remove-tags.diff

+# HG changeset patch
+# Parent 162ac18a9e448b3b12324dda14e9c2348df29903
+# User Dan Villiom Podlaski Christiansen  <danchr@gmail.com>
+Remove extraneous tags
+
+diff --git a/.hgtags b/.hgtags
+--- a/.hgtags
++++ b/.hgtags
+@@ -4,6 +4,4 @@ 4359ddd73b009fbb356c52ea5d99cba25222ee7a
+ 8e621dbb82d4363a85317638ad237e2817c56347 1.1.1
+ 093ae2915b452539b44390ee4ea14987484e1eee 1.1.2
+ 708234ad6c97fb52417e0b46a86c8373e25123a5 1.2
+-fdeb9a98e310815ac06e9bf0eb9a367a76050058 svnmeta
+ 4bbc6bf947f56a92e95a04a27b94a9f72d5482d7 1.2.1
+-8adc672142e89c7db5d57b47f97583b140365c7e pure_branch
+remove-project-files.diff
+trailing-whitespace.diff
+remove-tags.diff
 # Placed by Bitbucket

File trailing-whitespace.diff

+# HG changeset patch
+# Parent a00c2fce97a7da10704e0cdbf8760e0ada420050
+# User Dan Villiom Podlaski Christiansen  <danchr@gmail.com>
+Remove trailing whitespace
+
+diff --git a/hgsubversion/editor.py b/hgsubversion/editor.py
+--- a/hgsubversion/editor.py
++++ b/hgsubversion/editor.py
+@@ -393,7 +393,7 @@ class AutoHgEditor(svnwrap.Editor):
+         assert ha != node.nullid
+         ctx = self.repo.changectx(ha)
+ 
+-        #subpath is an file, when subpath is in files that means it's just copied from other 
++        #subpath is an file, when subpath is in files that means it's just copied from other
+         #folders, and delete after copy.
+         if subpath in ctx or path in self.current.files:
+             self.ui.note("Delete file '%s' from '%s'!\n" % (subpath, branch_info[0]))
+diff --git a/hgsubversion/replay.py b/hgsubversion/replay.py
+--- a/hgsubversion/replay.py
++++ b/hgsubversion/replay.py
+@@ -252,7 +252,7 @@ def updateexternals_meta(ui, meta, curre
+ def commit_branch(meta, branch_path, in_files, is_tag):
+     ui = meta.ui
+     current = meta.editor.current
+-    r = current.rev 
++    r = current.rev
+     date = meta.fixdate(r.date)
+     files = dict(in_files)
+ 
+@@ -376,14 +376,14 @@ def convert_rev_meta(ui, meta, svn, r, f
+             assert branch_info[-1], branch_info
+             branch_batches[branch_path].append((subpath, f))
+ 
+-    # 1. handle tags commit first, because branches need tags information 
++    # 1. handle tags commit first, because branches need tags information
+     for branch_path, files in branch_batches.iteritems():
+         '''
+         TODO:add test case!
+         Only when an tag is changed to commit.
+         We don't commit either when it's added or deleted.
+         NOTICE:When an tag is added with modification, we will commit it.
+-        ''' 
++        '''
+         if branch_path in tag_changed:
+             commit_branch(meta, branch_path, files, True)
+ 
+diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py
+--- a/hgsubversion/svnmeta.py
++++ b/hgsubversion/svnmeta.py
+@@ -734,7 +734,7 @@ defalt_new_meta =  [0, {}, set()]
+ 
+ class NewMeta(object):
+ 
+-    def __init__(self, local_repo, remote_repo = None, fetch = None): #fetch = None, sub, all 
++    def __init__(self, local_repo, remote_repo = None, fetch = None): #fetch = None, sub, all
+         """path is the path to the target hg repo.
+ 
+         subdir is the subdirectory of the edits *on the svn server*.
+@@ -817,7 +817,7 @@ class NewMeta(object):
+         self.load_meta()
+ 
+         '''
+-        The following settings are optional!  
++        The following settings are optional!
+         '''
+         tag_locations = self.ui.configlist('hgsubversion', 'tagpaths', [self.subdir + 'tags/'])
+         saved_tag_locations =  util.load_pickle(self.tag_locations_file, [])
+@@ -846,7 +846,7 @@ class NewMeta(object):
+         #2. It's an normal branch which was real
+         #3. It's an normal which is solid, that means the path can not containing other branches
+         #4. It's an virtual branch which is not real, that means won't convert to hg
+-        #5. It's an virtual branch which is not real and  also is solid, that means it's cannot 
++        #5. It's an virtual branch which is not real and  also is solid, that means it's cannot
+         #    containing other branches.
+         '''
+         self.usebranchnames = self.ui.configbool('hgsubversion',
+@@ -1040,7 +1040,7 @@ class NewMeta(object):
+             return False
+         if branch_info[-2] == -1:
+             return True
+-        return revnum < branch_info[-2] 
++        return revnum < branch_info[-2]
+ 
+     def get_path_ancestors(self, branch_info):
+         ancestors = [branch_info]
+@@ -1100,10 +1100,10 @@ class NewMeta(object):
+                 real = copy_from
+             elif real == node.nullid:
+                 '''
+-                When branch_info already is an parent, then only when it's have no 
++                When branch_info already is an parent, then only when it's have no
+                 hg revision information, that means branch_info is an tag, so using
+                 it's copy_from parent's revision information.
+-                ''' 
++                '''
+                 real = copy_from
+             pass
+         return copy_from, direct, real
+@@ -1121,7 +1121,7 @@ class NewMeta(object):
+                 return hash
+             if branch_info[1] != 0:
+                 self.ui.debug("[r%s] This is must be an tag without modify %s:%s!\n" % (revnum, node.hex(hash), branch_info))
+-                assert self.is_tag_impl(branch_info), branch_info 
++                assert self.is_tag_impl(branch_info), branch_info
+         raise Exception("That's impossible %s:%s" % (branch_info, ancestors))
+ 
+     def get_hash(self, path, branch_rev):
+@@ -1170,7 +1170,7 @@ class NewMeta(object):
+                 self.ui.status(('[r%d] %s: %s' % bits)[:w] + '\n')
+ 
+                 replay.convert_rev_meta(self.ui, self, self.svn, r, firstrun)
+-                self.revmap.youngest = r.revnum 
++                self.revmap.youngest = r.revnum
+                 firstrun = False
+                 pass
+         except KeyboardInterrupt:
+@@ -1225,7 +1225,7 @@ class NewMeta(object):
+         if is_pull:
+             start_rev = max(start_rev, self.revmap.youngest + 1, 1)
+         else:
+-            start_rev = max(start_rev, self.last_log + 1, 1) 
++            start_rev = max(start_rev, self.last_log + 1, 1)
+         return min(start_rev, self.svn.HEAD)
+ 
+     def get_stop_rev(self, heads = [], is_pull = True):
+@@ -1246,7 +1246,7 @@ class NewMeta(object):
+                 stop_rev = self.svn.HEAD
+             else:
+                 stop_rev = int(stop_config)
+-                
++
+         if stop_rev <= 0:
+             stop_rev = self.svn.HEAD
+         return min(stop_rev, self.svn.HEAD)
+@@ -1279,7 +1279,7 @@ class NewMeta(object):
+                     self.last_log = r.revnum
+                     data_new_meta = self.get_new_meta()
+                     if update_count % 10 == 0:
+-                        self.save_meta(data_new_meta) 
++                        self.save_meta(data_new_meta)
+                     update_count = update_count + 1
+         except KeyboardInterrupt:
+             error_happened = True
+@@ -1310,12 +1310,12 @@ class NewMeta(object):
+         >Svn ls
+         A/
+         B/
+-        
++
+         >Svn del B
+         >Rmdir /s/q B
+-        
++
+         >Svn move A B
+-        
++
+         >Svn ci -m "replacing B by A"
+     '''
+     def update(self, revision):
+@@ -1403,7 +1403,7 @@ class NewMeta(object):
+         '''
+         1.If USER specify the branch_path can be a branch, then it's a branch!
+         2.Else if branch_path is contained in an solid-branch, then it's can not be an branch!
+-        3.Finally else, it's an branch! 
++        3.Finally else, it's an branch!
+         '''
+ 
+         #CHECK:branch_path should not be an branch at the current time!
+diff --git a/tests/test_new_meta.py b/tests/test_new_meta.py
+--- a/tests/test_new_meta.py
++++ b/tests/test_new_meta.py
+@@ -54,4 +54,4 @@ class TestNewMeta(test_util.TestBase, sv
+ 
+ if __name__ == "__main__":
+     #import sys;sys.argv = ['', 'Test.testName']
+-    unittest.main()
+\ No newline at end of file
++    unittest.main()