Discussion:
CVS list files in repository which are currently in checked out status
RupaL
2009-08-17 06:11:36 UTC
Permalink
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-in-checked-out-status-tp25001494p25001494.html
Sent from the Gnu - Cvs - Info mailing list archive at Nabble.com.
Risman, Mark
2009-08-18 15:05:04 UTC
Permalink
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=***@nongnu.org
[mailto:info-cvs-bounces+mark.risman=***@nongnu.org] On Behalf Of
RupaL
Sent: Monday, August 17, 2009 2:12 AM
To: Info-***@nongnu.org
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
Todd Denniston
2009-08-18 23:11:24 UTC
Permalink
Post by Risman, Mark
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.)
Post by Risman, Mark
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.
Post by Risman, Mark
- Mark
-----Original Message-----
RupaL
Sent: Monday, August 17, 2009 2:12 AM
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
Rupa Bholanath Lahiri
2009-08-19 03:44:13 UTC
Permalink
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:***@tsb.cranrdte.navy.mil]
Sent: Wednesday, August 19, 2009 4:41 AM
To: Risman, Mark
Cc: Rupa Bholanath Lahiri; Info-***@nongnu.org
Subject: Re: CVS list files in repository which are currently in checked out status
Post by Risman, Mark
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.)
Post by Risman, Mark
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.
Post by Risman, Mark
- Mark
-----Original Message-----
RupaL
Sent: Monday, August 17, 2009 2:12 AM
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
Mark D. Baushke
2009-08-26 15:39:45 UTC
Permalink
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
Rupa Bholanath Lahiri
2009-08-27 07:53:45 UTC
Permalink
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: ***@juniper.net [mailto:***@juniper.net] On Behalf Of Mark D. Baushke
Sent: Wednesday, August 26, 2009 9:10 PM
To: Rupa Bholanath Lahiri
Cc: Todd Denniston; Risman, Mark; Info-***@nongnu.org
Subject: Re: CVS list files in repository which are currently in checked out status
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
Mark D. Baushke
2009-08-27 14:42:34 UTC
Permalink
Hi Rupa,
Post by Rupa Bholanath Lahiri
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
Rupa Bholanath Lahiri
2009-08-28 03:06:13 UTC
Permalink
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: ***@juniper.net [mailto:***@juniper.net] On Behalf Of Mark D. Baushke
Sent: Thursday, August 27, 2009 8:13 PM
To: Rupa Bholanath Lahiri
Cc: Risman, Mark; Todd Denniston; Info-***@nongnu.org
Subject: Re: CVS list files in repository which are currently in checked out status

Hi Rupa,
Post by Rupa Bholanath Lahiri
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
Rupa Bholanath Lahiri
2009-08-28 04:57:52 UTC
Permalink
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: ***@morpheus.baushke.org [mailto:***@morpheus.baushke.org] On Behalf Of Mark D. Baushke
Sent: Friday, August 28, 2009 8:55 AM
To: Rupa Bholanath Lahiri
Cc: Risman, Mark; Todd Denniston; Info-***@nongnu.org
Subject: Re: CVS list files in repository which are currently in checked out status

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

Hi Rupa,
Post by Rupa Bholanath Lahiri
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***
Rupa Bholanath Lahiri
2009-08-28 11:33:03 UTC
Permalink
Thank you.

Regards,
Rupa

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

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Rupa Bholanath Lahiri
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.
Post by Rupa Bholanath Lahiri
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***
Arthur Barrett
2009-08-27 11:51:59 UTC
Permalink
Rupa,
Post by Rupa Bholanath Lahiri
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
Rupa Bholanath Lahiri
2009-08-28 04:33:20 UTC
Permalink
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:***@march-hare.com]
Sent: Thursday, August 27, 2009 5:22 PM
To: Rupa Bholanath Lahiri; Mark D. Baushke
Cc: Risman, Mark; Todd Denniston; Info-***@nongnu.org
Subject: RE: CVS list files in repository which are currently in checked out status

Rupa,
Post by Rupa Bholanath Lahiri
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
Arthur Barrett
2009-08-29 04:55:38 UTC
Permalink
Hi Rupa,
Post by Rupa Bholanath Lahiri
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
Rupa Bholanath Lahiri
2009-08-31 03:52:02 UTC
Permalink
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:***@march-hare.com]
Sent: Saturday, August 29, 2009 10:26 AM
To: Rupa Bholanath Lahiri; Mark D. Baushke
Cc: Risman, Mark; Todd Denniston; Info-***@nongnu.org
Subject: RE: CVS list files in repository which are currently in checked out status

Hi Rupa,
Post by Rupa Bholanath Lahiri
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
Mark D. Baushke
2009-08-31 06:06:36 UTC
Permalink
Post by Rupa Bholanath Lahiri
Is there a command in CVS to get all working copies?
No.

-- Mark
Rupa Bholanath Lahiri
2009-08-31 07:20:55 UTC
Permalink
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: ***@juniper.net [mailto:***@juniper.net] 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-***@nongnu.org
Subject: Re: CVS list files in repository which are currently in checked out status
Post by Rupa Bholanath Lahiri
Is there a command in CVS to get all working copies?
No.

-- Mark
Rupa Bholanath Lahiri
2009-08-31 08:55:35 UTC
Permalink
Thank you for your valuable inputs.

Regards,
Rupa

-----Original Message-----
From: ***@morpheus.baushke.org [mailto:***@morpheus.baushke.org] 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-***@nongnu.org
Subject: Re: CVS list files in repository which are currently in checked out status

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by Rupa Bholanath Lahiri
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

Loading...