CVS list files in repository which are currently in checked out status

View: New views
17 Messages — Rating Filter:   Alert me  

CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Is there a command or a way or a tools/script to list the files which have been checked out from the repository , i.e. list files which are currently checked out by various users. Doing this is useful before doing a build

Regards,
Rupa

RE: CVS list files in repository which are currently in checked out status

by Risman, Mark :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rupa,

You can scan the history file to see what files have ever been checked
out, but that won't tell you whether the users still have those files
that were checked out. This is because there is no opposite, or end, of
a checkout command.

It's similar to looking at an .html web page which was looked at by a
web browser. You might have an access log on the web server that tells
when the user accessed that page, but you can't tell if they still have
it open. A CVS checkout is a bit like a download in that regard.

- Mark

-----Original Message-----
From: info-cvs-bounces+mark.risman=mlb.com@...
[mailto:info-cvs-bounces+mark.risman=mlb.com@...] On Behalf Of
RupaL
Sent: Monday, August 17, 2009 2:12 AM
To: Info-cvs@...
Subject: CVS list files in repository which are currently in checked out
status


Hi,
Is there a command or a way or a tools/script to list the files which
have
been checked out from the repository , i.e. list files which are
currently
checked out by various users. Doing this is useful before doing a build

Regards,
Rupa
--
View this message in context:
http://www.nabble.com/CVS-list-files-in-repository-which-are-currently-i
n-checked-out-status-tp25001494p25001494.html
Sent from the Gnu - Cvs - Info mailing list archive at Nabble.com.








**********************************************************

MLB.com: Where Baseball is Always On




Re: CVS list files in repository which are currently in checked out status

by Todd Denniston-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Risman, Mark wrote, On 08/18/2009 11:05 AM:
> Rupa,
>
> You can scan the history file to see what files have ever been checked
> out, but that won't tell you whether the users still have those files
> that were checked out. This is because there is no opposite, or end, of
> a checkout command.
>

Not _quite_ true.
Although you don't have to, and I most times don't, there is the cvs command:
  `cvs release  oldtree`
  (or if you like getting rid of the tree if there are no _CVS_ _detectable_ differences between
sandbox and tree...)
  `cvs release  -d oldtree`
which a user might use instead of `rm -r oldtree`.

the manual indicates that:
"
This command is meant to safely cancel the effect of ‘cvs checkout’. ...
This command checks that no uncommitted changes are present; that you are executing it from
immediately above a CVS working directory; and that the repository recorded for your files is the
same as the repository defined in the module database.

If all these conditions are true, ‘cvs release’ leaves a record of its execution (attesting to your
intentionally abandoning your checkout) in the CVS history log.
"

just don't confuse it with cvs remove which has a QUITE different effect. (part of the reason I
don't use release often.)

> It's similar to looking at an .html web page which was looked at by a
> web browser. You might have an access log on the web server that tells
> when the user accessed that page, but you can't tell if they still have
> it open. A CVS checkout is a bit like a download in that regard.
>

I agree with this analogy in the normal use case, however it does not have to be.

> - Mark
>
> -----Original Message-----
> From: info-cvs-bounces+mark.risman=mlb.com@...
> [mailto:info-cvs-bounces+mark.risman=mlb.com@...] On Behalf Of
> RupaL
> Sent: Monday, August 17, 2009 2:12 AM
> To: Info-cvs@...
> Subject: CVS list files in repository which are currently in checked out
> status
>
>
> Hi,
> Is there a command or a way or a tools/script to list the files which
> have
> been checked out from the repository , i.e. list files which are
> currently
> checked out by various users. Doing this is useful before doing a build
>
> Regards,
> Rupa


--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter



RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thank you.
The command indicated - `cvs release  -d oldtree` needs to be fired from the working copy? Is there any command which can be executed from the CVS Server itself to check which are the files which are currently checked out by users?

Regards,
Rupa

-----Original Message-----
From: Todd Denniston [mailto:Todd.Denniston@...]
Sent: Wednesday, August 19, 2009 4:41 AM
To: Risman, Mark
Cc: Rupa Bholanath Lahiri; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

Risman, Mark wrote, On 08/18/2009 11:05 AM:
> Rupa,
>
> You can scan the history file to see what files have ever been checked
> out, but that won't tell you whether the users still have those files
> that were checked out. This is because there is no opposite, or end, of
> a checkout command.
>

Not _quite_ true.
Although you don't have to, and I most times don't, there is the cvs command:
  `cvs release  oldtree`
  (or if you like getting rid of the tree if there are no _CVS_ _detectable_ differences between
sandbox and tree...)
  `cvs release  -d oldtree`
which a user might use instead of `rm -r oldtree`.

