]> Pileus Git - ~andy/sunrise/commitdiff
fix repoman problems with sunrise-commit, svn problems with echangelog and use sunris...
authorStefan Schweizer <genstef@gentoo.org>
Mon, 17 Jul 2006 10:05:14 +0000 (10:05 +0000)
committerStefan Schweizer <genstef@gentoo.org>
Mon, 17 Jul 2006 10:05:14 +0000 (10:05 +0000)
svn path=/sunrise/; revision=635

scripts/echangelog
scripts/sunrise-commit

index 4d75c98d65247323ab4c9e4513733c1ce4242432..5ab9204e2c7c81784b2a57bde80158cfd13efeb9 100755 (executable)
@@ -93,11 +93,11 @@ while (<C>) {
 
 # Separate out the trivial files for now
 @files = grep { 
-    !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; }
+    !/files.digest|Manifest|ChangeLog|^files$|^\.$/ or do { push @trivial, $_; 0; }
 } @files;
 
 @unknown = grep { 
-    !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; }
+    !/files.digest|Manifest|ChangeLog|^files$|^\.$/ or do { push @trivial, $_; 0; }
 } @unknown;
 
 # Don't allow any conflicts
@@ -207,9 +207,9 @@ sub sortfunc($$) {
 
 # Forget ebuilds that only have changed copyrights, unless that's all
 # the changed files we have
-
-@ebuilds = grep /\.ebuild$/, @files;
-@files = grep !/\.ebuild$/, @files;
+# does not work with svn TODO
+#@ebuilds = grep /\.ebuild$/, @files;
+#@files = grep !/\.ebuild$/, @files;
 
 if (@ebuilds) {
     open C, $vcs{$vcs}{diff}.@ebuilds." 2>&1 |" or die "Can't run: ".$vcs{$vcs}{diff}."$!\n";
index 151abcb74cfbd968897eecc1961d1c8997e4309a..97cd8cfd531cf0e60ceb92b9b721c482a5b90717 100755 (executable)
@@ -34,7 +34,6 @@ opt_norepoman=0
 opt_noupdate=0
 opt_quiet=0
 opt_verbose=0
-working_copy_base_dir=""
 
 changelog_append() {
        if [[ $opt_changelog == 1 ]] ; then
@@ -48,43 +47,12 @@ changelog_append() {
                        exit 1
                fi
                ebegin "Appending/creating ChangeLog"
-               echangelog "$*"
+               [ -e $(dirname $0)/echangelog ] && ec="$(dirname $0)/echangelog" || ec="echangelog"
+               $ec "$*"
                eend $?
        fi
 }
 
-check_working_copy_base_dir() {
-       local num_dirs=0
-
-       # Ascend to nearest working copy dir in parent dirs
-       while ! get_current_svn_status ; do
-               if [[ "$(pwd)" == "$(dirs -l +1 2>&1)" ]] ; then
-                       echo "!!! Error: No working copy found in parents of current directory."
-                       echo "!!! sunrise-commit must be run from within a working copy tree."
-                       exit 1
-               fi
-               (( num_dirs++ ))
-               pushd .. >/dev/null
-       done
-
-       # Ascend from there to nearest non-working copy dir in parent dirs
-       while get_current_svn_status ; do
-               if [[ "$(pwd)" == "$(dirs -l +1 2>&1)" ]] ; then
-                       break
-               fi
-               (( num_dirs++ ))
-               pushd .. >/dev/null
-       done
-
-       # Working copy base dir is previous dir on stack
-       popd >/dev/null && (( num_dirs-- ))
-    working_copy_base_dir="$(pwd)"
-
-       for (( i=num_dirs ; i > 0 ; i-- )) ; do
-               popd >/dev/null
-       done
-}
-
 create_digests() {
        if [[ $cwd_is_ebuild_dir == 1 ]] ; then
                ebegin "Digesting ebuilds"
@@ -147,7 +115,7 @@ repoman_check() {
        if [[ $opt_norepoman == 0 ]] ; then
                if [[ $cwd_is_ebuild_dir == 1 ]] ; then
                        ebegin "Running repoman"
-                       export PORTDIR_OVERLAY="$working_copy_base_dir"
+                       export PORTDIR_OVERLAY="$(dirname $(dirname $(pwd)))"
                        repoman
                        eend $?
                fi
@@ -344,7 +312,6 @@ if [[ -z "$*" ]] ; then
        exit 1
 fi
 
-check_working_copy_base_dir
 [[ "$(ls)" =~ '\.ebuild' ]] && cwd_is_ebuild_dir=1
 
 pushd . >/dev/null