[cvsnt-dev] cvsnt - bug in tag operation

Krzysztof Nowak k.nowak at osmosys.tv
Tue Jul 21 08:27:54 BST 2009


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Hi,

I have sent the patch to:

support.cvs at march-hare.com

And here it is:

diff -ur cvsnt-2.5.04.3236/src/rcs.cpp cvsnt-2.5.04.3236-patched/src/rcs.cpp
--- cvsnt-2.5.04.3236/src/rcs.cpp	2008-05-20 13:06:03.000000000 +0200
+++ cvsnt-2.5.04.3236-patched/src/rcs.cpp	2009-07-15 14:51:23.000000000 +0200
@@ -931,17 +931,33 @@
 		}
 	}
 */
+
+    if(!rcsbuf->lockId)
+    {
+        rcsbuf->lockId=do_lock_file(filename, NULL, 0, 1);
+        if(!rcsbuf->lockId)
+            return 0;
+    }
+
 	fp = CVS_FOPEN(filename, FOPEN_BINARY_READ);
 	if(!fp)
 	{
+        /* close lock if it was opened during this call */
+        if (!orig_lockId)
+        {
+            do_unlock_file(rcsbuf->lockId);
+            rcsbuf->lockId=0;
+        }
+
 /*		if(!orig_lockId)
 		{
 			do_unlock_file(rcsbuf->lockId);
 			rcsbuf->lockId=0;
 		}
 */
-		if(existence_error(errno))
+		if(existence_error(errno)) {
 			return 0;
+        }
 
 		error(1,errno,"Couldn't open RCS file %s",fn_root(filename));
 	}
@@ -959,13 +975,6 @@
     rcsbuf->at_string = 0;
     rcsbuf->embedded_at = 0;
 
-	if(!orig_lockId)
-	{
-		rcsbuf->lockId=do_lock_file(filename, NULL, 0, 1);
-		if(!rcsbuf->lockId)
-			return 0;
-	}
-
 	return 1;
 }
 



Arthur Barrett pisze:
> Krzysztof Nowak,
>
>   
>> Please find attached out patch.
>>
>>     
>
>
> Please resend your patch to support.cvs at march-hare.com - and we'll try
> and look at it today.
>
> Regards,
>
>
> Arthur Barrett
>   



More information about the cvsnt-dev mailing list