bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: update -A doesn't clear sticky -kk on modified file


From: Mark D. Baushke
Subject: Re: update -A doesn't clear sticky -kk on modified file
Date: Thu, 26 Jan 2006 10:40:46 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Juran <address@hidden> writes:

> Our source tree has the $Revision$ keyword in each file.  I've been
> developing changes on a branch, and now I want to merge those changes to
> the trunk.  So I follow the procedure documented in section 5.10 of the
> manual ("Merging and keywords") for avoiding conflicts from the
> keywords:
> 
> cvs co -jbranchname -kk modulename
> 
> This performs the merge as expected, but leaves my files with a sticky
> option of -kk.  So I run
> 
> cvs update -A
> 
> to clear the sticky tag, but this only clears the sticky tag on
> unmodified files.  The modified files are left with -kk as sticky
> options.
> 
> Classify_File() contains this code, which seems to indicate this this is
> the intended behavior:
> 
> ---
> #ifdef XXX_FIXME_WHEN_RCSMERGE_IS_FIXED
>               if (strcmp (vers->entdata->options ?
>                      vers->entdata->options : "", vers->options) == 0)
>                   ret = T_MODIFIED;
>               else
>                   ret = T_NEEDS_MERGE;
> #else
>               /* Files with conflict markers and new timestamps fall through
>                * here, but they need to.  T_CONFLICT is an error in
>                * commit_fileproc, whereas T_MODIFIED with conflict markers
>                * is caught but only warned about.  Similarly, update_fileproc
>                * currently reregisters a file that was conflicted but lost
>                * its markers.
>                */
>               ret = T_MODIFIED;
>               sticky_ck (finfo, aflag, vers);
> #endif
> ---
> 
> Is there any other way to clear a sticky -kk option, and get back to the
> default keyword substitution on a modified file?  

You have a few possibilities:

  a) 'cvs commit' commit the file. Then do the 'cvs update -A' 
  b) 'cvs diff -c filename' > filename.patch
     'mv filename filename.modified'
     'cvs update -A filename'
     'patch < filename.patch'

> Is there any hope of implementing this feature?

Patches will be considered if test cases are also provided for sanity.sh

> If not, would you be interested in a patch to update the documentation
> for -A to indicate that it doesn't clear sticky -k options if the file
> has been modified?

Yes.

        -- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFD2ReuCg7APGsDnFERAmFMAKCM9w7hHFr148KSKeiuzJuaY4YH7ACgyHxc
4QNi89LUOV6msohkyLS5Y6E=
=5Rwv
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]