comparison hgext/mq.py @ 4090:785ad8cd1d31

qclone: don't call reposetup manually
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 15 Feb 2007 08:44:08 -0200
parents 8ee983e3d461
children 49237d6ae97d a9ee6c53af8d
comparison
equal deleted inserted replaced
4089:0ff50cc7acb4 4090:785ad8cd1d31
1499 if dest is None: 1499 if dest is None:
1500 dest = hg.defaultdest(source) 1500 dest = hg.defaultdest(source)
1501 sr = hg.repository(ui, ui.expandpath(source)) 1501 sr = hg.repository(ui, ui.expandpath(source))
1502 qbase, destrev = None, None 1502 qbase, destrev = None, None
1503 if sr.local(): 1503 if sr.local():
1504 reposetup(ui, sr)
1505 if sr.mq.applied: 1504 if sr.mq.applied:
1506 qbase = revlog.bin(sr.mq.applied[0].rev) 1505 qbase = revlog.bin(sr.mq.applied[0].rev)
1507 if not hg.islocal(dest): 1506 if not hg.islocal(dest):
1508 destrev = sr.parents(qbase)[0] 1507 destrev = sr.parents(qbase)[0]
1509 ui.note(_('cloning main repo\n')) 1508 ui.note(_('cloning main repo\n'))
1519 update=not opts['noupdate'], 1518 update=not opts['noupdate'],
1520 stream=opts['uncompressed']) 1519 stream=opts['uncompressed'])
1521 if dr.local(): 1520 if dr.local():
1522 if qbase: 1521 if qbase:
1523 ui.note(_('stripping applied patches from destination repo\n')) 1522 ui.note(_('stripping applied patches from destination repo\n'))
1524 reposetup(ui, dr)
1525 dr.mq.strip(dr, qbase, update=False, backup=None) 1523 dr.mq.strip(dr, qbase, update=False, backup=None)
1526 if not opts['noupdate']: 1524 if not opts['noupdate']:
1527 ui.note(_('updating destination repo\n')) 1525 ui.note(_('updating destination repo\n'))
1528 hg.update(dr, dr.changelog.tip()) 1526 hg.update(dr, dr.changelog.tip())
1529 1527