comparison hgext/mq.py @ 2725:9ffee4f07323

mq: update to handle repomap not longer used
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Fri, 28 Jul 2006 14:31:20 -0700
parents 9c41ae1908c7
children 5d134f04060f
comparison
equal deleted inserted replaced
2724:9c41ae1908c7 2725:9ffee4f07323
1193 dest = hg.defaultdest(source) 1193 dest = hg.defaultdest(source)
1194 sr = hg.repository(ui, ui.expandpath(source)) 1194 sr = hg.repository(ui, ui.expandpath(source))
1195 qbase, destrev = None, None 1195 qbase, destrev = None, None
1196 if sr.local(): 1196 if sr.local():
1197 reposetup(ui, sr) 1197 reposetup(ui, sr)
1198 sq = repomap[sr] 1198 if sr.mq.applied:
1199 if sq.applied: 1199 qbase = revlog.bin(sr.mq.applied[0].split(':')[0])
1200 qbase = revlog.bin(sq.applied[0].split(':')[0])
1201 if not hg.islocal(dest): 1200 if not hg.islocal(dest):
1202 destrev = sr.parents(qbase)[0] 1201 destrev = sr.parents(qbase)[0]
1203 ui.note(_('cloning main repo\n')) 1202 ui.note(_('cloning main repo\n'))
1204 sr, dr = hg.clone(ui, sr, dest, 1203 sr, dr = hg.clone(ui, sr, dest,
1205 pull=opts['pull'], 1204 pull=opts['pull'],
1214 stream=opts['uncompressed']) 1213 stream=opts['uncompressed'])
1215 if dr.local(): 1214 if dr.local():
1216 if qbase: 1215 if qbase:
1217 ui.note(_('stripping applied patches from destination repo\n')) 1216 ui.note(_('stripping applied patches from destination repo\n'))
1218 reposetup(ui, dr) 1217 reposetup(ui, dr)
1219 dq = repomap[dr] 1218 dr.mq.strip(dr, qbase, update=False, backup=None)
1220 dq.strip(dr, qbase, update=False, backup=None)
1221 if not opts['noupdate']: 1219 if not opts['noupdate']:
1222 ui.note(_('updating destination repo\n')) 1220 ui.note(_('updating destination repo\n'))
1223 dr.update(dr.changelog.tip()) 1221 dr.update(dr.changelog.tip())
1224 1222
1225 def commit(ui, repo, *pats, **opts): 1223 def commit(ui, repo, *pats, **opts):