##// END OF EJS Templates
qimport: when mq.secret=True set qimported revision as secret
Pierre-Yves David -
r16027:29ea059b stable
parent child Browse files
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,16 +2009,21 b' def qimport(ui, repo, *filename, **opts)'
2006 2009
2007 2010 Returns 0 if import succeeded.
2008 2011 """
2009 q = repo.mq
2012 lock = repo.lock() # cause this may move phase
2010 2013 try:
2011 q.qimport(repo, filename, patchname=opts.get('name'),
2012 existing=opts.get('existing'), force=opts.get('force'),
2013 rev=opts.get('rev'), git=opts.get('git'))
2014 q = repo.mq
2015 try:
2016 q.qimport(repo, filename, patchname=opts.get('name'),
2017 existing=opts.get('existing'), force=opts.get('force'),
2018 rev=opts.get('rev'), git=opts.get('git'))
2019 finally:
2020 q.savedirty()
2021
2022
2023 if opts.get('push') and not opts.get('rev'):
2024 return q.push(repo, None)
2014 2025 finally:
2015 q.savedirty()
2016
2017 if opts.get('push') and not opts.get('rev'):
2018 return q.push(repo, None)
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