##// END OF EJS Templates
mq: eliminate warning on qpush with empty series...
Adrian Buehlmann -
r8795:51c29aec default
parent child Browse files
Show More
@@ -902,14 +902,14 b' class queue(object):'
902 def push(self, repo, patch=None, force=False, list=False,
902 def push(self, repo, patch=None, force=False, list=False,
903 mergeq=None, all=False):
903 mergeq=None, all=False):
904 wlock = repo.wlock()
904 wlock = repo.wlock()
905 if repo.dirstate.parents()[0] not in repo.heads():
905 try:
906 self.ui.status(_("(working directory not at a head)\n"))
906 if repo.dirstate.parents()[0] not in repo.heads():
907 self.ui.status(_("(working directory not at a head)\n"))
907
908
908 if not self.series:
909 if not self.series:
909 self.ui.warn(_('no patches in series\n'))
910 self.ui.warn(_('no patches in series\n'))
910 return 0
911 return 0
911
912
912 try:
913 patch = self.lookup(patch)
913 patch = self.lookup(patch)
914 # Suppose our series file is: A B C and the current 'top'
914 # Suppose our series file is: A B C and the current 'top'
915 # patch is B. qpush C should be performed (moving forward)
915 # patch is B. qpush C should be performed (moving forward)
@@ -16,6 +16,10 b" echo 'syntax: glob' > .hgignore"
16 echo '.hgignore' >> .hgignore
16 echo '.hgignore' >> .hgignore
17
17
18 hg qinit
18 hg qinit
19
20 echo '% test qpush on empty series'
21 hg qpush
22
19 hg qnew patch1
23 hg qnew patch1
20 echo >> foo
24 echo >> foo
21 hg qrefresh -m 'patch 1'
25 hg qrefresh -m 'patch 1'
@@ -1,4 +1,6 b''
1 adding foo
1 adding foo
2 % test qpush on empty series
3 no patches in series
2 patch queue now empty
4 patch queue now empty
3 applying patch1
5 applying patch1
4 applying patch2
6 applying patch2
General Comments 0
You need to be logged in to leave comments. Login now