##// END OF EJS Templates
mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho -
r5334:448eb46d default
parent child Browse files
Show More
@@ -1607,6 +1607,9 b' def refresh(ui, repo, *pats, **opts):'
1607 q = repo.mq
1607 q = repo.mq
1608 message = cmdutil.logmessage(opts)
1608 message = cmdutil.logmessage(opts)
1609 if opts['edit']:
1609 if opts['edit']:
1610 if not q.applied:
1611 ui.write(_("No patches applied\n"))
1612 return 1
1610 if message:
1613 if message:
1611 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"'))
1614 raise util.Abort(_('option "-e" incompatible with "-m" or "-l"'))
1612 patch = q.applied[-1].name
1615 patch = q.applied[-1].name
@@ -8,6 +8,11 b' echo "mq=" >> $HGRCPATH'
8 hg init
8 hg init
9 hg qinit
9 hg qinit
10
10
11 echo =======================
12 echo "Should fail if no patches applied"
13 hg qrefresh
14 hg qrefresh -e
15
11 hg qnew -m "First commit message" first-patch
16 hg qnew -m "First commit message" first-patch
12 echo aaaa > file
17 echo aaaa > file
13 hg add file
18 hg add file
@@ -1,3 +1,7 b''
1 =======================
2 Should fail if no patches applied
3 No patches applied
4 No patches applied
1 =======================
5 =======================
2 Should display 'First commit message'
6 Should display 'First commit message'
3 description:
7 description:
General Comments 0
You need to be logged in to leave comments. Login now