Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added the changelist description to the list of checkedout files

Added sublime commands for all available commands
Updated readme, the plugin has changed enough not to be "based" on another one
  • Loading branch information...
commit 7bb8f751060632fd5ce9dc860c35dda536e71612 1 parent cbcd3ae
@ericmartel authored
View
26 Default.sublime-commands
@@ -0,0 +1,26 @@
+[
+ {
+ "caption": "Perforce: Checkout",
+ "command": "perforce_checkout"
+ },
+ {
+ "caption": "Perforce: Add",
+ "command": "perforce_add"
+ },
+ {
+ "caption": "Perforce: Revert",
+ "command": "perforce_revert"
+ },
+ {
+ "caption": "Perforce: Diff",
+ "command": "perforce_diff"
+ },
+ {
+ "caption": "Perforce: Graphical Diff with Depot",
+ "command": "perforce_graphical_diff_with_depot"
+ },
+ {
+ "caption": "Perforce: List Checkedout Files",
+ "command": "perforce_list_checked_out_files"
+ }
+]
View
14 Perforce.py
@@ -1,5 +1,4 @@
# Written by Eric Martel (emartel@gmail.com / www.ericmartel.com)
-# Inspired by https://gist.github.com/1065808
# available keyboard shortcuts
# perforce_add
@@ -305,11 +304,11 @@ def ConvertFileNameToFileOnDisk(self, in_filename):
return filename
- def MakeFileListFromChangelist(self, in_changelist):
+ def MakeFileListFromChangelist(self, in_changelistline):
files_list = []
# Launch p4 opened to retrieve all files from changelist
- command = 'p4 opened -c ' + in_changelist
+ command = 'p4 opened -c ' + in_changelistline[1]
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=None, shell=True)
result, err = p.communicate()
if(not err):
@@ -324,7 +323,7 @@ def MakeFileListFromChangelist(self, in_changelist):
cleanedfile = '/'.join(cleanedfile.split('/')[3:])
file_entry = [cleanedfile[cleanedfile.rfind('/')+1:]]
- file_entry.append("Changelist: " + in_changelist);
+ file_entry.append("Changelist: " + in_changelistline[1] + " - " + ' '.join(in_changelistline[7:]));
localfile = self.ConvertFileNameToFileOnDisk(cleanedfile)
file_entry.append(localfile)
@@ -332,7 +331,7 @@ def MakeFileListFromChangelist(self, in_changelist):
return files_list
def MakeCheckedOutFileList(self):
- files_list = self.MakeFileListFromChangelist('default');
+ files_list = self.MakeFileListFromChangelist(['','default','','','','','','Default Changelist']);
# Launch p4 changes to retrieve all the pending changelists
command = 'p4 changes -s pending'
@@ -345,7 +344,7 @@ def MakeCheckedOutFileList(self):
# for each line, extract the change, and run p4 opened on it to list all the files
for changelistline in changelists:
changelistlinesplit = changelistline.split(' ')
- files_list.extend(self.MakeFileListFromChangelist(changelistlinesplit[1]))
+ files_list.extend(self.MakeFileListFromChangelist(changelistlinesplit))
return files_list
@@ -354,8 +353,7 @@ def run(self):
def show_quick_panel():
if not self.files_list:
- sublime.error_message(__name__ + ': There are no checked out files ' +
- 'to list.')
+ sublime.error_message(__name__ + ': There are no checked out files to list.')
return
self.window.show_quick_panel(self.files_list, self.on_done)
sublime.set_timeout(show_quick_panel, 10)
View
4 README
@@ -2,6 +2,4 @@ Sublime Text 2 Perforce Plugin
Eric Martel (emartel@gmail.com / www.ericmartel.com)
-Available at https://github.com/ericmartel/Sublime-Text-2-Perforce-Plugin
-
-Inspired by https://gist.github.com/1065808
+Available at https://github.com/ericmartel/Sublime-Text-2-Perforce-Plugin
View
4 messages/1.0.4.txt
@@ -0,0 +1,4 @@
+Perforce integration 1.0.4 Changelog:
+
+New Features
+ - Added Sublime Commands to each available commands. They can now be launched using the Command Palette
View
6 package-metadata.json
@@ -1,5 +1 @@
-{
- "version": "1.0.3",
- "url": "https://github.com/ericmartel/Sublime-Text-2-Perforce-Plugin",
- "description": "A Perforce integration plugin"
-}
+{"url": "https://github.com/ericmartel/Sublime-Text-2-Perforce-Plugin", "version": "2012.01.12.01.58.03", "description": "Supports auto add and checkout with commands to add, diff, checkout, revert, diff using p4diff and lists all checked out files with quick access to them"}
Please sign in to comment.
Something went wrong with that request. Please try again.