142 for i in ${subrepos} ; do |
142 for i in ${subrepos} ; do |
143 if [ ! -f ${i}/.hg/hgrc ] ; then |
143 if [ ! -f ${i}/.hg/hgrc ] ; then |
144 repos="${repos} ${i}" |
144 repos="${repos} ${i}" |
145 fi |
145 fi |
146 done |
146 done |
|
147 |
|
148 pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'` |
|
149 |
147 if [ "${command_args}" != "" ] ; then |
150 if [ "${command_args}" != "" ] ; then |
148 pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'` |
|
149 if [ "x${pull_default}" = "x${pull_default_tail}" ] ; then |
151 if [ "x${pull_default}" = "x${pull_default_tail}" ] ; then |
150 echo "ERROR: Need initial clone from non-local source" > ${status_output} |
152 echo "ERROR: Need initial clone from non-local source" > ${status_output} |
151 exit 1 |
153 exit 1 |
152 fi |
154 fi |
153 pull_extra="${command_args}/${pull_default_tail}" |
155 pull_extra="${command_args}/${pull_default_tail}" |
154 for i in ${subrepos_extra} ; do |
156 for i in ${subrepos_extra} ; do |
155 if [ ! -f ${i}/.hg/hgrc ] ; then |
157 if [ ! -f ${i}/.hg/hgrc ] ; then |
156 repos_extra="${repos_extra} ${i}" |
158 repos_extra="${repos_extra} ${i}" |
157 fi |
159 fi |
158 done |
160 done |
|
161 else |
|
162 if [ "x${pull_default}" = "x${pull_default_tail}" ] ; then |
|
163 # local source repo. Copy the extras ones that exist there. |
|
164 for i in ${subrepos_extra} ; do |
|
165 if [ -f ${pull_default}/${i}/.hg/hgrc -a ! -f ${i}/.hg/hgrc ] ; then |
|
166 # sub-repo there in source but not here |
|
167 repos_extra="${repos_extra} ${i}" |
|
168 fi |
|
169 done |
|
170 fi |
159 fi |
171 fi |
160 at_a_time=2 |
172 at_a_time=2 |
161 # Any repos to deal with? |
173 # Any repos to deal with? |
162 if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then |
174 if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then |
163 echo "No repositories to process." > ${status_output} |
175 echo "No repositories to process." > ${status_output} |