mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
mq: don't warn on qpush against a branch head
This commit is contained in:
parent
38666f1574
commit
e11a173bf9
@ -987,7 +987,12 @@ class queue(object):
|
||||
diffopts = self.diffopts()
|
||||
wlock = repo.wlock()
|
||||
try:
|
||||
if repo.dirstate.parents()[0] not in repo.heads():
|
||||
heads = []
|
||||
for b, ls in repo.branchmap().iteritems():
|
||||
heads += ls
|
||||
if not heads:
|
||||
heads = [nullid]
|
||||
if repo.dirstate.parents()[0] not in heads:
|
||||
self.ui.status(_("(working directory not at a head)\n"))
|
||||
|
||||
if not self.series:
|
||||
|
@ -42,3 +42,23 @@ hg qrefresh
|
||||
|
||||
echo '% tip:'
|
||||
hg tip --template '{rev} {desc}\n'
|
||||
|
||||
echo '% qpush warning branchheads'
|
||||
cd ..
|
||||
hg init branchy
|
||||
cd branchy
|
||||
echo q > q
|
||||
hg add q
|
||||
hg qnew -f qp
|
||||
hg qpop
|
||||
echo a > a
|
||||
hg ci -Ama
|
||||
hg up null
|
||||
hg branch b
|
||||
echo c > c
|
||||
hg ci -Amc
|
||||
hg merge default
|
||||
hg ci -mmerge
|
||||
hg up default
|
||||
hg log
|
||||
hg qpush
|
||||
|
@ -12,3 +12,37 @@ abort: popping would remove a revision not managed by this patch queue
|
||||
abort: cannot refresh a revision with children
|
||||
% tip:
|
||||
3 append quux
|
||||
% qpush warning branchheads
|
||||
popping qp
|
||||
patch queue now empty
|
||||
adding a
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
marked working directory as branch b
|
||||
adding c
|
||||
created new head
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
(branch merge, don't forget to commit)
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
changeset: 2:65309210bf4e
|
||||
branch: b
|
||||
tag: tip
|
||||
parent: 1:707adb4c8ae1
|
||||
parent: 0:cb9a9f314b8b
|
||||
user: test
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
summary: merge
|
||||
|
||||
changeset: 1:707adb4c8ae1
|
||||
branch: b
|
||||
parent: -1:000000000000
|
||||
user: test
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
summary: c
|
||||
|
||||
changeset: 0:cb9a9f314b8b
|
||||
user: test
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
summary: a
|
||||
|
||||
applying qp
|
||||
now at: qp
|
||||
|
Loading…
Reference in New Issue
Block a user