mattsawyer77 / atom-perforce

Perforce integration for the Atom editor
MIT License
18 stars 12 forks source link

p4 edit file again if the file has been submitted #59

Open unional opened 8 years ago

unional commented 8 years ago

For auto-edit feature.

Currently file cannot be saved because p4 make the file read only after submit. atom-perforce should detect that and edit the file again.

PhiLhoSoft commented 8 years ago

Ah, that explains the errors I get after submitting a CL! I have then to use P4V to check out the file. :unamused:

unional commented 8 years ago

Currently a workaround for this issue is close all files after you submit. When a file is opened, fstat will be called and trigger listening to onDidChange again... at least according to how I understand the code. Will update if that is not the case.

mattsawyer77 commented 8 years ago

@PhiLhoSoft @unional Or can't you also just use the p4 edit command (should work regardless of whether auto edit is enabled)?

unional commented 8 years ago

Yes. I also do manual p4 edit when that happens.

PhiLhoSoft commented 8 years ago

@unional Good trick, I will close all tabs after a commit. Sane in Atom anyway, as the number of tabs tends to grow unweildy. @mattsawyer77 Yes, I do the equivalence of p4 edit in P4V, but then we loose the interest of the package, no? Or do you mean we can do this command manually with your package? Ah, yes, more convenient, at least.

mattsawyer77 commented 8 years ago

@PhiLhoSoft I meant the p4 edit command that this package provides in Atom's command palette.

unional commented 8 years ago

@mattsawyer77 I created a gitter chat room. We can discuss about how to make changes to the project there. I don't want to do any refactoring without first talking to you. :rose: