##// END OF EJS Templates
fakemergerecord: take wlock to write the merge state...
Pierre-Yves David -
r29754:b303b381 default
parent child Browse files
Show More
@@ -16,10 +16,11 b' command = cmdutil.command(cmdtable)'
16 16 [('X', 'mandatory', None, 'add a fake mandatory record'),
17 17 ('x', 'advisory', None, 'add a fake advisory record')], '')
18 18 def fakemergerecord(ui, repo, *pats, **opts):
19 ms = merge.mergestate.read(repo)
20 records = ms._makerecords()
21 if opts.get('mandatory'):
22 records.append(('X', 'mandatory record'))
23 if opts.get('advisory'):
24 records.append(('x', 'advisory record'))
25 ms._writerecords(records)
19 with repo.wlock():
20 ms = merge.mergestate.read(repo)
21 records = ms._makerecords()
22 if opts.get('mandatory'):
23 records.append(('X', 'mandatory record'))
24 if opts.get('advisory'):
25 records.append(('x', 'advisory record'))
26 ms._writerecords(records)
General Comments 0
You need to be logged in to leave comments. Login now