Jump to content

CLI Usage - Problems with commands


aw

Recommended Posts

Hi there,

Just running through some usecase scenario's on the command line - I develop on linux a fair bit (and through ssh more often than not).

One issue I've come across is the checkin command, it seems that it could be a bit smarter.

Aside from some issue with piping file lists into checkin where neither 'cm findchanged | cm checkin' or 'cm findcheckouts --format={4} | cm checkin' appear to work (I've send a request to the support guys for this one) I've also noticed that some command lines that seem like they should work in a fairly intuitive manor are not very useful:

Say that I have already done these two steps on a fully up-to-date tree:

> cm co fileA.txt

> edit fileA.txt

Now I want to check in my changes, Ideally I'd like to do this in one fairly short command, bit I find that none of the suggested command lines in the documentation work:

> cm ci .

The selected items are about to be checked in. Please wait ...

Data can only be saved for a checked out revision.

> cm ci *

The selected items are about to be checked in. Please wait ...

Data can only be saved for a checked out revision.

Now all I can presume is that as some of the files in that directory are not marked for edit, the system throws me an error, instead of checking in the files it knows about, or resulting in a diff operation and working out which files have changed 'the long way'.

The only way that I can get anything to work is to specify the file name directly, which seems a little tiresome and something of a deal breaker for me.

> cm ci fileA.txt

The selected items are about to be checked in. Please wait ...

Checking in /home/alex/##############/fileA.txt ... Done

Created changeset

cs:12@br:/main@rep:d#######################8084

Am I missing something obvious here?

I'm going to try the same thing in a little while with the 'check out as read-only' thing turned off, perhaps this will work better and always run a diff or something for check-in.

Regards,

Alex

Link to comment
Share on other sites

Aside from some issue with piping file lists into checkin where neither 'cm findchanged | cm checkin' or 'cm findcheckouts --format={4} | cm checkin' appear to work (I've send a request to the support guys for this one)

You are missing the '-' after the checkin command' date=' so that it uses the standard input. This is standard and described in the docs:

cm fco --format={4} | cm ci -

I've also noticed that some command lines that seem like they should work in a fairly intuitive manor are not very useful:

Say that I have already done these two steps on a fully up-to-date tree:

> cm co fileA.txt

> edit fileA.txt

Now I want to check in my changes, Ideally I'd like to do this in one fairly short command, bit I find that none of the suggested command lines in the documentation work:

> cm ci .

The selected items are about to be checked in. Please wait ...

Data can only be saved for a checked out revision.

> cm ci *

The selected items are about to be checked in. Please wait ...

Data can only be saved for a checked out revision.

Now all I can presume is that as some of the files in that directory are not marked for edit, the system throws me an error, instead of checking in the files it knows about, or resulting in a diff operation and working out which files have changed 'the long way'.

The only way that I can get anything to work is to specify the file name directly, which seems a little tiresome and something of a deal breaker for me.

> cm ci fileA.txt

The selected items are about to be checked in. Please wait ...

Checking in /home/alex/##############/fileA.txt ... Done

Created changeset

cs:12@br:/main@rep:d#######################8084

Am I missing something obvious here?

I'm going to try the same thing in a little while with the 'check out as read-only' thing turned off, perhaps this will work better and always run a diff or something for check-in.

The check in command checks in an item only if it's modified or checked out, the read-only setting only says if the readonly bit is set or not when checking in.

Link to comment
Share on other sites

The check in command checks in an item only if it's modified or checked out, the read-only setting only says if the readonly bit is set or not when checking in.

I realise that, but my point is that the 'example' command in the 'cm' built in help "cm ci ." seems to be completely useless unless you happen to have checked out *every* file in the directory, if there are any files that are not checked out you just get the message "Data can only be saved for a checked out revision." and no commit occurs.

I would say that intuitively 'cm ci .' should work like you had done 'cm fco -format{4} | cm ci -' and check in all 'checked out' files in the current directory.

It took a bit too much detective work for a new user to find the 'pipe fco into ci' recipe.

Alex

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...