463 > wccontent['untracked-revert'] = wccontent['revert'] |
463 > wccontent['untracked-revert'] = wccontent['revert'] |
464 > wccontent['untracked-wc'] = wccontent['wc'] |
464 > wccontent['untracked-wc'] = wccontent['wc'] |
465 > |
465 > |
466 > # build the combination of possible states |
466 > # build the combination of possible states |
467 > combination = [] |
467 > combination = [] |
468 > for ctxkey, ctxvalue in ctxcontent.iteritems(): |
468 > for ctxkey, ctxvalue in sorted(ctxcontent.iteritems()): |
469 > for wckey in wccontent: |
469 > for wckey in sorted(wccontent): |
470 > base, parent = ctxvalue |
470 > base, parent = ctxvalue |
471 > if (base == parent and 'revert' in wckey): |
471 > if (base == parent and 'revert' in wckey): |
472 > continue |
472 > continue |
473 > if not base and 'revert' in wckey: |
473 > if not base and 'revert' in wckey: |
474 > continue |
474 > continue |
475 > if not parent and 'deleted' in wckey: |
475 > if not parent and 'deleted' in wckey: |
476 > continue |
476 > continue |
477 > filename = "%s_%s" % (ctxkey, wckey) |
477 > filename = "%s_%s" % (ctxkey, wckey) |
478 > combination.append((filename, base, parent, |
478 > combination.append((filename, base, parent, |
479 > wccontent[wckey](ctxvalue))) |
479 > wccontent[wckey](ctxvalue))) |
480 > |
|
481 > # make sure we have stable output |
|
482 > combination.sort() |
|
483 > |
480 > |
484 > # retrieve the state we must generate |
481 > # retrieve the state we must generate |
485 > target = sys.argv[1] |
482 > target = sys.argv[1] |
486 > |
483 > |
487 > # compute file content |
484 > # compute file content |