Show More
@@ -1832,6 +1832,9 b' class queue(object):' | |||
|
1832 | 1832 | |
|
1833 | 1833 | self.added.append(patchname) |
|
1834 | 1834 | patchname = None |
|
1835 | if rev and repo.ui.configbool('mq', 'secret', False): | |
|
1836 | # if we added anything with --rev, we must move the secret root | |
|
1837 | phases.retractboundary(repo, phases.secret, [n]) | |
|
1835 | 1838 | self.parseseries() |
|
1836 | 1839 | self.applieddirty = True |
|
1837 | 1840 | self.seriesdirty = True |
@@ -2006,6 +2009,8 b' def qimport(ui, repo, *filename, **opts)' | |||
|
2006 | 2009 | |
|
2007 | 2010 | Returns 0 if import succeeded. |
|
2008 | 2011 | """ |
|
2012 | lock = repo.lock() # cause this may move phase | |
|
2013 | try: | |
|
2009 | 2014 | q = repo.mq |
|
2010 | 2015 | try: |
|
2011 | 2016 | q.qimport(repo, filename, patchname=opts.get('name'), |
@@ -2014,8 +2019,11 b' def qimport(ui, repo, *filename, **opts)' | |||
|
2014 | 2019 | finally: |
|
2015 | 2020 | q.savedirty() |
|
2016 | 2021 | |
|
2022 | ||
|
2017 | 2023 | if opts.get('push') and not opts.get('rev'): |
|
2018 | 2024 | return q.push(repo, None) |
|
2025 | finally: | |
|
2026 | lock.release() | |
|
2019 | 2027 | return 0 |
|
2020 | 2028 | |
|
2021 | 2029 | def qinit(ui, repo, create): |
@@ -226,3 +226,19 b' set up hgweb' | |||
|
226 | 226 | $ cd ../repo |
|
227 | 227 | $ hg qimport http://localhost:$HGPORT/raw-rev/0/// |
|
228 | 228 | adding 0 to series file |
|
229 | ||
|
230 | check qimport phase: | |
|
231 | ||
|
232 | $ hg -q qpush | |
|
233 | now at: 0 | |
|
234 | $ hg phase qparent | |
|
235 | 1: draft | |
|
236 | $ hg qimport -r qparent | |
|
237 | $ hg phase qbase | |
|
238 | 1: draft | |
|
239 | $ hg qfinish qbase | |
|
240 | $ echo '[mq]' >> $HGRCPATH | |
|
241 | $ echo 'secret=true' >> $HGRCPATH | |
|
242 | $ hg qimport -r qparent | |
|
243 | $ hg phase qbase | |
|
244 | 1: secret |
General Comments 0
You need to be logged in to leave comments.
Login now