mirror of
https://github.com/golang/go
synced 2024-09-05 07:54:46 +00:00
codereview: save CL messages in $(hg root)/last-change
Fixes #2279. R=bradfitz, r, r CC=golang-dev https://golang.org/cl/5096042
This commit is contained in:
parent
9ddc2b5688
commit
762729b50e
|
@ -61,6 +61,7 @@ test/run.out
|
||||||
test/times.out
|
test/times.out
|
||||||
test/garbage/*.out
|
test/garbage/*.out
|
||||||
goinstall.log
|
goinstall.log
|
||||||
|
last-change
|
||||||
|
|
||||||
syntax:regexp
|
syntax:regexp
|
||||||
^bin/
|
^bin/
|
||||||
|
|
|
@ -849,6 +849,18 @@ def EditCL(ui, repo, cl):
|
||||||
s = cl.EditorText()
|
s = cl.EditorText()
|
||||||
while True:
|
while True:
|
||||||
s = ui.edit(s, ui.username())
|
s = ui.edit(s, ui.username())
|
||||||
|
|
||||||
|
# We can't trust Mercurial + Python not to die before making the change,
|
||||||
|
# so, by popular demand, just scribble the most recent CL edit into
|
||||||
|
# $(hg root)/last-change so that if Mercurial does die, people
|
||||||
|
# can look there for their work.
|
||||||
|
try:
|
||||||
|
f = open(repo.root+"/last-change", "w")
|
||||||
|
f.write(s)
|
||||||
|
f.close()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
clx, line, err = ParseCL(s, cl.name)
|
clx, line, err = ParseCL(s, cl.name)
|
||||||
if err != '':
|
if err != '':
|
||||||
if not promptyesno(ui, "error parsing change list: line %d: %s\nre-edit (y/n)?" % (line, err)):
|
if not promptyesno(ui, "error parsing change list: line %d: %s\nre-edit (y/n)?" % (line, err)):
|
||||||
|
|
Loading…
Reference in a new issue