[Top][All Lists]

[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

Hash: SHA1

James Juran <James.Juran@baesystems.com> 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:
> ---
>               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?


        -- Mark
Version: GnuPG v1.2.3 (FreeBSD)


reply via email to

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