2

While at home for personal projects i use Mercurial, at work we're using ClearCase.

I am attempting to run a few horizontal (touching lots of source files) refactorings in Visual Studio for the code base, however, for since each file is locked by ClearCase, it has to be unlocked and prompts for the actual activity that the check out is for.

In Mercurial, there's no such concept as far as i'm aware of: files are not being locked at all at any point of time!

Is there a way of doing such a refactoring, or any other operation that acts on multiple files, without having to check out each and every one manually?

lysergic-acid
  • 19,570
  • 21
  • 109
  • 218
  • Ask to upgrade to a better VCS is your best bet in the long term. In the short term, you may be able to unlock all the files, and deal with the fallout on checkin. For clearcase remote client (CCRC), a checked out vs not file is just the OS read-only flag.. make all your files read/write... then later on check in the ones that changed. – bwawok May 23 '11 at 19:13

1 Answers1

2

In a DVCS (distributed VCS like Git or Mercurial), you simply cannot "lock" a file, since all the other repos wouldn't be aware of such a "status".

But with ClearCase and its locking mechanism (optimist with "unreserved checkout" or pessimist with "reserved checkout"), you need to make a checkout to tell ClearCase you will modify some files.

However, you could also, for large refactoring:

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250