? .git
Index: includes/VersioncontrolRepository.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/versioncontrol/includes/VersioncontrolRepository.php,v
retrieving revision 1.9
diff -u -p -r1.9 VersioncontrolRepository.php
--- includes/VersioncontrolRepository.php	22 Oct 2010 15:55:21 -0000	1.9
+++ includes/VersioncontrolRepository.php	22 Oct 2010 21:03:45 -0000
@@ -758,4 +758,25 @@ class VersioncontrolRepositoryUrlHandler
   public function getTrackerUrl($issue_id) {
     return strtr($this->urls['tracker'], array('%d' => $issue_id));
   }
+
+  /**
+   * Acquire a lock on data for this repository.
+   *
+   * @param   float
+   *   The number of seconds this lock should persist before being cleared.
+   *
+   * @return  boolean
+   *   Whether the lock was successfully acquired or not.
+   */
+  public function acquireLock($time = 60) {
+    return lock_acquire('versioncontrol_' . $this->name . '_lock', $time);
+  }
+
+  /**
+   * Release a previously acquired lock on this repository.
+   */
+  public function releaseLock() {
+    lock_release('versioncontrol_' . $this->name . '_lock', $time);
+  }
+
 }
