Fossil SCM

Pull the latest trunk changes into the venks-emacs branch.

drh 2011-06-07 00:48 venks-emacs merge
Commit 690ba8cbdb20c57c35f41aca4210a3dbf95ba7dd
--- src/checkout.c
+++ src/checkout.c
@@ -74,20 +74,10 @@
7474
}
7575
load_vfile_from_rid(vid);
7676
return vid;
7777
}
7878
79
-/*
80
-** Load a vfile from a record ID.
81
-*/
82
-void load_vfile_from_rid(int vid){
83
- if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){
84
- return;
85
- }
86
- vfile_build(vid);
87
-}
88
-
8979
/*
9080
** Set or clear the vfile.isexe flag for a file.
9181
*/
9282
static void set_or_clear_isexe(const char *zFilename, int vid, int onoff){
9383
static Stmt s;
9484
--- src/checkout.c
+++ src/checkout.c
@@ -74,20 +74,10 @@
74 }
75 load_vfile_from_rid(vid);
76 return vid;
77 }
78
79 /*
80 ** Load a vfile from a record ID.
81 */
82 void load_vfile_from_rid(int vid){
83 if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){
84 return;
85 }
86 vfile_build(vid);
87 }
88
89 /*
90 ** Set or clear the vfile.isexe flag for a file.
91 */
92 static void set_or_clear_isexe(const char *zFilename, int vid, int onoff){
93 static Stmt s;
94
--- src/checkout.c
+++ src/checkout.c
@@ -74,20 +74,10 @@
74 }
75 load_vfile_from_rid(vid);
76 return vid;
77 }
78
 
 
 
 
 
 
 
 
 
 
79 /*
80 ** Set or clear the vfile.isexe flag for a file.
81 */
82 static void set_or_clear_isexe(const char *zFilename, int vid, int onoff){
83 static Stmt s;
84
+3 -2
--- src/file.c
+++ src/file.c
@@ -199,12 +199,13 @@
199199
int rc = 0;
200200
#if !defined(_WIN32)
201201
struct stat buf;
202202
if( stat(zFilename, &buf)!=0 ) return 0;
203203
if( onoff ){
204
- if( (buf.st_mode & 0111)!=0111 ){
205
- chmod(zFilename, buf.st_mode | 0111);
204
+ int targetMode = (buf.st_mode & 0444)>>2;
205
+ if( (buf.st_mode & 0111)!=targetMode ){
206
+ chmod(zFilename, buf.st_mode | targetMode);
206207
rc = 1;
207208
}
208209
}else{
209210
if( (buf.st_mode & 0111)!=0 ){
210211
chmod(zFilename, buf.st_mode & ~0111);
211212
--- src/file.c
+++ src/file.c
@@ -199,12 +199,13 @@
199 int rc = 0;
200 #if !defined(_WIN32)
201 struct stat buf;
202 if( stat(zFilename, &buf)!=0 ) return 0;
203 if( onoff ){
204 if( (buf.st_mode & 0111)!=0111 ){
205 chmod(zFilename, buf.st_mode | 0111);
 
206 rc = 1;
207 }
208 }else{
209 if( (buf.st_mode & 0111)!=0 ){
210 chmod(zFilename, buf.st_mode & ~0111);
211
--- src/file.c
+++ src/file.c
@@ -199,12 +199,13 @@
199 int rc = 0;
200 #if !defined(_WIN32)
201 struct stat buf;
202 if( stat(zFilename, &buf)!=0 ) return 0;
203 if( onoff ){
204 int targetMode = (buf.st_mode & 0444)>>2;
205 if( (buf.st_mode & 0111)!=targetMode ){
206 chmod(zFilename, buf.st_mode | targetMode);
207 rc = 1;
208 }
209 }else{
210 if( (buf.st_mode & 0111)!=0 ){
211 chmod(zFilename, buf.st_mode & ~0111);
212
--- src/rebuild.c
+++ src/rebuild.c
@@ -748,10 +748,14 @@
748748
}
749749
if( !privateOnly ){
750750
db_multi_exec(
751751
"UPDATE user SET pw='';"
752752
"DELETE FROM config WHERE name GLOB 'last-sync-*';"
753
+ "DELETE FROM config WHERE name GLOB 'peer-*';"
754
+ "DELETE FROM config WHERE name GLOB 'login-group-*';"
755
+ "DELETE FROM config WHERE name GLOB 'skin:*';"
756
+ "DELETE FROM config WHERE name GLOB 'subrepo:*';"
753757
);
754758
if( bVerily ){
755759
db_multi_exec(
756760
"DELETE FROM concealed;"
757761
"UPDATE rcvfrom SET ipaddr='unknown';"
758762
--- src/rebuild.c
+++ src/rebuild.c
@@ -748,10 +748,14 @@
748 }
749 if( !privateOnly ){
750 db_multi_exec(
751 "UPDATE user SET pw='';"
752 "DELETE FROM config WHERE name GLOB 'last-sync-*';"
 
 
 
 
753 );
754 if( bVerily ){
755 db_multi_exec(
756 "DELETE FROM concealed;"
757 "UPDATE rcvfrom SET ipaddr='unknown';"
758
--- src/rebuild.c
+++ src/rebuild.c
@@ -748,10 +748,14 @@
748 }
749 if( !privateOnly ){
750 db_multi_exec(
751 "UPDATE user SET pw='';"
752 "DELETE FROM config WHERE name GLOB 'last-sync-*';"
753 "DELETE FROM config WHERE name GLOB 'peer-*';"
754 "DELETE FROM config WHERE name GLOB 'login-group-*';"
755 "DELETE FROM config WHERE name GLOB 'skin:*';"
756 "DELETE FROM config WHERE name GLOB 'subrepo:*';"
757 );
758 if( bVerily ){
759 db_multi_exec(
760 "DELETE FROM concealed;"
761 "UPDATE rcvfrom SET ipaddr='unknown';"
762
+5 -4
--- src/update.c
+++ src/update.c
@@ -324,11 +324,11 @@
324324
int ridv = db_column_int(&q, 2); /* RecordID for current */
325325
int idt = db_column_int(&q, 3); /* VFILE entry for target */
326326
int ridt = db_column_int(&q, 4); /* RecordID for target */
327327
int chnged = db_column_int(&q, 5); /* Current is edited */
328328
const char *zNewName = db_column_text(&q,6);/* New filename */
329
- int isexe = db_column_int(&q, 6); /* EXE perm for new file */
329
+ int isexe = db_column_int(&q, 7); /* EXE perm for new file */
330330
char *zFullPath; /* Full pathname of the file */
331331
char *zFullNewPath; /* Full pathname of dest */
332332
char nameChng; /* True if the name changed */
333333
334334
zFullPath = mprintf("%s%s", g.zLocalRoot, zName);
@@ -429,12 +429,13 @@
429429
*/
430430
if( nConflict && !nochangeFlag ){
431431
if( internalUpdate ){
432432
internalConflictCnt = nConflict;
433433
}else{
434
- fossil_print("WARNING: %d merge conflicts - see messages above for details.\n",
435
- nConflict);
434
+ fossil_print(
435
+ "WARNING: %d merge conflicts - see messages above for details.\n",
436
+ nConflict);
436437
}
437438
}
438439
439440
/*
440441
** Clean up the mid and pid VFILE entries. Then commit the changes.
@@ -443,11 +444,11 @@
443444
db_end_transaction(1); /* With --nochange, rollback changes */
444445
}else{
445446
if( g.argc<=3 ){
446447
/* All files updated. Shift the current checkout to the target. */
447448
db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid);
448
- checkout_set_all_exe(vid);
449
+ checkout_set_all_exe(tid);
449450
manifest_to_disk(tid);
450451
db_lset_int("checkout", tid);
451452
}else{
452453
/* A subset of files have been checked out. Keep the current
453454
** checkout unchanged. */
454455
--- src/update.c
+++ src/update.c
@@ -324,11 +324,11 @@
324 int ridv = db_column_int(&q, 2); /* RecordID for current */
325 int idt = db_column_int(&q, 3); /* VFILE entry for target */
326 int ridt = db_column_int(&q, 4); /* RecordID for target */
327 int chnged = db_column_int(&q, 5); /* Current is edited */
328 const char *zNewName = db_column_text(&q,6);/* New filename */
329 int isexe = db_column_int(&q, 6); /* EXE perm for new file */
330 char *zFullPath; /* Full pathname of the file */
331 char *zFullNewPath; /* Full pathname of dest */
332 char nameChng; /* True if the name changed */
333
334 zFullPath = mprintf("%s%s", g.zLocalRoot, zName);
@@ -429,12 +429,13 @@
429 */
430 if( nConflict && !nochangeFlag ){
431 if( internalUpdate ){
432 internalConflictCnt = nConflict;
433 }else{
434 fossil_print("WARNING: %d merge conflicts - see messages above for details.\n",
435 nConflict);
 
436 }
437 }
438
439 /*
440 ** Clean up the mid and pid VFILE entries. Then commit the changes.
@@ -443,11 +444,11 @@
443 db_end_transaction(1); /* With --nochange, rollback changes */
444 }else{
445 if( g.argc<=3 ){
446 /* All files updated. Shift the current checkout to the target. */
447 db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid);
448 checkout_set_all_exe(vid);
449 manifest_to_disk(tid);
450 db_lset_int("checkout", tid);
451 }else{
452 /* A subset of files have been checked out. Keep the current
453 ** checkout unchanged. */
454
--- src/update.c
+++ src/update.c
@@ -324,11 +324,11 @@
324 int ridv = db_column_int(&q, 2); /* RecordID for current */
325 int idt = db_column_int(&q, 3); /* VFILE entry for target */
326 int ridt = db_column_int(&q, 4); /* RecordID for target */
327 int chnged = db_column_int(&q, 5); /* Current is edited */
328 const char *zNewName = db_column_text(&q,6);/* New filename */
329 int isexe = db_column_int(&q, 7); /* EXE perm for new file */
330 char *zFullPath; /* Full pathname of the file */
331 char *zFullNewPath; /* Full pathname of dest */
332 char nameChng; /* True if the name changed */
333
334 zFullPath = mprintf("%s%s", g.zLocalRoot, zName);
@@ -429,12 +429,13 @@
429 */
430 if( nConflict && !nochangeFlag ){
431 if( internalUpdate ){
432 internalConflictCnt = nConflict;
433 }else{
434 fossil_print(
435 "WARNING: %d merge conflicts - see messages above for details.\n",
436 nConflict);
437 }
438 }
439
440 /*
441 ** Clean up the mid and pid VFILE entries. Then commit the changes.
@@ -443,11 +444,11 @@
444 db_end_transaction(1); /* With --nochange, rollback changes */
445 }else{
446 if( g.argc<=3 ){
447 /* All files updated. Shift the current checkout to the target. */
448 db_multi_exec("DELETE FROM vfile WHERE vid!=%d", tid);
449 checkout_set_all_exe(tid);
450 manifest_to_disk(tid);
451 db_lset_int("checkout", tid);
452 }else{
453 /* A subset of files have been checked out. Keep the current
454 ** checkout unchanged. */
455
+7 -2
--- src/vfile.c
+++ src/vfile.c
@@ -70,19 +70,24 @@
7070
if( rid==0 && phantomize ){
7171
rid = content_new(zUuid, phantomize-1);
7272
}
7373
return rid;
7474
}
75
+
7576
7677
/*
77
-** Build a catalog of all files in a checkin.
78
+** Load a vfile from a record ID.
7879
*/
79
-void vfile_build(int vid){
80
+void load_vfile_from_rid(int vid){
8081
int rid, size;
8182
Stmt ins, ridq;
8283
Manifest *p;
8384
ManifestFile *pFile;
85
+
86
+ if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){
87
+ return;
88
+ }
8489
8590
db_begin_transaction();
8691
p = manifest_get(vid, CFTYPE_MANIFEST);
8792
if( p==0 ) return;
8893
db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);
8994
--- src/vfile.c
+++ src/vfile.c
@@ -70,19 +70,24 @@
70 if( rid==0 && phantomize ){
71 rid = content_new(zUuid, phantomize-1);
72 }
73 return rid;
74 }
 
75
76 /*
77 ** Build a catalog of all files in a checkin.
78 */
79 void vfile_build(int vid){
80 int rid, size;
81 Stmt ins, ridq;
82 Manifest *p;
83 ManifestFile *pFile;
 
 
 
 
84
85 db_begin_transaction();
86 p = manifest_get(vid, CFTYPE_MANIFEST);
87 if( p==0 ) return;
88 db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);
89
--- src/vfile.c
+++ src/vfile.c
@@ -70,19 +70,24 @@
70 if( rid==0 && phantomize ){
71 rid = content_new(zUuid, phantomize-1);
72 }
73 return rid;
74 }
75
76
77 /*
78 ** Load a vfile from a record ID.
79 */
80 void load_vfile_from_rid(int vid){
81 int rid, size;
82 Stmt ins, ridq;
83 Manifest *p;
84 ManifestFile *pFile;
85
86 if( db_exists("SELECT 1 FROM vfile WHERE vid=%d", vid) ){
87 return;
88 }
89
90 db_begin_transaction();
91 p = manifest_get(vid, CFTYPE_MANIFEST);
92 if( p==0 ) return;
93 db_multi_exec("DELETE FROM vfile WHERE vid=%d", vid);
94

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button