[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH] Test refresh behavior on hard-linked patches
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH] Test refresh behavior on hard-linked patches |
Date: |
Mon, 12 Jan 2015 14:11:49 +0100 |
If a patch file has hard links, refreshing it should break the links
so that the other copies are left unmodified. Test this behavior to
avoid breaking it accidentally.
---
Jason, I'm afraid your patch breaks this test case. I think that the
following test:
[ -L "$filename" -a "$QUILT_NO_RM_SYMLINKS" != "yes" ]
should instead read:
[ ! -L "$filename" -o "$QUILT_NO_RM_SYMLINKS" != "yes" ]
test/hard-linked-patch.test | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ quilt/test/hard-linked-patch.test 2015-01-12 13:48:06.409360121 +0100
@@ -0,0 +1,36 @@
+If a patch file has hard links, refreshing it should break the links
+so that the other copies are left unmodified.
+
+$ mkdir patches
+
+$ cat > patches/patch
+< --- file.orig
+< +++ file
+< @@ -1 +1 @@
+< -a
+< +b
+$ echo patch -p0 > patches/series
+$ ln patches/patch hardlink
+
+$ echo a > file
+$ quilt push -q
+> Applying patch patches/patch
+> Now at patch patches/patch
+
+$ echo c > file
+$ quilt refresh --no-index
+> Refreshed patch patches/patch
+
+$ cat patches/patch
+> --- file.orig
+> +++ file
+> @@ -1 +1 @@
+> -a
+> +c
+
+$ cat hardlink
+> --- file.orig
+> +++ file
+> @@ -1 +1 @@
+> -a
+> +b
--
Jean Delvare
SUSE L3 Support
- [Quilt-dev] [PATCH] Test refresh behavior on hard-linked patches,
Jean Delvare <=