Skip to content

Commit

Permalink
Merge pull request #58 from jslhcl/master
Browse files Browse the repository at this point in the history
#57, do not add empty file since it will overwrite the existing content
  • Loading branch information
charleso committed Apr 24, 2015
2 parents 5ae7469 + 4cbb626 commit 842288e
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions rebase.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,6 @@ def getFile(line):
actual_versions = self.filter_versions(all_versions, lambda x: x[1] < date)

versions = self.checkin_versions(actual_versions)
if not versions:
print("No proper versions of '%s' file. Check if it is empty." % added)
versions = self.empty_file_versions(actual_versions)
if not versions:
print("It appears that you may be missing a branch in the includes section of your gitcc config for file '%s'." % added)
continue
Expand All @@ -269,19 +266,6 @@ def getFile(line):
def checkin_versions(self, versions):
return self.filter_versions_by_type(versions, 'checkinversion')

def empty_file_versions(self, versions):
return self.versions_with_branch(versions) or self.versions_without_branch(versions)

def versions_with_branch(self, versions):
if len(versions) != 5:
return False
return self.filter_versions_by_type(versions, 'mkbranchversion')

def versions_without_branch(self, versions):
if len(versions) != 3:
return False
return self.filter_versions(versions, lambda x: x[0] == 'mkelemversion')

def filter_versions_by_type(self, versions, type):
def f(s):
return s[0] == type and filterBranches(s[2], True)
Expand Down

0 comments on commit 842288e

Please sign in to comment.