Author Topic: Perforce checkout to changelist option  (Read 7276 times)

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Perforce checkout to changelist option
« on: April 25, 2013, 02:04:44 pm »
Win7 x64
For perforce my current site uses changelists to check in/out.  Using SE 18 to check out to perforce checks everything out to the default changelist.  That means I've got to go back to the P4 GUI and manually move everything to the right changelist which sort of defeats the point of having it built into the editor.  Ideally what I'd want is to have a list of open changelists pop up when I checkout/attempt to edit but I realize that's asking a lot.

When I wrote up my custom handler for perforce, though, I set up a pop-up with a field to take a changelist identifier and kept that saved as an environment variable.  It's not perfect by any means but it handles about 80% of my cases because I tend to keep working in the same changelist for awhile.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1814
  • Hero Points: 72
Re: Perforce checkout to changelist option
« Reply #1 on: April 25, 2013, 02:29:44 pm »
I'm trying to think what the best way to solve this is.

One possibility is that we could support a change list in the def_perforce_info variable that is used for everything SlickEdit does.

Another possibility is to see if there is an environment variable that Perforce supports for the "current" change list and SlickEdit could set it, but that could run into the same problem.

Do either of these sound like a good approach to you?

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #2 on: April 25, 2013, 02:45:44 pm »
I don't believe there's a "current" change list for checkouts.  I've currently got 3 opened up on the same folder (they all contain different files).  There might be some mechanism to retrieve it from p4 if the file is checked out already but I don't think it's needed for any operation once the file has been assigned to the changelist...

I think the former makes more sense (but that sounds like mine so that's probably testing bias... :) )

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1814
  • Hero Points: 72
Re: Perforce checkout to changelist option
« Reply #3 on: April 25, 2013, 03:01:12 pm »
I'm not sure if I can get this done before the second beta, but I will see what I can do.

I may leave it as a def variable.  It seems like it may be an advanced option.

If I just named a change list under the covers, "vschangelist", but anything that used change lists used it, that would solve the issue as well, correct?

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #4 on: April 25, 2013, 03:34:50 pm »
Quote
If I just named a change list under the covers, "vschangelist", but anything that used change lists used it, that would solve the issue as well, correct?

hmm... hadn't thought of that... I had assumed the changelist still had to be created in P4... let me try that and see what comes up...

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #5 on: April 25, 2013, 06:12:54 pm »
No joy -

You can't just do - p4 edit -c "mynewchangelist" filename with an uncreated changelist.  The changelist has to be one already created (or it automatically goes to "Default").  You can do the creation in the P4 gui or with "p4 change".  All changelists (except for "Default") are numbered and assigned sequentially as the system is used

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #6 on: April 27, 2013, 10:17:41 pm »
BTW, to clarify - I only save the changelist number as an environment variable so that SE remembers it for the next checkout attempt.  It's not used in anyway at all by perforce.

For the command line I'm just doing a p4 edit -c xxxx

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #7 on: June 12, 2013, 08:08:46 pm »
Testing this on Beta 7 and see it's still not there - Any plans to add this?  Is this something that's just custom to my site?

Tim Kemp

  • Senior Community Member
  • Posts: 511
  • Hero Points: 83
Re: Perforce checkout to changelist option
« Reply #8 on: June 13, 2013, 03:06:44 pm »
We use Perforce too. For me having the files get checked out into the default changelist works fine. I have SlickEdit setup to automatically check out any file I modify. When I'm reviewing the changes I've made I look in the default changelist and move files the appropriate numbered changelist. I use it as another chance to review my work.

I like being able to just start typing or pasting into a file without having to think about if the file is already checked out or which changelist I'm working on.

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1814
  • Hero Points: 72
Re: Perforce checkout to changelist option
« Reply #9 on: June 17, 2013, 01:01:31 pm »
Testing this on Beta 7 and see it's still not there - Any plans to add this?  Is this something that's just custom to my site?

I got sidetracked on other things (I had a couple of users where things simply didn't work).  I'm looking into this.  If it doesn't make the release I will still try to add it for the first maintenance release.

rdroaten

  • Community Member
  • Posts: 13
  • Hero Points: 0
Re: Perforce checkout to changelist option
« Reply #10 on: June 17, 2013, 01:10:59 pm »
Ditto on Tim's remarks.  If you add the ability to check out to a changelist, please implement in a manner that preserves the current behavior for those of us that prefer it.

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #11 on: June 17, 2013, 02:00:22 pm »
For the usecase I'm figuring there will be a separate pop-up to enter the changelist number for creating/modifying the changelist.

If you do add the feature and because some here prefer the current behavior (which I agree isn't bad if that was my workflow style) it might be cool to have an option in the configuration to bypass the pop-up altogether?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1814
  • Hero Points: 72
Re: Perforce checkout to changelist option
« Reply #12 on: June 17, 2013, 04:34:46 pm »
So when you did a checkout or submit, if you were prompted with a list of changelists, would that be good?

shadm

  • Community Member
  • Posts: 48
  • Hero Points: 0
Re: Perforce checkout to changelist option
« Reply #13 on: June 17, 2013, 05:00:18 pm »
I like the look of that option, but I don't see the default changelist.  Sometimes that is actually what I want.

If there were an option in the config to skip the dialog and when doing so, use the default changelist, I assume that would also allow folks that like it as it is now, to continue using it as they do now - but I'll let them speak for themselves.

Dan,
I've been using Perforce only for about a year, so I'm pretty new to it, but I appreciate all the work you've put into making it work well.

skywise

  • Senior Community Member
  • Posts: 332
  • Hero Points: 9
Re: Perforce checkout to changelist option
« Reply #14 on: June 17, 2013, 05:50:15 pm »
That'd be perfect Dan -

Could you CREATE a changelist through that interface as well (I'm not sure what's possible through the API you're going through).  (That's a minor request though...  I'll happily live with that as my general workflow now is to create the changelist through the P4 GUI and then proceed to edit files to the changelist as I go so that's about 90% of my workflow that this feature would cover)

(Per shadm's request, maybe have a "default" button (or entry) and have it set as the default selection so the user only has to hit enter once the pop-up is displayed?)