summaryrefslogblamecommitdiffstats
path: root/test/new.test
blob: 1ca7cadc8db333ecffaa259aad4c27240095aa6c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                      
                                   



                                                     
                                                           

                       
                                   



                                                                
                                                          


                       
                                    









                                                                             
                       





                       
	$ mkdir -p d/patches
	$ cd d

	$ echo reject > f
	$ echo p.diff > patches/series
	$ cat > patches/p.diff
	< --- d.orig/f
	< +++ d/f
	< @@ -1 +1 @@
	< -old
	< +new
	< --- d.orig/g
	< +++ d/g
	< @@ -0,0 +1 @@
	< +added


	$ quilt push
	> Applying patch %{P}p.diff
	> patching file f
	> Hunk #1 FAILED at 1.
	> 1 out of 1 hunk FAILED -- rejects in file f
	> patching file g
	> Patch %{P}p.diff does not apply (enforce with -f)

	$ quilt push -f
	> Applying patch %{P}p.diff
	> patching file f
	> Hunk #1 FAILED at 1.
	> 1 out of 1 hunk FAILED -- saving rejects to file f.rej
	> patching file g
	> Applied patch %{P}p.diff (forced; needs refresh)

	$ echo new > f
	$ quilt refresh
	> Refreshed patch %{P}p.diff
	$ cat patches/p.diff | sed -e "s/\\t.*//"
	> Index: d/f
	> ===================================================================
	> --- d.orig/f
	> +++ d/f
	> @@ -1 +1 @@
	> -reject
	> +new
	> Index: d/g
	> ===================================================================
	> --- /dev/null
	> +++ d/g
	> @@ -0,0 +1 @@
	> +added

	$ cd ..
	$ rm -rf d