Fossil

Check-in [c38fbe23]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Revert default diffFlags used for annotation as it is on trunk. This way, the annotation behavior is fully configurable with the diffFlags (0, DIFF_IGNORE_SOLWS, DIFF_IGNORE_EOLWS or both flags, or newly-to-be-implemented flags). Merging of the "diff-eolws" branch to trunk can be considered independant of the current discussion on the ML.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | diff-eolws
Files: files | file ages | folders
SHA1:c38fbe235e7476132f32084af84b9745fc6a67a7
User & Date: jan.nijtmans 2014-03-05 11:59:25
Context
2014-03-05
21:29
Add new --ignore-space-at-sol, -ignore-space-at-eol and -w options to "fossil diff" and "fossil stash diff" commands. Modify annotation/blame such that any change (eol-whitespace too) is considered a change, after ML request. check-in: e663d5e3 user: jan.nijtmans tags: trunk
15:11
merge diff-eolws check-in: 91add0e0 user: jan.nijtmans tags: diff-eolws
11:59
Revert default diffFlags used for annotation as it is on trunk. This way, the annotation behavior is fully configurable with the diffFlags (0, DIFF_IGNORE_SOLWS, DIFF_IGNORE_EOLWS or both flags, or newly-to-be-implemented flags). Merging of the "diff-eolws" branch to trunk can be considered independant of the current discussion on the ML. check-in: c38fbe23 user: jan.nijtmans tags: diff-eolws
08:43
Merge trunk. Fix indentation in annotation/blame commands/pages, which was broken since [28b39cc516]. Changelog entry. check-in: bcb22ce1 user: jan.nijtmans tags: diff-eolws
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/diff.c.

1970
1971
1972
1973
1974
1975
1976
1977

1978

1979
1980
1981
1982
1983
1984
1985
....
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
....
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
** of the following structure.
*/
typedef struct Annotator Annotator;
struct Annotator {
  DContext c;       /* The diff-engine context */
  struct AnnLine {  /* Lines of the original files... */
    const char *z;       /* The text of the line */
    unsigned short n;    /* Number of bytes (omitting sol/eol spacing) */

    unsigned short indent; /* Indenting (number of initial spaces) */

    short int iVers;     /* Level at which tag was set */
  } *aOrig;
  int nOrig;        /* Number of elements in aOrig[] */
  int nVers;        /* Number of versions analyzed */
  int bLimit;       /* True if the iLimit was reached */
  struct AnnVers {
    const char *zFUuid;   /* File being analyzed */
................................................................................
** will release it when it is finished with it.
*/
static int annotation_start(Annotator *p, Blob *pInput){
  int i;

  memset(p, 0, sizeof(*p));
  p->c.aTo = break_into_lines(blob_str(pInput), blob_size(pInput),&p->c.nTo,
                              DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
  if( p->c.aTo==0 ){
    return 1;
  }
  p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
  for(i=0; i<p->c.nTo; i++){
    p->aOrig[i].z = p->c.aTo[i].z;
    p->aOrig[i].n = p->c.aTo[i].h & LENGTH_MASK;
................................................................................
*/
static int annotation_step(Annotator *p, Blob *pParent, int iVers){
  int i, j;
  int lnTo;

  /* Prepare the parent file to be diffed */
  p->c.aFrom = break_into_lines(blob_str(pParent), blob_size(pParent),
                                &p->c.nFrom, DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
  if( p->c.aFrom==0 ){
    return 1;
  }

  /* Compute the differences going from pParent to the file being
  ** annotated. */
  diff_all(&p->c);







|
>
|
>







 







|







 







|







1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
....
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
....
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
** of the following structure.
*/
typedef struct Annotator Annotator;
struct Annotator {
  DContext c;       /* The diff-engine context */
  struct AnnLine {  /* Lines of the original files... */
    const char *z;       /* The text of the line */
    short int n;         /* Number of bytes. Whether this omits sol/eol spacing
                            depends on the diffFlags) */
    unsigned short indent; /* Indenting (number of initial spaces, only used
                              if sol-spacing is ignored in the diffFlags) */
    short int iVers;     /* Level at which tag was set */
  } *aOrig;
  int nOrig;        /* Number of elements in aOrig[] */
  int nVers;        /* Number of versions analyzed */
  int bLimit;       /* True if the iLimit was reached */
  struct AnnVers {
    const char *zFUuid;   /* File being analyzed */
................................................................................
** will release it when it is finished with it.
*/
static int annotation_start(Annotator *p, Blob *pInput){
  int i;

  memset(p, 0, sizeof(*p));
  p->c.aTo = break_into_lines(blob_str(pInput), blob_size(pInput),&p->c.nTo,
                              DIFF_IGNORE_EOLWS);
  if( p->c.aTo==0 ){
    return 1;
  }
  p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
  for(i=0; i<p->c.nTo; i++){
    p->aOrig[i].z = p->c.aTo[i].z;
    p->aOrig[i].n = p->c.aTo[i].h & LENGTH_MASK;
................................................................................
*/
static int annotation_step(Annotator *p, Blob *pParent, int iVers){
  int i, j;
  int lnTo;

  /* Prepare the parent file to be diffed */
  p->c.aFrom = break_into_lines(blob_str(pParent), blob_size(pParent),
                                &p->c.nFrom, DIFF_IGNORE_EOLWS);
  if( p->c.aFrom==0 ){
    return 1;
  }

  /* Compute the differences going from pParent to the file being
  ** annotated. */
  diff_all(&p->c);