the manual indicates that:
"
This command is meant to safely cancel the effect of 'cvs checkout'. ...
This command checks that no uncommitted changes are present; that you are executing it from
immediately above a CVS working directory; and that the repository recorded for your files is the
same as the repository defined in the module database.

If all these conditions are true, 'cvs release' leaves a record of its execution (attesting to your
intentionally abandoning your checkout) in the CVS history log.
"

just don't confuse it with cvs remove which has a QUITE different effect. (part of the reason I
don't use release often.)

> It's similar to looking at an .html web page which was looked at by a
> web browser. You might have an access log on the web server that tells
> when the user accessed that page, but you can't tell if they still have
> it open. A CVS checkout is a bit like a download in that regard.
>

I agree with this analogy in the normal use case, however it does not have to be.

> - Mark
>
> -----Original Message-----
> From: info-cvs-bounces+mark.risman=mlb.com@...
> [mailto:info-cvs-bounces+mark.risman=mlb.com@...] On Behalf Of
> RupaL
> Sent: Monday, August 17, 2009 2:12 AM
> To: Info-cvs@...
> Subject: CVS list files in repository which are currently in checked out
> status
>
>
> Hi,
> Is there a command or a way or a tools/script to list the files which
> have
> been checked out from the repository , i.e. list files which are
> currently
> checked out by various users. Doing this is useful before doing a build
>
> Regards,
> Rupa


--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter



Re: CVS list files in repository which are currently in checked out status

by Mark D. Baushke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rupa Bholanath Lahiri <RupaB_Lahiri@...> writes:

> The command indicated - `cvs release -d oldtree` needs to be fired
> from the working copy?

Yes.

> Is there any command which can be executed from the CVS Server itself
> to check which are the files which are currently checked out by users?

No.

        -- Mark


attachment0 (192 bytes) Download Attachment

RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Please correct me if I am wrong, does this command list out the files which are locked (file locking or reserved checkouts) to allow only one person to edit the file at a time.

Regards,
Rupa

-----Original Message-----
From: mdb@... [mailto:mdb@...] On Behalf Of Mark D. Baushke
Sent: Wednesday, August 26, 2009 9:10 PM
To: Rupa Bholanath Lahiri
Cc: Todd Denniston; Risman, Mark; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

Rupa Bholanath Lahiri <RupaB_Lahiri@...> writes:

> The command indicated - `cvs release -d oldtree` needs to be fired
> from the working copy?

Yes.

> Is there any command which can be executed from the CVS Server itself
> to check which are the files which are currently checked out by users?

No.

        -- Mark



Parent Message unknown RE: CVS list files in repository which are currently in checked out status

by Arthur Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rupa,

> Please correct me if I am wrong, does this command list out
> the files which are locked (file locking or reserved
> checkouts) to allow only one person to edit the file at a time.

CVS does not support workflows with a requirement for reserved edits.
If you have a real business reason that requires a SCCM process that in
turn requires reserved edits then try a tool that does support it, like
CVSNT (Free/GPL just like CVS) or ClearCase.

Note: CVS does have a 'lock' command - but it is administrative, not
part of the non-privileged user workflow.

Regards,


Arthur Barrett





Re: CVS list files in repository which are currently in checked out status

by Mark D. Baushke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rupa,

Rupa Bholanath Lahiri <RupaB_Lahiri@...> writes:

> Please correct me if I am wrong, does this command list out the files
> which are locked (file locking or reserved checkouts) to allow only
> one person to edit the file at a time.

A 'cvs release' command will automagically unlock files on which you
have performed a 'cvs edit filename' operation. It will not print out
such files unless they have been modified in your working copy.

A 'cvs release' command will print out a list of modified files in your
along with a number:

$ cvs release -d mod
M foo.txt
You have [1] altered files in this repository.
Are you sure you want to release (and delete) directory `mod':

If you say 'no', then you will get a message like

    ** `release' aborted by user choice.

and the module will not be released. If you say 'yes', then the module
will be released. The -d option will remove the local copy of the files
for you in addition to possibly updating the history file and sending
any notifications of edits you have released to any watchers of the
files you have edited.

        -- Mark



attachment0 (192 bytes) Download Attachment

RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thank you all for your patience.
Now I would like to specify here after digging further and further that I need to list out the files which have being reserved check out / locked by any user.

Regards,
Rupa

-----Original Message-----
From: mdb@... [mailto:mdb@...] On Behalf Of Mark D. Baushke
Sent: Thursday, August 27, 2009 8:13 PM
To: Rupa Bholanath Lahiri
Cc: Risman, Mark; Todd Denniston; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

Hi Rupa,

Rupa Bholanath Lahiri <RupaB_Lahiri@...> writes:

> Please correct me if I am wrong, does this command list out the files
> which are locked (file locking or reserved checkouts) to allow only
> one person to edit the file at a time.

