Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

manifest: properly handle subrepos that are empty or missing from working folder

Changeset af3744ebfb92

Parent 3d2daf2689d9

by Angel Ezquerra

Changes to one file · Browse files at af3744ebfb92 Showing diff from parent 3d2daf2689d9 Diff from another changeset...

 
572
573
574
575
 
 
 
 
 
 
 
 
 
 
 
576
577
578
 
572
573
574
 
575
576
577
578
579
580
581
582
583
584
585
586
587
588
@@ -572,7 +572,17 @@
  for wsub in ctx.substate.keys():   if wfile.startswith(wsub):   srev = ctx.substate[wsub][1] - sctx = ctx.sub(wsub)._repo[srev] + stype = ctx.substate[wsub][2] + if stype != 'hg': + continue + if not os.path.exists(ctx._repo.wjoin(wsub)): + # Maybe the repository does not exist in the working copy? + continue + try: + sctx = ctx.sub(wsub)._repo[srev] + except: + # The selected revision does not exist in the working copy + continue   wfileinsub = wfile[len(wsub)+1:]   if wfileinsub in sctx.substate.keys() or wfileinsub in sctx.files():   return wsub, wfileinsub, sctx