Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0128/25

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Clean up -c and -s.
 [rsc] --rw-rw-r-- M 1428987 glenda sys 21811 Jan 28 15:02 sys/src/cmd/replica/applylog.c
	[diffs elided - too long]
	[diff -c /n/sourcesdump/2006/0128/plan9/sys/src/cmd/replica/applylog.c /n/sourcesdump/2006/0129/plan9/sys/src/cmd/replica/applylog.c]
 [rsc] --rw-rw-r-- M 1428987 glenda sys 843 Jan 28 15:03 rc/bin/replica/defs
	/n/sourcesdump/2006/0128/plan9/rc/bin/replica/defs:19,24 - 
	/n/sourcesdump/2006/0129/plan9/rc/bin/replica/defs:19,28
	  
	  opt=()
	  while(! ~ $#* 0 && ~ $1 -*){
	+ 	if(~ $1 -s -c){	# take one argument 
	+ 		opt=($opt $1)
	+ 		shift
	+ 	}
	  	opt=($opt $1)
	  	shift
	  }
 [rsc] --rw-rw-r-- M 1428987 glenda sys 21811 Jan 28 15:02 sys/src/cmd/replica/applylog.c
 [rsc] --rwxrwxr-x M 1428987 rsc sys 272 Jan 28 15:03 usr/glenda/bin/rc/pull
	/n/sourcesdump/2006/0128/plan9/usr/glenda/bin/rc/pull:3,8 - 
	/n/sourcesdump/2006/0129/plan9/usr/glenda/bin/rc/pull:3,12
	  rfork e
	  flags=()
	  while(! ~ $#* 0 && ~ $1 -*){
	+ 	if(~ $1 -c -s){
	+ 		flags=($flags $1)
	+ 		shift
	+ 	}
	  	flags=($flags $1)
	  	shift
	  }
 [rsc] --rw-rw-r-- M 1428987 glenda sys 843 Jan 28 15:03 rc/bin/replica/defs
 [rsc] --rw-rw-r-- M 1428987 glenda sys 7209 Jan 28 15:12 sys/man/1/replica
	/n/sourcesdump/2006/0128/plan9/sys/man/1/replica:4,13 - 
	/n/sourcesdump/2006/0129/plan9/sys/man/1/replica:4,21
	  .SH SYNOPSIS
	  .B replica/pull
	  [
	- .B -cnsv
	+ .B -nv
	  ]
	+ [
	+ .B -c
	  .I name
	+ ]...
	  [
	+ .B -s
	+ .I name
	+ ]...
	+ .I name
	+ [
	  .I path
	  ...
	  ]
	/n/sourcesdump/2006/0128/plan9/sys/man/1/replica:160,174 - 
	/n/sourcesdump/2006/0129/plan9/sys/man/1/replica:168,184
	  .B -c
	  flag to
	  .I pull
	- causes updates to be resolved using the client's copy,
	+ specifies that conflicts for paths beginning with
	+ .I name
	+ should be resolved using the client's copy,
	  while
	  .B -s
	  specifies the server's copy.
	- Typically these flags are only used when
	- invoking
	- .I pull
	- with a specific list of files that are known
	- to be conflicting.
	+ The 
	+ .B -c
	+ and
	+ .B -s
	+ options may be repeated.
	  .PP
	  .I Replica/changes
	  prints a list of local changes made on the client
	/n/sourcesdump/2006/0128/plan9/sys/man/1/replica:283,291 - 
	/n/sourcesdump/2006/0129/plan9/sys/man/1/replica:293,328
	  To update your system, make sure you are connected
	  to the internet and run
	  .EX
	-     disk/kfscmd allow
	      replica/pull /dist/replica/network
	-     disk/kfscmd disallow
	+ .EE
	+ If conflicts are reported (say you have made local changes to 
	+ .B /rc/bin/cpurc
	+ and
	+ .BR /rc/bin/termrc ,
	+ but only want to keep the
	+ .B cpurc
	+ changes),
	+ use
	+ .EX
	+     replica/pull -c rc/bin/cpurc -s rc/bin/termrc /dist/replica/network
	+ .EE
	+ to instruct
	+ .I pull
	+ to ignore the server's change to 
	+ .BR cpurc .
	+ .PP
	+ The script
	+ .B /usr/glenda/bin/rc/pull
	+ runs 
	+ .I pull
	+ with the
	+ .B -v
	+ flag and with
	+ .B /dist/replica/network
	+ inserted at the right point on the command line.
	+ Logged in as glenda, one can repeat the above example with:
	+ .EX
	+     pull -c rc/bin/cpurc -s rc/bin/cpurc
	  .EE
	  .PP
	  To see a list of changes made to the local file system
 [rsc] --rw-rw-r-- M 1428987 glenda sys 6383 Jan 28 15:12 sys/man/8/replica
	/n/sourcesdump/2006/0128/plan9/sys/man/8/replica:34,41 - 
	/n/sourcesdump/2006/0129/plan9/sys/man/8/replica:34,49
	  .br
	  .B replica/applylog
	  [
	- .B -cnsuv
	+ .B -nuv
	  ]
	+ [
	+ .B -c
	+ .I name
	+ ]...
	+ [
	+ .B -s
	+ .I name
	+ ]...
	  .I clientdb
	  .I clientroot
	  .I serverroot
	/n/sourcesdump/2006/0128/plan9/sys/man/8/replica:217,230 - 
	/n/sourcesdump/2006/0129/plan9/sys/man/8/replica:225,239
	  .B -c
	  flag is given, 
	  .I applylog
	- still takes no action, but does so silently and will not
	+ still takes no action for files beginning with the given names,
	+ but does so silently and will not
	  report the conflicts in the future.
	  (The conflict is resolved in favor of the client.)
	- If the
	+ The
	  .B -s
	- flag is given,
	+ is similar but causes 
	  .I applylog
	- overwrites the local changes.
	+ to overwrite the local changes.
	  (The conflict is resolved in favor of the server.)
	  .PP
	  .I Applychanges
 [rsc] --rw-rw-r-- M 1428987 glenda sys 21811 Jan 28 15:02 sys/src/cmd/replica/applylog.c


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.