summaryrefslogblamecommitdiffstats
path: root/test/perms.test
blob: af595cbb3a267fbf9e933a64686d0a8449c5945d (plain) (tree)
1
2
3
4
5
6
                   

                       

                        
                                                            







                                               
                                                            


                           
                       








                                                
                                                            


                           
                       









                                                                         
                                                            





                                       
                                                            




                                       
	$ umask 022
	$ mkdir patches

	$ echo foo > foo
	$ chmod 704 foo
	$ ls -l foo | awk '{ print substr($1, 1, 10), $NF }'
	> -rwx---r-- foo

	$ quilt new test.diff
	> Patch %{P}test.diff is now on top

	$ quilt add foo
	> File foo added to patch %{P}test.diff

	$ ls -l foo | awk '{ print substr($1, 1, 10), $NF }'
	> -rwx---r-- foo

	$ echo foobar > foo
	$ quilt refresh
	> Refreshed patch %{P}test.diff

	$ quilt new test2.diff
	> Patch %{P}test2.diff is now on top

	$ quilt add foo
	> File foo added to patch %{P}test2.diff

	$ chmod 702 foo
	$ ls -l foo | awk '{ print substr($1, 1, 10), $NF }'
	> -rwx----w- foo

	$ echo foobaz > foo
	$ quilt refresh
	> Refreshed patch %{P}test2.diff

The permissions of foo as they were in patch2 are lost here (there is no
way to preserve them in the patch). Quilt will restore the permissions of
the backup file.

	$ quilt pop -q
	> Removing patch %{P}test2.diff
	> Now at patch %{P}test.diff

	$ ls -l foo | awk '{ print substr($1, 1, 10), $NF }'
	> -rwx---r-- foo

	$ quilt push -q
	> Applying patch %{P}test2.diff
	> Now at patch %{P}test2.diff

	$ ls -l foo | awk '{ print substr($1, 1, 10), $NF }'
	> -rwx---r-- foo

	$ quilt pop -q
	> Removing patch %{P}test2.diff
	> Now at patch %{P}test.diff