A 'cvs release' command will automagically unlock files on which you have performed a 'cvs edit filename' operation. It will not print out such files unless they have been modified in your working copy.

A 'cvs release' command will print out a list of modified files in your along with a number:

$ cvs release -d mod
M foo.txt
You have [1] altered files in this repository.
Are you sure you want to release (and delete) directory `mod':

If you say 'no', then you will get a message like

    ** `release' aborted by user choice.

and the module will not be released. If you say 'yes', then the module will be released. The -d option will remove the local copy of the files for you in addition to possibly updating the history file and sending any notifications of edits you have released to any watchers of the files you have edited.

        -- Mark




RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thank you very much.
I am much clearer now.
I thought any user can lock files as we do in Subversion (I am familiar with Subversion but I had kind of a query for CVS from a team which needed me to be clear on this)

Regards,
Rupa


-----Original Message-----
From: Arthur Barrett [mailto:arthur.barrett@...]
Sent: Thursday, August 27, 2009 5:22 PM
To: Rupa Bholanath Lahiri; Mark D. Baushke
Cc: Risman, Mark; Todd Denniston; Info-cvs@...
Subject: RE: CVS list files in repository which are currently in checked out status

Rupa,

> Please correct me if I am wrong, does this command list out
> the files which are locked (file locking or reserved
> checkouts) to allow only one person to edit the file at a time.

CVS does not support workflows with a requirement for reserved edits.
If you have a real business reason that requires a SCCM process that in
turn requires reserved edits then try a tool that does support it, like
CVSNT (Free/GPL just like CVS) or ClearCase.

Note: CVS does have a 'lock' command - but it is administrative, not
part of the non-privileged user workflow.

Regards,


Arthur Barrett





Parent Message unknown RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Will the edit command work only after the watch command?
i.e. is this something like when one starts watching files, and to modify the files I am watching, I will need to fire the edit command first?

Regards,
Rupa

-----Original Message-----
From: mdb@... [mailto:mdb@...] On Behalf Of Mark D. Baushke
Sent: Friday, August 28, 2009 8:55 AM
To: Rupa Bholanath Lahiri
Cc: Risman, Mark; Todd Denniston; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Rupa,

Rupa Bholanath Lahiri <RupaB_Lahiri@...> wrote:

> Now I would like to specify here after digging further and further
> that I need to list out the files which have being reserved check out
> / locked by any user.

There is no concept of a reserved checkout in CVS (such as there is in
RCS and some other SCM systems).

If you mean you want to find out which files have had a 'cvs edit'
advisory lock put on them, then you want to use the 'cvs editors'
command to get that list of files. The output will include the relative
path in the current sandbox to such a file as well as the user, the date
of the edit the hostname and the pathname of the file which was actually
locked.

You will need to do that command in a checked out tree.

        Enjoy!
        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFKl037Cg7APGsDnFERAgb8AJ48xcB1ofbkfeesuY1tF5hk1uTJhwCgkvbI
zNz9x/oi/3lyHuDHgOKAuW8=
=4v/p
-----END PGP SIGNATURE-----

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



Parent Message unknown RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you.

Regards,
Rupa

-----Original Message-----
From: mdb@... [mailto:mdb@...] On Behalf Of Mark D. Baushke
Sent: Friday, August 28, 2009 12:27 PM
To: Rupa Bholanath Lahiri
Cc: Risman, Mark; Todd Denniston; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rupa Bholanath Lahiri <RupaB_Lahiri@...> wrote:

> Will the edit command work only after the watch command?

No. They both use the Notify mechanism, but are not directly related to
each other.

> i.e. is this something like when one starts watching files, and to
> modify the files I am watching, I will need to fire the edit command
> first?

No.

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFKl3/XCg7APGsDnFERAqHKAKDmXvU9QzZ2y310yB7zlqxIhVMX9ACgppf6
2E2ANu4Lrp8RqoU1wypljwE=
=1p1l
-----END PGP SIGNATURE-----

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***



Parent Message unknown RE: CVS list files in repository which are currently in checked out status

by Arthur Barrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Rupa,

> I thought any user can lock files as we do in Subversion
> (I am familiar with Subversion but I had kind of a query for
> CVS from a team which needed me to be clear on this)

Subversion does not provide support for a reserved versioning model, as explained in the svnbook for SVN 1.5:
http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.advanced.locking

"users to break each other's locks over the network. To do this, Sally simply needs to pass the --force to the svn unlock command"

If any user can unlock any file then the lock is purely advisory, or rather: not a lock at all but a watch (actually the Subversion programmers clearly used the CVSNT 'co-operative lock' mechanism as a template for implementing their lock, not the 'reserved' lock mechanism).  

