]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- documented status characters 55/head
authorArvin Schnell <aschnell@suse.de>
Thu, 27 Feb 2014 13:40:52 +0000 (14:40 +0100)
committerArvin Schnell <aschnell@suse.de>
Thu, 27 Feb 2014 13:40:52 +0000 (14:40 +0100)
doc/snapper.xml.in
snapper/File.cc

index ef99d16438c73fc833b28cc3a97139bcb54b35eb..c2f4e56960effd3fd276d9156ff907362287568c 100644 (file)
              </listitem>
            </varlistentry>
          </variablelist>
+         <para>The output consists of a string encoding the status followed by
+         the filename. The characters of the status string are:</para>
+         <orderedlist>
+           <listitem>
+             <para>A "<computeroutput>+</computeroutput>" means the file was
+             created, a "<computeroutput>-</computeroutput>" means the file was deleted. A
+             "<computeroutput>c</computeroutput>" means the content of the file has changed
+             and a "<computeroutput>t</computeroutput>" means the type of the file has
+             changed (e.g. from regular file to directory).</para>
+           </listitem>
+           <listitem>
+             <para>A "<computeroutput>p</computeroutput>" means the permissions
+             are have changed.</para>
+           </listitem>
+           <listitem>
+             <para>An "<computeroutput>u</computeroutput>" means the user
+             ownership has changed.</para>
+           </listitem>
+           <listitem>
+             <para>A "<computeroutput>g</computeroutput>" means the group
+             ownership has changed.</para>
+           </listitem>
+           <listitem>
+             <para>A "<computeroutput>x</computeroutput>" means the extended
+             attribute information has changed.</para>
+           </listitem>
+           <listitem>
+             <para>An "<computeroutput>a</computeroutput>" means the ACL
+             information has changed.</para>
+           </listitem>
+         </orderedlist>
+         <para>If there is no change a "." is outputted.</para>
        </listitem>
       </varlistentry>
 
       <varlistentry>
        <term><option>xadiff <replaceable>number1</replaceable>..<replaceable>number2</replaceable> [files]</option></term>
        <listitem>
-
          <para>Compare the extended attributes between snapshot
          <replaceable>number1</replaceable> and
          <replaceable>number2</replaceable>. See examples below:</para>
-
          <itemizedlist>
            <listitem>
              <para><computeroutput> +:user.foo</computeroutput> for created attributes</para>
index b328c73ded41b0d6a465b0bf8f6407338f6d0ecd..6da3f0da15f401379842362f0b128d2f822690ec 100644 (file)
@@ -742,6 +742,9 @@ namespace snapper
     string
     statusToString(unsigned int status)
     {
+       // If possible keep the characters in sync with e.g. rpm or
+       // rsync. Unfortunately rpm and rsync are not consistent.
+
        string ret;
 
        if (status & CREATED)
@@ -789,7 +792,7 @@ namespace snapper
 
        if (str.length() >= 3)
        {
-           if (str[2] == 'u' || str[2] == 'o')
+           if (str[2] == 'u')
                ret |= OWNER;
        }