diff -ur v10/fsyn.py v11/fsyn.py --- v10/fsyn.py 2020-05-06 14:49:02.000000000 +0900 +++ v11/fsyn.py 2020-05-06 23:18:08.000000000 +0900 @@ -190,7 +190,8 @@ return list( filter( f, lst ) ) def sorted_ids(ids): - return list( sorted( ids, key=tm_ut.str_to_sec ) ) + f = lambda id: 0 if id == 'org' else tm_ut.str_to_sec( id ) + return list( sorted( ids, key=f ) ) def show_ids(ids, label): if not ids: @@ -224,7 +225,8 @@ show_ids( ids, 'ctail' ) def get_latest(id='org'): - return max( get_tails(), key=tm_ut.str_to_sec ) + f = lambda id: 0 if id == 'org' else tm_ut.str_to_sec( id ) + return max( get_tails(), key=f ) def get_clatest(): return get_latest( get_curr() ) @@ -528,7 +530,7 @@ - def push(to_path): + def push(to_path, no_org): to_path = cut_tail_sla( to_path ) from_path = to_path @@ -546,7 +548,9 @@ def push_id(id, link_lmt=''): copy( id, 'snap' ) - copy( id, 'update.tgz' ) + + if not no_org or id != 'org': + copy( id, 'update.tgz' ) link = get_link( id ) if link_lmt: @@ -554,7 +558,7 @@ link_d = com_get_link( id, from_path ) - dirty = False + dirty = ( id == 'org' and not link.to ) if link_d.from_ != link.from_: link_d.from_ = link.from_ dirty = True @@ -744,7 +748,7 @@ arg.cmd_new( 'check', comment='show dirty' ), arg.cmd_new( 'diff' ), arg.cmd_new( 'fixlink', comment='fix link info' ), - arg.cmd_new( 'push', [ 'to_path' ] ), + arg.cmd_new( 'push', [ 'to_path' ], opts={ 'no_org': False } ), arg.cmd_new( 'pull', [ 'from_path' ] ), arg.cmd_new( 'clone', [ 'dot_fsyn_path' ], comment='ex. site/foo.fsyn' ), arg.cmd_new( 'tree', comment='show id tree' ), @@ -764,5 +768,5 @@ args = cmd.args if cmd.name in add_rest: args = args + cmd.a.get_av() - func( *args ) + func( *args, **cmd.opts ) # EOF