Ie: subversion behaves just like CVS, which is understandable because their design goal was to rewrite CVS.

ie: svn lock is equivalent (in business function) to cvs edit, it ADVISES other people that you are working on the file.

CVS, SVN, Git etc do not support workflows with a requirement for reserved edits.  If you have a real business reason that requires a SCCM process that in turn requires reserved edits then try a tool that does support it, like CVSNT (Free/GPL just like CVS) or ClearCase.

Note: CVS does have a 'lock' command - but it is administrative, not part of the non-privileged user workflow.

Regards,


Arthur Barrett






RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thank you very much.
I have communicated this to my team now.
What I will need to do now is to get all modified files in all working copies.
Is there a command in CVS to get all working copies?

Regards,
Rupa

-----Original Message-----
From: Arthur Barrett [mailto:arthur.barrett@...]
Sent: Saturday, August 29, 2009 10:26 AM
To: Rupa Bholanath Lahiri; Mark D. Baushke
Cc: Risman, Mark; Todd Denniston; Info-cvs@...
Subject: RE: CVS list files in repository which are currently in checked out status

Hi Rupa,

> I thought any user can lock files as we do in Subversion
> (I am familiar with Subversion but I had kind of a query for
> CVS from a team which needed me to be clear on this)

Subversion does not provide support for a reserved versioning model, as explained in the svnbook for SVN 1.5:
http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.advanced.locking

"users to break each other's locks over the network. To do this, Sally simply needs to pass the --force to the svn unlock command"

If any user can unlock any file then the lock is purely advisory, or rather: not a lock at all but a watch (actually the Subversion programmers clearly used the CVSNT 'co-operative lock' mechanism as a template for implementing their lock, not the 'reserved' lock mechanism).  

Ie: subversion behaves just like CVS, which is understandable because their design goal was to rewrite CVS.

ie: svn lock is equivalent (in business function) to cvs edit, it ADVISES other people that you are working on the file.

CVS, SVN, Git etc do not support workflows with a requirement for reserved edits.  If you have a real business reason that requires a SCCM process that in turn requires reserved edits then try a tool that does support it, like CVSNT (Free/GPL just like CVS) or ClearCase.

Note: CVS does have a 'lock' command - but it is administrative, not part of the non-privileged user workflow.

Regards,


Arthur Barrett






Re: CVS list files in repository which are currently in checked out status

by Mark D. Baushke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rupa Bholanath Lahiri <RupaB_Lahiri@...> writes:

> Is there a command in CVS to get all working copies?

No.

        -- Mark


attachment0 (192 bytes) Download Attachment

RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On a Unix box, through any command can we identify which are all the folders being used as working copy?

Regards,
Rupa

-----Original Message-----
From: mdb@... [mailto:mdb@...] On Behalf Of Mark D. Baushke
Sent: Monday, August 31, 2009 11:37 AM
To: Rupa Bholanath Lahiri
Cc: Arthur Barrett; Mark Risman; Todd Denniston; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

Rupa Bholanath Lahiri <RupaB_Lahiri@...> writes:

> Is there a command in CVS to get all working copies?

No.

        -- Mark



Parent Message unknown RE: CVS list files in repository which are currently in checked out status

by RupaL :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your valuable inputs.

Regards,
Rupa

-----Original Message-----
From: mdb@... [mailto:mdb@...] On Behalf Of Mark D. Baushke
Sent: Monday, August 31, 2009 1:18 PM
To: Rupa Bholanath Lahiri
Cc: Arthur Barrett; Mark Risman; Todd Denniston; Info-cvs@...
Subject: Re: CVS list files in repository which are currently in checked out status

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rupa Bholanath Lahiri <RupaB_Lahiri@...> wrote:

> On a Unix box, through any command can we identify which are all the
> folders being used as working copy?

Assuming edit commands have been done, checking out your own tree and
doing a 'cvs editors' should give you a hint about the path of such a
checkout on a given machine. Of course, if you are using some kind of
NetApp or clustered file system, it is possible that you will find many
of the repositories that have been checked out into the working copy at
one time or other and not been deleted.

If you are able to afford the time to run a 'find' command across all of
your diskspace, then something which looks for the CVS/Root file in the
filesystems you hae avaialable would let you try running 'cvs editors'
commands on each filesystem.

The things to consider is that files and directories on checkout might
be movied or copied or cloned. There is no easy way to determine if a
mount point is consistent across reboots... all of which makes it
problematic to be absolutely certain you will be able to identify the
set of all working copies which have been created for a given set of
checked out modules.

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFKm4AWCg7APGsDnFERArUOAJ9kDvc/HHCcCZe9Aijzx+bD+mTUWwCg86sC
TTKr4egg6Defj2Tq7gbNrV0=
=gDbg
-----END PGP SIGNATURE-----