Jump to content

Command Line Scripting Problems


carpediemevive

Recommended Posts

I'm attempting to re-import the latest state from my CVS server into my existing Plastic setup. Right now, all I'm really attempting is to create a workspace that's tied to the correct repository. I've done this before, and I attempted to re-hash that script but that isn't working. I looked through documentation (http://www.plasticscm.com/infocenter/quick-start/command-line-cheat-sheet.aspx) and searched the forum but the commands just won't work. Here's what I'm typing:

C:\cvs_reimport\plastic_workspaces>cm mkwk cvs_reporting_views reporting_views
Can't load the root item. The workspace selector probably contains errors.


C:\cvs_reimport\plastic_workspaces>cd reporting_views

C:\cvs_reimport\plastic_workspaces\reporting_views>cm stb /main@reporting_views
Error: unexpected token: ["",<1>,line=1,col=1]

C:\cvs_reimport\plastic_workspaces\reporting_views>cm stb /main@reporting_views@source-code:8087
Error: unexpected token: ["",<1>,line=1,col=1]

I checked in the log file ("C:\Program Files\PlasticSCM4\client") and while there are plenty of log files, it doesn't appear that the command line is logging there. I only have messages related to the GUI.

Link to comment
Share on other sites

It's not new, but it's stale. I imported this repository into Plastic during our initial conversion, and it hasn't been touched since. I created it with a command line script that basically checked the latest revision out of CVS, removed all the CVS control files, and then created the repository. I don't actually have the commands I used to create them, but it was really simplistic.

Link to comment
Share on other sites

Ok, let's do the following.

Inside your workspace created using the GUI there's a hidden folder called .plastic inside it you will find a file called "plastic.selector" copy it to the desktop, for example.

And now try to create a new wks using this command:

cm mkwk wktest Xlocation --selector=PathToTheFileCopied

Tell me if it works.

Link to comment
Share on other sites

1 default source-code:8087

2 AlrisService.Net source-code:8087

4 Bedding_Letters source-code:8087

5 Blu_ray_Promotion_2008 source-code:8087

6 bruins_2011_promo source-code:8087

7 bruins_2011_ticket_giveaway source-code:8087

8 CallCenterReportCard source-code:8087

9 CCM_NET source-code:8087

10 CCM_NET_v1_1 source-code:8087

11 ClearanceTag source-code:8087

12 Comfort_Air_Nightly_Export source-code:8087

13 create_settlement_file source-code:8087

14 Credit_Card_Logging source-code:8087

15 Credit_Processing source-code:8087

16 CustomDataGridView source-code:8087

17 customer_message_maker source-code:8087

18 Customer_Rewards source-code:8087

19 CustomImageControl source-code:8087

20 CustomListControl source-code:8087

Link to comment
Share on other sites

  • 1 month later...

I didn't have time to get back to this issue until a few days ago (after I had updated Plastic) and the issue went away. I've since been hammering away at a particular repository and have gotten it back into this state. I'm at mostly a loss as to what to do. I haven't gone back through all of our debugging steps above yet, but presumably they will turn out in the same fashion as before. Any ideas?

Link to comment
Share on other sites

I do believe I've figured it out. First, turning on logging for the command line was a huge help, so if anyone is running into problems, be sure to enable logging.

http://www.plasticscm.com/infocenter/technical-articles/kb-enabling-logging-for-plastic-scm-part-i.aspx

Looking in my log file I saw that it was get repository info not only on my main server, but I also have a secondary server used for one project (no replication or anything, just different authentication protocol), and it as was connecting to that secondary server to get the default repository on that. The default repository on that secondary system is fu-barred beyond repair. I really want to remove the thing, as the developers weren't even supposed to be using it. They didn't listen and now I'm stuck with it.

To work around this I've temporarily removed my profile connecting to the secondary server.

I do have one question though. Am I going to be able to remove the default repository on that server? Worst case, I could rename the default to something else and then create a new one named default and leave it empty.

For feedback I do have one suggestion. If you are going to rely on using the main branch on the default repository for creating new workspaces, could you perhaps move that dependency to a blank-slate repository that the user can't screw up? I'm envisioning a repository named something like "bare" and it just has the main branch and no one can edit it at all. That's the repository you use to do this stuff.

Link to comment
Share on other sites

Thanks for the feedback! let me test it! I wasn't aware of that behavior...

Regarding the default repository name, yes, you are totally able to do it. Just "F2" the "default" repository and give it a different name, you will need to adapt the selector to the new name.

Link to comment
Share on other sites

Hi Manu

FYI The instructions and config files to enable client/commandline logging at http://www.plasticsc...scm-part-i.aspx will not work for windows 7/vista as the logfiles are set to the program files directory which is not writable for unelevated users.

I changed the file name to (the directory where my databases are located):

 
<file value="${APPDATA}\PlasticSCM\cm.log.txt" />

<file value="${LOCALAPPDATA}\plastic4\cm.log.txt" />

can also be used (the directory created by plasticscm to contain conf files.

So the result is located outside

regards

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...