Mercurial > hg
diff hgext/gpg.py @ 27290:525d9b3f0a31
censor: make censor acquire locks before processing
Before this patch, "hg censor" executes below:
- without acquisition of wlock, examine whether the working
directory refers the revision of the file to be censored or not
- without acquisition of store lock (slock), replace existing
filelog of file to be censored with censored one,
Replacement consists of steps below, and it is assumed that the
destination filelog at (1) isn't changed before renaming at (3).
1. read existing filelog in
2. write filelog entries (both censored and not) into temporary file
3. rename from temporary file to existing filelog to be censored
It may cause unintentional result, if another command runs parallelly
(see also issue4368).
This patch makes "hg censor" acquire wlock and slock before
processing.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 09 Dec 2015 08:28:53 +0900 |
parents | 7b4a61570d61 |
children | a72735028336 |