info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Committing and breaking locks


From: Christian Kasper
Subject: Committing and breaking locks
Date: Tue, 24 Jul 2001 10:35:00 +0200

Hi!

1) My first problem is about commiting a file and other revisions are
locked by me, too! To suppress the error-message "multiple revision
locked by..." I try to change the function findlock_or_tip in rcs.c
which is called only in RCS_checkin in the case "rev == NULL || *rev
=='\0' ". Is this case only called when the commited version is the
head-revision? I don't find any other cases, so I can try to change
findlock_or_tip to a function which find the head revision. Is this
right?

2)If a user has locked two revisions and now commiting one without
running in case 1). After commiting, the lock will detached by deleting
him from a list (delnode)(RCS_checkin)[if the user is alright]. 
Then in checkin.c(Checkin) we do an extra unlock, altough we don't know
which one! If the first unlock has success, this unlock will break the
second lock, because this one is the only one and no error about
"multiple locking" will take place.


  /* When checking in a specific revision, we may have locked the wrong
   * branch, so to be sure, we do an extra unlock here before
   * returning.
   */
  if (rev)
  {      
      (void) RCS_unlock (finfo->rcs, NULL, 1);
      RCS_rewrite (finfo->rcs, NULL, NULL);
  }

In which cases this unlock is reasonable and why is the second lock be
break?

Can you help me?

Thanks

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]