• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Locking in a CVS branch

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I read about CVS locks, by creating #cvs.lock file in the repository.
I wanted to know if there is a way to lock a release branch only, and have the HEAD in operation.
Regards
Aruneesh
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Aruneesh,
Try:
cvs adm -lBRANCH_NAME file_name
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to try this on the branch, so that for a while the branch is locked.

What would be the way to unclock the branch.

By the way, the cvs -adm ...., can this be applied to module instead of going file by file.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CVS doesn't lock files against concurrent editing the way systems like PVCS does. I believe that the cvs lockfile is used merely for the purpose of ensuring that when you pull updates, you don't get data from an update that someone else is actively checking into cvs.

If two people edit the same file at the same time and it was checked out of CVS, a conflict will be indicated when the second user attempts to check his/her updates in after the first user checked in updates. The second user must then perform a merge operation to resolve the conflicts before beling allowed to check in.

The reason that CVS doesn't permit you to lock files against being updated is because CVS was designed to be used in a widely-distributed environment where users worked in on differing schedules and might drop work on a project altogether without notice.
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim,
You misunderstood my question/query.
I want to lock a branch (a release branch) from code being checked into.

But developers, should be able to checkin code in the HEAD.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry.

I don't think you can seal off a branch like that, though out of the box. CVS is predicated on not having a single master administrator who can dictate what others can or cannot do. Other than simply limiting who can commit at all, so bad guys can't come in and pollute.

You might be able to create/find a filter that rejects commits and tie it to some sort of database, though.
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Aruneesh Salhotra:
Tim,
You misunderstood my question/query.
I want to lock a branch (a release branch) from code being checked into.

But developers, should be able to checkin code in the HEAD.


We delete all the files from the tip of the branch. This prevents accidental releases to it. After that, it is the honor system. If someone releases code to the branch again, you can just see which id did it.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic