contrib/plan9/9mail
author Mads Kiilerich <madski@unity3d.com>
Tue, 22 Apr 2014 02:10:25 +0200
changeset 21391 cb15835456cb
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
merge: change debug logging - test output changes but no real changes Preparing for action list split-up, making sure the final change don't have any test changes. The patch moves debug statements around without really changing anything. Arguably, it temporarily makes the code worse. The only justification is that it makes it easier to review the test changes ... and in the end the big change will not change test output at all. The changes to test output are due to changes in the ordering of debug output. That is mainly because we now do the debug logging for files when we actually process them. Files are also processed in a slightly different but still correct order. It is now primarily ordered by action type, secondarily by filename. The patch introduces some redundancy. Some of it will be removed again, some of it will in the end help code readability and efficiency. It is possible that we later on could introduce a "process this action list and do some logging and progress reporting and apply this function". The "preserving X for resolve" debug statements will only have single space indentation. It will no longer have a leading single space indented "f: msg -> m" message. Having this message double indented would thus no longer make sense. The bid actions will temporarily be sorted using a custom sort key that happens to match the sort order the simplified code will have in the end.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19613
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     1
#!/bin/rc
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     2
# 9mail - Mercurial email wrapper for upas/marshal
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     3
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     4
fn usage {
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     5
	echo >[1=2] usage: mercurial/9mail -f from to [cc]
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     6
	exit usage
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     7
}
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     8
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
     9
from=()
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    10
cc=()
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    11
to=()
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    12
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    13
switch($1){
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    14
case -f
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    15
	from=$2
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    16
case *
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    17
	usage
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    18
}
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    19
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    20
to=($3)
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    21
if(~ $#* 4)
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    22
	cc=(-C $4)
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    23
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    24
upasname=$from
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    25
upas/marshal $cc $to
4bfd3c7160d9 9mail: new script to add support for Plan 9 upas/marshal email wrapper
Jeff Sickel <jas@corpus-callosum.com>
parents:
diff changeset
    26