Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating an SVN patch including new directories
    primarykey
    data
    text
    <p>First of all excuse the long text, but I am trying to be as detailed as I can.</p> <p>I am developing for an open-source project (DSpace). I don't have commit privileges to their SVN repo, so I checked out the source and have been using git to manage my versioning.</p> <p>During my development, i've added several directories and binary files to my project.</p> <p>The time has come to make an SVN patch file so I can give something back to the community! Netbeans does this for me through the Team-> Create patch option. So far so good...</p> <p>However, when I check out the source again on another machine and use the patch command:</p> <pre class="lang-sh prettyprint-override"><code># get current dir DIR="$( cd "$( dirname "$0" )" &amp;&amp; pwd )" #check out dspace release svn co http://scm.dspace.org/svn/repo/dspace/tags/dspace-1.7.2/ -q $DIR/dspace-1.7.2/ #apply patch cd $DIR/dspace-1.7.2 echo "Now running at "&amp;&amp; pwd patch --dry-run -N -p0 &lt; $DIR/patches/patch.diff cd $DIR </code></pre> <p><strong>Running Script</strong></p> <p>When i run this script, all goes well until the patch attempts to modify a file inside one of my new directories. It says the following:</p> <pre class="lang-sh prettyprint-override"><code>can't find file to patch at input line 9214 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI/jquery-ui.js |--- dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI/jquery-ui.js Base (BASE) |+++ dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI/jquery-ui.js Locally Modified (Based On LOCAL) -------------------------- File to patch: </code></pre> <p><strong>Before it stops, it is able to patch a bunch of files which were already in the original dspace release,</strong> so I think it is not related to the -pXXX parameter of the patch command (nevertheless i have tried up to -p10) ... I think this only happens when I attempt to patch a file inside one of my created directories. <strong>My guess is that the patch command does not create new directories, so it cannot find the correct paths.</strong> </p> <p>This is driving me nuts, please does anyone have any idea how to solve my problem?</p> <p>Thanks in advance!</p> <p>EDIT: </p> <p>I've added the --verbose option to the patch command. Here's the result:</p> <pre class="lang-sh prettyprint-override"><code>-------------------------- Patching file dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/autocompleter/styles.css using Plan A... Hunk #1 succeeded at 1. Hmm... The next patch looks like a unified diff to me... can't find file to patch at input line 9214 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI/jquery-ui.js |--- dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI/jquery-ui.js Base (BASE) |+++ dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI/jquery-ui.js Locally Modified (Based On LOCAL) -------------------------- File to patch: </code></pre> <p>After I quit the patch process, if i make </p> <pre class="lang-sh prettyprint-override"><code>cd dspace-1.7.2/dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI </code></pre> <p>I get:</p> <pre class="lang-sh prettyprint-override"><code>-bash: cd: dspace-1.7.2/dspace-jspui/dspace-jspui-webapp/src/main/webapp/static/js/jQueryUI: No such file or directory </code></pre> <p>This is one of the folders I added during the development, which proves that patch is not creating these new folders.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload