Check-in [2bde9f9b3d]
Not logged in
Overview

SHA1 Hash:2bde9f9b3d97781ea981f8ac6a0c37b6771e9fae
Date: 2008-10-21 06:10:33
User: drh
Comment:Add "ci" as an alias for "commit". Make provisions for a future "fossil mv" command.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/checkin.c from [4a866358e3] to [efd09b5c80].

@@ -329,10 +329,11 @@
     g.aCommitFile[ii-2] = 0;
   }
 }
 
 /*
+** COMMAND: ci
 ** COMMAND: commit
 **
 ** Usage: %fossil commit ?-m COMMENT? ?--nosign? ?FILE...?
 **
 ** Create a new version containing all of the changes in the current

Modified src/manifest.c from [3d201247f1] to [c90f25b147].

@@ -141,11 +141,11 @@
 */
 int manifest_parse(Manifest *p, Blob *pContent){
   int seenHeader = 0;
   int seenZ = 0;
   int i, lineNo=0;
-  Blob line, token, a1, a2, a3;
+  Blob line, token, a1, a2, a3, a4;
   char cPrevType = 0;
 
   memset(p, 0, sizeof(*p));
   memcpy(&p->content, pContent, sizeof(p->content));
   blob_zero(pContent);
@@ -272,18 +272,18 @@
         }
         break;
       }
 
       /*
-      **     F <filename> <uuid> ?<permissions>?
+      **     F <filename> <uuid> ?<permissions>? ?<old-name>?
       **
       ** Identifies a file in a manifest.  Multiple F lines are
       ** allowed in a manifest.  F lines are not allowed in any
-      ** other control file.  The filename is fossil-encoded.
+      ** other control file.  The filename and old-name are fossil-encoded.
       */
       case 'F': {
-        char *zName, *zUuid, *zPerm;
+        char *zName, *zUuid, *zPerm, *zPriorName;
         md5sum_step_text(blob_buffer(&line), blob_size(&line));
         if( blob_token(&line, &a1)==0 ) goto manifest_syntax_error;
         if( blob_token(&line, &a2)==0 ) goto manifest_syntax_error;
         zName = blob_terminate(&a1);
         zUuid = blob_terminate(&a2);
@@ -292,10 +292,18 @@
         if( blob_size(&a2)!=UUID_SIZE ) goto manifest_syntax_error;
         if( !validate16(zUuid, UUID_SIZE) ) goto manifest_syntax_error;
         defossilize(zName);
         if( !file_is_simple_pathname(zName) ){
           goto manifest_syntax_error;
+        }
+        blob_token(&line, &a4);
+        zPriorName = blob_terminate(&a4);
+        if( zPriorName[0] ){
+          defossilize(zPriorName);
+          if( !file_is_simple_pathname(zPriorName) ){
+            goto manifest_syntax_error;
+          }
         }
         if( p->nFile>=p->nFileAlloc ){
           p->nFileAlloc = p->nFileAlloc*2 + 10;
           p->aFile = realloc(p->aFile, p->nFileAlloc*sizeof(p->aFile[0]) );
           if( p->aFile==0 ) fossil_panic("out of memory");

Modified www/fileformat.wiki from [fff56efd8b] to [3e2ac76c49].

@@ -89,11 +89,11 @@
 </p>
 
 <blockquote>
 <b>C</b> <i>checkin-comment</i><br>
 <b>D</b> <i>time-and-date-stamp</i><br>
-<b>F</b> <i>filename</i> <i>SHA1-hash</i><br>
+<b>F</b> <i>filename</i> <i>SHA1-hash</i> <i>permissions</i> <i>old-name</i><br>
 <b>P</b> <i>SHA1-hash</i>+<br>
 <b>R</b> <i>repository-checksum</i><br>
 <b>U</b> <i>user-login</i><br>
 <b>Z</b> <i>manifest-checksum</i>
 </blockquote>
@@ -123,19 +123,34 @@
 </blockquote>
 
 <p>
 A manifest has zero or more F-cards.  Each F-card defines a file
 (other than the manifest itself) which is part of the baseline that
-the manifest defines.  There are two arguments.  The first argment
+the manifest defines.  There are two, three, or three arguments.
+The first argment
 is the pathname of the file in the baseline relative to the root
 of the project file hierarchy.  No ".." or "." directories are allowed
 within the filename.  Space characters are escaped as in C-card
 comment text.  Backslash characters and newlines are not allowed
 within filenames.  The directory separator character is a forward
 slash (ASCII 0x2F).  The second argument to the F-card is the
 full 40-character lower-case hexadecimal SHA1 hash of the content
-artifact.
+artifact.  The optional 3rd argument defines any special access
+permissions associated with the file.  The only special code currently
+defined is "x" which means that the file is executable.  All files are
+always readable and writable.  This can be expressed by "w" permission
+if desired but is optional.
+The optional 4th argument is the name of the same file as it existed in
+the parent baseline.  If the name of the file is unchanged from its
+parent, then the 4th argument is omitted.
+</p>
+
+<p>
+A manifest has zero or more N-cards.  Each N card records a name changes
+to one of the files in the manifest.  The first argument to the N code is
+the name of the file in the parent baseline.  The second argument is the
+name of the file in the baseline defined by the manifest.
 </p>
 
 <p>
 A manifest has zero or one P-cards.  Most manifests have one P-card.
 The P-card has a varying number of arguments that