diff options
-rw-r--r-- | quilt/import.in | 3 | ||||
-rw-r--r-- | quilt/new.in | 3 | ||||
-rw-r--r-- | quilt/scripts/patchfns.in | 27 | ||||
-rw-r--r-- | quilt/setup.in | 3 | ||||
-rw-r--r-- | quilt/upgrade.in | 3 | ||||
-rw-r--r-- | test/no-series.test | 7 | ||||
-rw-r--r-- | test/three.test | 4 |
7 files changed, 32 insertions, 18 deletions
diff --git a/quilt/import.in b/quilt/import.in index 4ce8bec..8e4b393 100644 --- a/quilt/import.in +++ b/quilt/import.in @@ -6,6 +6,9 @@ # # See the COPYING and AUTHORS files for more details. +# One of the few commands which does not need a series file +skip_series_check=1 + # Read in library functions if [ "$(type -t patch_file_name)" != function ] then diff --git a/quilt/new.in b/quilt/new.in index 2cc5297..73050c3 100644 --- a/quilt/new.in +++ b/quilt/new.in @@ -6,6 +6,9 @@ # # See the COPYING and AUTHORS files for more details. +# One of the few commands which does not need a series file +skip_series_check=1 + # Read in library functions if [ "$(type -t patch_file_name)" != function ] then diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in index 2029d62..e8525e0 100644 --- a/quilt/scripts/patchfns.in +++ b/quilt/scripts/patchfns.in @@ -489,12 +489,7 @@ find_first_patch() local patch=$(cat_series | head -n 1) if [ -z "$patch" ] then - if [ -e "$SERIES" ] - then - printf $"No patches in series\n" >&2 - else - printf $"No series file found\n" >&2 - fi + printf $"No patches in series\n" >&2 return 1 fi @@ -506,12 +501,7 @@ find_last_patch() local patch=$(cat_series | tail -n 1) if [ -z "$patch" ] then - if [ -e "$SERIES" ] - then - printf $"No patches in series\n" >&2 - else - printf $"No series file found\n" >&2 - fi + printf $"No patches in series\n" >&2 return 1 fi @@ -1168,9 +1158,13 @@ then elif [ -f "$QUILT_PC/$QUILT_SERIES" ] then SERIES=$QUILT_PC/$QUILT_SERIES + # We know the file exists, no need to re-check later + skip_series_check=1 elif [ -f "$QUILT_SERIES" ] then SERIES=$QUILT_SERIES + # We know the file exists, no need to re-check later + skip_series_check=1 else SERIES=$QUILT_PATCHES/$QUILT_SERIES fi @@ -1193,6 +1187,15 @@ then exit 1 fi fi + +if [ -z "$skip_series_check" ] +then + if [ ! -f "$SERIES" ] + then + printf $"No series file found\n" >&2 + exit 1 + fi +fi ### Local Variables: ### mode: shell-script ### End: diff --git a/quilt/setup.in b/quilt/setup.in index 93fd1b1..2a6279b 100644 --- a/quilt/setup.in +++ b/quilt/setup.in @@ -6,8 +6,9 @@ # # See the COPYING and AUTHORS files for more details. -# Version check is irrelevant to this command. +# Version and series checks are irrelevant to this command. skip_version_check=1 +skip_series_check=1 # Read in library functions if [ "$(type -t patch_file_name)" != function ] diff --git a/quilt/upgrade.in b/quilt/upgrade.in index 6471162..21ecf83 100644 --- a/quilt/upgrade.in +++ b/quilt/upgrade.in @@ -6,8 +6,9 @@ # # See the COPYING and AUTHORS files for more details. -# Don't abort in version check. +# Don't abort in version or series check. skip_version_check=1 +skip_series_check=1 # Read in library functions if [ "$(type -t patch_file_name)" != function ] diff --git a/test/no-series.test b/test/no-series.test index 4ae52ff..c95ae8d 100644 --- a/test/no-series.test +++ b/test/no-series.test @@ -26,9 +26,9 @@ $ quilt next > No series file found $ quilt pop -> No patch removed +> No series file found $ quilt pop -v -> No patch removed +> No series file found $ quilt previous > No series file found @@ -42,9 +42,12 @@ $ quilt refresh > No series file found $ quilt series +> No series file found $ quilt series -v +> No series file found $ quilt snapshot +> No series file found $ quilt top > No series file found diff --git a/test/three.test b/test/three.test index 02ecaf5..8302ada 100644 --- a/test/three.test +++ b/test/three.test @@ -29,9 +29,9 @@ > No series file found $ quilt pop - > No patch removed + > No series file found $ echo %{?} - > 2 + > 1 $ quilt new patch1.diff > Patch %{P}patch1.diff is now on top |