Giter Site home page Giter Site logo

ericmartel / sublime-text-2-perforce-plugin Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 27.0 388 KB

Supports auto add and checkout with commands to add, checkout, delete, diff, rename, revert, diff using p4diff and lists all checked out files with quick access to them with simple changelist management

Home Page: http://www.ericmartel.com/sublime-text-2-perforce-plugin/

Python 100.00%

sublime-text-2-perforce-plugin's People

Contributors

andrewbutt avatar asomorjai avatar coldnebo avatar doucette avatar ericmartel avatar greengremlin avatar lpetre avatar zzfluke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

sublime-text-2-perforce-plugin's Issues

Slashes and backslashes in client root.

Hi, I've had a problem with saving files with your plugin, because my p4 info returns:

Client root: c:/path
Current directory: c:\path\to\branch

I made a quick workaround with 6207c38 but hopefully something nicer could be done.

setup steps I'm missing?

I'm sure this is just user error on my part, since I'm using Perforce for the first time (in a contracting situation) and haven't gotten familiar enough yet, but:

I installed this plugin in ST2/OSX via the Sublime package manager, and I've created an ST2 project based on the root folder of my Perforce-managed codebase, and auto-checkout doesn't seem to be working. I open, edit, and save files, and expect them to show up in my default changelist the next time I look at the P4 app. Do I need to do something more to tell the plugin where my client root is, or am I misunderstanding the feature, or something else that's pretty obvious to the author/maintainers? Thanks.

Use p4 tickets instead of raw login.

Some p4 servers with high security settings doesn't allow to use P4PASSWD. To workaround this problem, you should request a login ticket via p4 login -a -p command and use this ticket for other commands. Could you please implement this feature.

recent update seems to have broke the p4config settings

After a recent update (at least on mac) I keep getting the "file(s) not on client" error.
looks like the way the plugin picks up p4config settings has changed again ... p4v and p4 CLI still work fine however.

Sublime Text: v 2.0.1, Build 2217
Perforce Plugin Version: 1.0.14
$ p4 -V
Rev. P4/DARWIN90X86_64/2013.1/610569 (2013/03/19).

anyone else having this problem?

Invoking Perforce (graphical) diff on a new thread is broken

On Windows XP SP3, with ST2 Build 2195, Perforce integration 1.0.13, this is the error that I see. Please note that there was no issue with graphical diff earlier.

Perforce: Launching thread for Graphical Diff
Exception in thread Thread-28:
Traceback (most recent call last):
File ".\threading.py", line 532, in __bootstrap_inner
File ".\Perforce.py", line 483, in run
File ".\Perforce.py", line 231, in PerforceCommandOnFile
File ".\Perforce.py", line 55, in ConstructCommand
File ".\Perforce.py", line 60, in getPerforceConfigFromPreferences
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

I wish I knew Python so I could help code-wise, but I am more into JS and Perl

No indication that session has timed out.

Great Plugin.

As far as I can tell, if the user session connected to perforce server times out (in my case 12 hours without use), there is nothing to indicate to the use this has happened.

In this case I can open and save files but the perforce plugin will not check them out of perforce, until I login again.

Some indication that the session has logged out and a request to login again would be great.

I use sublime 3

on windows, if launched from cmd, subprocess calls fail

if you launch sublime from a command prompt, python subprocess calls fail thusly:

Exception in thread Thread-3:
Traceback (most recent call last):
File ".\threading.py", line 532, in bootstrap_inner
File ".\Perforce.py", line 688, in run
File ".\Perforce.py", line 665, in MakeCheckedOutFileList
File ".\Perforce.py", line 639, in MakeFileListFromChangelist
File ".\Perforce.py", line 91, in GetUserFromClientspec
File ".\subprocess.py", line 626, in __init

File ".\subprocess.py", line 734, in _get_handles
File ".\subprocess.py", line 773, in _make_inheritable
WindowsError: [Error 6] The handle is invalid

it looks like a python/windows interop issue that you get a handle from cmd that suprocess tries to duphandle and fails.

