bugConcurrent Versions System - Bugs: bug #29507, cvs update -j update timestamp of...


bug #29507: cvs update -j update timestamp of unchanged files

Submitter:  Olexiy Buyanskyy <olexiyb>
Submitted:  Fri 09 Apr 2010 10:30:59 PM UTC
Votes: 80
Category:  Bug Report Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release: 
Fixed Release:  None Fixed Feature Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 28 May 2013 09:35:53 AM UTC, comment #4: 

is there any plans to include the patch mentionned below ?
I have the same problem when I update the same file with 2 different tags, but the same content (cvs diff prints nothing)

Gabriel Kropp <kroppg>
Mon 22 Nov 2010 04:10:59 PM UTC, comment #3: 

This patch should solve cvs update troubles.
Any plans to accept it?

Olexiy Buyanskyy <olexiyb>
Tue 02 Nov 2010 02:13:23 PM UTC, comment #2: 

I have the same case when I do an update on a file with 2 different tags.
If i do so:
$ cvs update -r01 file.cpp
P file.cpp
$ cvs update -r02 file.cpp
P file.cpp

file.cpp is "touched" even if it has the same checksum in the end.

Looking in the CVS client.c source code, function update_entries, I realised that it applies rcs_change_text (around line 2050) even when size == 0 (size of the patch from network).

For test purpose, I modified the following (line 2051):
        if (data->contents == UPDATE_ENTRIES_UPDATE)
            rename_file (temp_filename, filename);
        else if (data->contents == UPDATE_ENTRIES_PATCH)
            patch_failed = 1;
        else if (size > 0)
and it seems to work better for me now.

Are there any kind of desagrement this can cause ?

Sun 11 Apr 2010 02:06:04 PM UTC, comment #1: 

Here is more information
I have tested this with client/server 1.11.23 and 1.12.13. Both give identical results.
But as I discovered this behavior related to -kk option and key words expansion. To reproduce you need a text file myfile.txt with

"$Name$ $Id$"

Use regular checkout command no -kk option

cvs co myfile.txt

You will see expanded variables and timestamp will be set to original time from cvs server. Create new branch for this file.

$ cvs -q tag -b TESTBRANCH myfile.txt

Now use

$ cvs -q update -kk -j HEAD -j TESTBRANCH myfile.txt
U myfile.txt

Because of keywords expansion you will see that file got updated.
And you will see that keyword were collapsed.

If you run again simple

$ cvs -q update
U myfile.txt

Again file will be updated and timestamp will be changed.
To avoid such unneeded updates original checkout has to be done with -kk option.

$ cvs co -kk myfile.txt

But I think nobody care about -kk during checkout.

Imaging situation if you have 1000 source files (all have key words). You modified just single file on development branch. Merged development branch to HEAD in precompiled workspace and now you see recompilation of all files just because of keywords expansion bug.

I think -kk option should collapse keywords of original source before patch file.

Olexiy Buyanskyy <olexiyb>
Fri 09 Apr 2010 10:30:59 PM UTC, original submission:  


Issue is really critical for our company.
We have 20000 C/C++ source files and have several central common libraries. Every patch goes on separate release branch that eventually is merging to HEAD (production) code. During merge we use
cvs -q upd -kk -j tag_HEAD_start_point -j br_REL_BRANCH folder_name

During merge cvs apply properly patches to some files changed on release branch, but it also change timestamp of other files.

We use GNU make to compile our code and make uses timestamp. Because cvs changed timestamp of all files this really triggers make to recompile sources those were not really changed.
So question why CVS change timestamp of all files.

Can this be fixed or new option introduced for merge process?


Olexiy Buyanskyy <olexiyb>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by kroppg (Posted a comment)
  • -email is unavailable- added by kroppg (Voted in favor of this item)
  • -email is unavailable- added by olexiyb (Submitted the item)

    There are 80 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-28 kroppg Carbon-Copy- Added kroppg

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code