chiark / gitweb /
support bzr checkouts
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Fri, 20 Jul 2007 06:39:26 +0000 (06:39 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Fri, 20 Jul 2007 06:39:26 +0000 (06:39 +0000)
baz-update-config

index 6a45d910f1ba70a402af562db55976456898b7eb..ed53853825d19a6592fa44a8122f045f864e2a44 100755 (executable)
@@ -26,10 +26,20 @@ for line in $(baz cat-config "$1" 2>/dev/null || cat "$1"); do
                                if [ ! -d "$DIR/.bzr" ]; then
                                        echo "$DIR is not a bzr checkout; cannot update" >&2
                                        continue
+                               elif [ -f "$DIR/.bzr/branch/bound" ]; then
+                                       bzr update "$DIR"
+                               else
+                                       (cd "$DIR" && bzr pull "$VERSION")
                                fi
-                               (cd "$DIR" && bzr pull "$VERSION")
                        else
-                               bzr get "$VERSION" "$DIR"
+                               case $VERSION in
+                                       bzr+ssh://*|sftp://*)
+                                               bzr checkout "$VERSION" "$DIR"
+                                               ;;
+                                       *)
+                                               bzr get "$VERSION" "$DIR"
+                                               ;;
+                               esac
                        fi
                        ;;
                *)