if you provide pipes (or devnull) for all three of stdin/stdout/stderr, this should go away.

plugin reports error while saving new files in directories where p4 isn't configured

I have a mix of separate perforce and git directories (and some not under source control).

The perforce plugin however displays an error modal whenever saving a new file outside of a p4 clientspec directory:

  • "Perforce Plugin: p4 info didn't supply a valid clientspec, launching p4 client."

This happens because the script running p4 info finds this:
Client unknown
instead of this:
Client root: <dir>

Ordinarily this would be an error condition, however in the case of automatic mark for add, it should be handled silently, as this may also be a git or uncontrolled directory.

I checked to see if there were options to select which dirs the plugin could be either enabled/disabled for (an alternative solution), but couldn't find any?

In general, you may wish to disable the plugin functionality if p4 clientspec isn't setup properly in a directory.

Improved setup instructions

The plugin imports ~/bash_profile on OS X to get environment variables like $PATH (that point to the p4 tool) and environment variables like $P4USER, $P4PASSWD, and $P4CLIENT. If the preceding are not setup incorrectly then most commands will fail with "not in client root" warnings.

It would be good to have some setup instructions here that cover this and other environmental issues when installing the plugin for the first time.

documentation missing

I install the plugin for ST3 and the link for the documentation is not working.
Can you please upload the documentation file so I will know how to use the plugin?

Thank you

Error in p4 submit with ST3

Hi Eric,

While trying to submit a file, I got the following error message:

Exception in thread Thread-4:
Traceback (most recent call last):
File "X/threading.py", line 639, in _bootstrap_inner
File "Perforce in /Users/somorjai/Library/Application Support/Sublime Text 3/Installed Packages/Perforce.sublime-package", line 921, in run
File "Perforce in /Users/somorjai/Library/Application Support/Sublime Text 3/Installed Packages/Perforce.sublime-package", line 894, in MakeChangelistsList
File "Perforce in /Users/somorjai/Library/Application Support/Sublime Text 3/Installed Packages/Perforce.sublime-package", line 164, in GetPendingChangelists
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 3384: invalid continuation byte

I'm using the OSX ST3 build 3052.

Any ideas?

Thanks, Akos

Assumption that /bin/sh -> bash

When constructing commands it is assumed that the shell that will execute them is bash. In particular I mean using 'source' command instead of '.'. On ubuntu /bin/sh points to dash and soursing environment file does not work.

Feature: project-specific p4 configuration

I have many different projects, each one having a different client and many of them operating on different servers. It would be extremely helpful to have the user setup defined the defaults (username, common server, common port, etc) and allow the projects to override them.

Causes 20-30 sec delay saving files when p4 server unavailable

When I use Sublime Text 2 with the Perforce plugin on my laptop at work, the connection seems fine and there is no noticeable lag. However, when I open the same project at home, saving files causes a 20 to 30 second delay for every file, regardless if its actually in a perforce project or not.

GetPendingChangelists should limit to current user

I recently discovered sublime text and I'm loving it so far
I just downloaded the perforce plugin and it seems excellently executed.. The one thing i had to modify in Perforce.py immediately was the GetPendingChangelists function
I work in a multi-user environment and i didn't want it listing changes which i didn't own.
modified it to

command = 'p4 changes -s pending -u myUserName'

Thanks for the great plugin.

checkout files in root folder

If files are in the root directory of the client it doesnt think these files are in the client workspace.

I have a very flat development line and here is my example:

Client main:
-file1
-folder1
|---- file2
|---- file3

File 2 and 3 are fine to checkout and all sub directories are but the file1 doesn't checkout as it thinks it not in that client.

Path & Workspace

From Issue 7:

Still a issue, though it looks like a different cause:

For my list of opened files, i have :
t:/>p4 opened
//Demo/trunk/a.xml#40 - edit default change (text)
//Demo/trunk/editor.js#1 - add default change (text)

but the path that Sublime text Perforce plugin parse is:
/Users/abc/Documents/workspace/trunk/a.xml

It skips the first dir, just after '//'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.