##// END OF EJS Templates
mq: do not call ui.username unless it is necessary...
Martin Geisler -
r9733:f16ec85f default
parent child Browse files
Show More
@@ -1914,11 +1914,10 b' def prev(ui, repo, **opts):'
1914 summary=opts.get('summary'))
1914 summary=opts.get('summary'))
1915
1915
1916 def setupheaderopts(ui, opts):
1916 def setupheaderopts(ui, opts):
1917 def do(opt, val):
1917 if not opts.get('user') and opts.get('currentuser'):
1918 if not opts[opt] and opts['current' + opt]:
1918 opts['user'] = ui.username()
1919 opts[opt] = val
1919 if not opts.get('date') and opts.get('currentdate'):
1920 do('user', ui.username())
1920 opts['date'] = "%d %d" % util.makedate()
1921 do('date', "%d %d" % util.makedate())
1922
1921
1923 def new(ui, repo, patch, *args, **opts):
1922 def new(ui, repo, patch, *args, **opts):
1924 """create a new patch
1923 """create a new patch
@@ -54,3 +54,7 b' echo b >> b'
54 hg st
54 hg st
55 hg qnew -g -f p
55 hg qnew -g -f p
56 cat ../.hg/patches/p
56 cat ../.hg/patches/p
57
58 echo '% qnew -u with no username configured'
59 HGUSER= hg qnew -u blue red
60 cat ../.hg/patches/red
@@ -32,3 +32,6 b' diff --git a/d/b b/d/b'
32 @@ -1,1 +1,2 @@
32 @@ -1,1 +1,2 @@
33 b
33 b
34 +b
34 +b
35 % qnew -u with no username configured
36 From: blue
37
General Comments 0
You need to be logged in to leave comments. Login now