diff --git a/Perforce.py b/Perforce.py index 174b2e1..cc29275 100644 --- a/Perforce.py +++ b/Perforce.py @@ -292,8 +292,8 @@ def IsFileWritable(in_filename): # Checkout section def Checkout(in_filename): - if(IsFileWritable(in_filename)): - return -1, "File is already writable." + # if(IsFileWritable(in_filename)): + # return -1, "File is already writable." folder_name, filename = os.path.split(in_filename) isInDepot = IsFileInDepot(folder_name, filename) @@ -330,10 +330,10 @@ def on_pre_save(self, view): if(not perforce_settings.get('perforce_auto_checkout') or not perforce_settings.get('perforce_auto_checkout_on_save')): return - if(view.is_dirty()): - PrepareCommand(); - success, message = Checkout(view.file_name()) - LogResults(success, message); + #if(view.is_dirty()): + PrepareCommand(); + success, message = Checkout(view.file_name()) + LogResults(success, message); class PerforceCheckoutCommand(sublime_plugin.TextCommand): def run(self, edit): @@ -649,7 +649,7 @@ def MakeFileListFromChangelist(self, in_changelistline): cleanedfile = line[0:poundindex] # just keep the filename - cleanedfile = '/'.join(cleanedfile.split('/')[3:]) + # cleanedfile = '/'.join(cleanedfile.split('/')[3:]) file_entry = [cleanedfile[cleanedfile.rfind('/')+1:]] file_entry.append("Changelist: " + in_changelistline[1])