do_fetch.command_summary.txt #5

  • //
  • guest/
  • tom_tyler/
  • sw/
  • main/
  • p4fetch/
  • do_fetch.command_summary.txt
  • View
  • Commits
  • Open Download .zip Download (2 KB)
USAGE for do_fetch.sh v1.3.3:

do_fetch.sh -c <changelist_file> [-r <remote_spec>] [-y] [-d|-D]

or

do_fetch.sh [-h|-man|-V]

DESCRIPTION:
	This script fetches changes one changelist at a time, using a
	specified changelist file and remote spec.  This enables an
	arbitrarily large fetch to be done.

OPTIONS:
 -c <changelist_file>
 	Specify the changelist file, a simple text file containing the
	changelist numbers in ascending order. This file is created with
	a command like:

	p4 -p <YourTargetServerPort> -u <YourTargetServerUser> login
	p4 -p <YourTargetServerPort> -u <YourTargetServerUser> -E P4CONFIG= -ztag -F "%change%" changes -r -s submitted //path1/... //path2/... //path3/... | sort -u > AllChangesToFetch.txt

 -r <remote_spec>
	Specify the name of the remote spec to use. The default is to use the p4d default remote spec name, 'origin'.

 -d	Debug mode. Displays extra output normally suppressed.

 -D	Extreme debug mode using bash 'set -x' mode. Implies '-d'.

 -L <log>
	Specify the path to a log file, or the special value 'off' to disable
	logging.  By default, all output (stdout and stderr) goes to:
	${LOGS:-/tmp}/do_fetch.<DateStamp>.log

	NOTE: This script is self-logging.  That is, output displayed on the screen
	is simultaneously captured in the log file.  Do not run this script with
	redirection operators like '> log' or '2>&1', and do not use 'tee.'

 -y	Take real action. Without -y, this script displays commands instead of
 	running them.

THROTTLE CONTROL:
	do_fetch.cfg: This file uses an optional configuration file.

	Create this configuration file if you want to throttle the fetch. In the
	config file, set SleepDelayBetweenFetches to the number of seconds to sleep
	between fetches. This is a means of throttle control to reduce load on the
	target server. If server load is not a concern, set to 0 for no delay or
	simply don't create the configuration file.

	do_fetch.cfg.sample: A sample config file.

HELP OPTIONS:
 -h	Display short help message
 -man	Display man-style help message
 -V	Display version info for this script and its libraries.

EXAMPLES:
	Kick it off like so:

	First, operate in a designated directory, e.g. /p4/common/site/bin:

	cd /p4/common/site/bin

	Next, do a Dry Run:
	./do_fetch.sh -c AllChangesToFetch.txt -r YourRemoteSpec

	Review that output. If it looks good. give it a go:

	nohup ./do_fetch.sh -c AllChangesToFetch.txt -r YourRemoteSpec -y < /dev/null > /tmp/do_fetch.extra.log 2>&1 &

# Change User Description Committed
#5 32977 C. Thomas Tyler Fixed docs.
#4 32935 C. Thomas Tyler Fixed bug in processing of sleep delay in throttle control file.

Removed unintentional dependency on SDP shell environment ($LOGS variable).
If not SDP, uses /tmp instead of SDP logs dir.

Corrections to doc page.
#3 32934 C. Thomas Tyler Doc enhancement.
#2 32933 C. Thomas Tyler Changed so '-r <remote_spec>' is optional; default is 'origin' (matching p4d).
Corrected and updated documentation synopsis.

Added docs for 'do_fetch.cfg' file and a sample config file.

Clarified that SDP paths are optional.

Maintained ShellCheck compliance.
#1 32932 C. Thomas Tyler Cosmetic tweaks, added command summary.sh