You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by DeRose Jonathan <de...@bah.com> on 2003/06/13 17:31:38 UTC

A question about file diffs...

I am trying to prepare patch files for the dynamic style declaration using
the resource bundle.  I am using WinCvs and am having two different problems
with the diff reports it churns out...

1) The first is that it says there are changes to code I haven’t touched.
Example: “cvs diff –u BaseHandlerTag.java”
@@ -881,9 +1019,9 @@
     }

     /**
-     * Searches all scopes for the bean and calls BeanUtils.getProperty()
with the
+     * Searches all scopes for the bean and calls BeanUtils.getProperty()
with the
      * given arguments and converts any exceptions into JspException.
-     *
+     *
      * @param beanName The name of the object to get the property from.
      * @param property The name of the property to get.
      * @return The value of the property.

I can fix most of these by adding –i –w, but the example on the jakarta site
says just a –u is preferred.
http://jakarta.apache.org/site/source.html#Patches

-------------------------------------------------------------

2) The second problem is it picks up the wrong changes, this seems to happen
99% of the time with javadoc function headers.
Example: “cvs diff –u BaseInputTag.java”
@@ -150,26 +145,6 @@
     }

     /**
-     * Return the property name.
-     */
-    public String getProperty() {
-
-        return (this.property);
-
-    }
-
-    /**
-     * Set the property name.
-     *
-     * @param property The new property name
-     */
-    public void setProperty(String property) {
-
-        this.property = property;
-
-    }
-
-    /**
      * Return the number of rows for this field.
      */
     public String getRows() {

If you took out all the code with ‘-‘ it would still be correct.  But its
not the *correct* list of changes that were made.

-------------------------------------------------------------

This all leads to my question of what exactly are done with the diff
reports? If they are just read by developers trying to understand the
proposed changes, I think I would want to tinker a bit to make the report as
accurate as possible to the changes being made. If they are actually used in
a script to actually *make* the changes down the road, I need to not touch
the report.

Thanks for any insight,
Jonathan



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Re: A question about file diffs...

Posted by James Mitchell <jm...@apache.org>.
Sounds like you need to turn off "trim spaces from end of line" on your text
editor.


--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
770-822-3359
AIM:jmitchtx


----- Original Message ----- 
From: "DeRose Jonathan" <de...@bah.com>
To: "Struts Developers List" <st...@jakarta.apache.org>
Sent: Friday, June 13, 2003 11:31 AM
Subject: A question about file diffs...


> I am trying to prepare patch files for the dynamic style declaration using
> the resource bundle.  I am using WinCvs and am having two different
problems
> with the diff reports it churns out...
>
> 1) The first is that it says there are changes to code I haven't touched.
> Example: "cvs diff -u BaseHandlerTag.java"
> @@ -881,9 +1019,9 @@
>      }
>
>      /**
> -     * Searches all scopes for the bean and calls BeanUtils.getProperty()
> with the
> +     * Searches all scopes for the bean and calls BeanUtils.getProperty()
> with the
>       * given arguments and converts any exceptions into JspException.
> -     *
> +     *
>       * @param beanName The name of the object to get the property from.
>       * @param property The name of the property to get.
>       * @return The value of the property.
>
> I can fix most of these by adding -i -w, but the example on the jakarta
site
> says just a -u is preferred.
> http://jakarta.apache.org/site/source.html#Patches
>
> -------------------------------------------------------------
>
> 2) The second problem is it picks up the wrong changes, this seems to
happen
> 99% of the time with javadoc function headers.
> Example: "cvs diff -u BaseInputTag.java"
> @@ -150,26 +145,6 @@
>      }
>
>      /**
> -     * Return the property name.
> -     */
> -    public String getProperty() {
> -
> -        return (this.property);
> -
> -    }
> -
> -    /**
> -     * Set the property name.
> -     *
> -     * @param property The new property name
> -     */
> -    public void setProperty(String property) {
> -
> -        this.property = property;
> -
> -    }
> -
> -    /**
>       * Return the number of rows for this field.
>       */
>      public String getRows() {
>
> If you took out all the code with '-' it would still be correct.  But its
> not the *correct* list of changes that were made.
>
> -------------------------------------------------------------
>
> This all leads to my question of what exactly are done with the diff
> reports? If they are just read by developers trying to understand the
> proposed changes, I think I would want to tinker a bit to make the report
as
> accurate as possible to the changes being made. If they are actually used
in
> a script to actually *make* the changes down the road, I need to not touch
> the report.
>
> Thanks for any insight,
> Jonathan
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org