equal
deleted
inserted
replaced
388 for k, v in self._tagscache.tags.iteritems(): |
388 for k, v in self._tagscache.tags.iteritems(): |
389 try: |
389 try: |
390 # ignore tags to unknown nodes |
390 # ignore tags to unknown nodes |
391 self.changelog.rev(v) |
391 self.changelog.rev(v) |
392 t[k] = v |
392 t[k] = v |
393 except error.LookupError: |
393 except (error.LookupError, ValueError): |
394 pass |
394 pass |
395 return t |
395 return t |
396 |
396 |
397 def _findtags(self): |
397 def _findtags(self): |
398 '''Do the hard work of finding tags. Return a pair of dicts |
398 '''Do the hard work of finding tags. Return a pair of dicts |
904 |
904 |
905 The callback will be executed on lock release.""" |
905 The callback will be executed on lock release.""" |
906 l = self._lockref and self._lockref() |
906 l = self._lockref and self._lockref() |
907 if l: |
907 if l: |
908 l.postrelease.append(callback) |
908 l.postrelease.append(callback) |
|
909 else: |
|
910 callback() |
909 |
911 |
910 def lock(self, wait=True): |
912 def lock(self, wait=True): |
911 '''Lock the repository store (.hg/store) and return a weak reference |
913 '''Lock the repository store (.hg/store) and return a weak reference |
912 to the lock. Use this before modifying the store (e.g. committing or |
914 to the lock. Use this before modifying the store (e.g. committing or |
913 stripping). If you are opening a transaction, get a lock as well.)''' |
915 stripping). If you are opening a transaction, get a lock as well.)''' |
1193 self.dirstate.setparents(ret) |
1195 self.dirstate.setparents(ret) |
1194 ms.reset() |
1196 ms.reset() |
1195 finally: |
1197 finally: |
1196 wlock.release() |
1198 wlock.release() |
1197 |
1199 |
1198 self.hook("commit", node=hex(ret), parent1=hookp1, parent2=hookp2) |
1200 def commithook(node=hex(ret), parent1=hookp1, parent2=hookp2): |
|
1201 self.hook("commit", node=node, parent1=parent1, parent2=parent2) |
|
1202 self._afterlock(commithook) |
1199 return ret |
1203 return ret |
1200 |
1204 |
1201 def commitctx(self, ctx, error=False): |
1205 def commitctx(self, ctx, error=False): |
1202 """Add a new revision to current repository. |
1206 """Add a new revision to current repository. |
1203 Revision information is passed via the context argument. |
1207 Revision information is passed via the context argument. |