Browse Source

sde-create-manifest: improved manifest_scan_svn()

user/amery/wip/manifest
Alejandro Mery 15 years ago
parent
commit
87b38938b6
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      bin/sde-create-manifest

+ 11
- 4
bin/sde-create-manifest

@ -19,17 +19,24 @@
. "$SDEROOT/lib/libsde.in"
manifest_scan_svn() {
local dir="${1%/*}" url= url0=
url="$(cd "$dir"; LANG=C svn info | grep ^URL: | cut -d' ' -f2-)"
local dir="${1%/*}" info= root= path= url= url0=
info="$(cd "$dir"; svn info --xml)"
root="$(echo "$info" | sed -ne 's,^<root>\(.*\)</root>$,\1,p')"
path="$(echo "$info" | sed -ne "s,^<url>$root\(.*\)</url>$,\1,p")"
if [ -z "$path" ]; then
url="$root"
else
url="$root$path"
fi
if [ "$dir" != '.' -a -d "$dir/../.svn" ]; then
# parent is also svn
url0="${url%/*}"
if (cd "$dir/.."; LANG=C svn info 2> /dev/null) | grep -q "^URL: $url0\$"; then
if (cd "$dir/.."; svn info --xml 2> /dev/null) | grep -q "^<url>$url0</url>\$"; then
return
fi
fi
echo "$dir $url"
echo "$dir $root $path"
}
manifest_scan_git() {

Loading…
Cancel
Save