Jump to content

Help with arc patch


Recommended Posts

Hi,

I am new to phabricator and arcanist.

I have an updated local clone of 0ad git repository.


I am trying to apply some new revision, for example D375. Now, if I try arc patch D375 and I get:

 INFO  Base commit is not in local repository; trying to fetch.
Created and checked out branch arcpatch-D375.
Checking patch binaries/data/mods/public/simulation/components/ProductionQueue.js...
error: while searching for:

               Engine.PostMessage(this.entity, MT_ProductionQueueChanged, { });

               // If this is the first item in the queue, start the timer
               if (!this.timer)
               {
                       var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
                       this.timer = cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "ProgressTimeout", g_ProgressInterval, {});
               }
       }
       else
       {

error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:383
error: while searching for:
                               // Unset flag that training is blocked
                               cmpPlayer.UnBlockTraining();
                       }

                       if (item.technologyTemplate)
                       {
                               // Mark the research as started.
                               var cmpTechnologyManager = QueryOwnerInterface(this.entity, IID_TechnologyManager);
                               cmpTechnologyManager.StartedResearch(item.technologyTemplate, true);
                       }

                       item.productionStarted = true;
                       if (item.unitTemplate)
                               Engine.PostMessage(this.entity, MT_TrainingStarted, {"entity": this.entity});
               }

               // If we won't finish the batch now, just update its timer
               if (item.timeRemaining > time)
               {
                       item.timeRemaining -= time;
                       // send a message for the AIs.
                       Engine.PostMessage(this.entity, MT_ProductionQueueChanged, { });
                       break;
               }

               if (item.unitTemplate)
               {
                       var numSpawned = this.SpawnUnits(item.unitTemplate, item.count, item.metadata);

error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:718
error: while searching for:
                       {
                               // All entities spawned, this batch finished
                               cmpPlayer.UnReservePopulationSlots(item.population * numSpawned);
                               time -= item.timeRemaining;
                               this.queue.shift();
                               // Unset flag that training is blocked
                               cmpPlayer.UnBlockTraining();

error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:747
error: while searching for:
                                       cmpSoundManager.PlaySoundGroup(template.soundComplete, this.entity);
                       }

                       time -= item.timeRemaining;

                       this.queue.shift();
                       Engine.PostMessage(this.entity, MT_ProductionQueueChanged, { });
               }
       }

       // If the queue's empty, delete the timer, else repeat it
       if (this.queue.length == 0)
       {
               this.timer = undefined;

               // Unset flag that training is blocked
               // (This might happen when the player unqueues all batches)
               cmpPlayer.UnBlockTraining();

error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:794
error: while searching for:
       else
       {
               var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
               this.timer = cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "ProgressTimeout", g_ProgressInterval, data);
       }
};

ProductionQueue.prototype.PauseProduction = function()
{
       this.timer = undefined;
       this.paused = true;
};

ProductionQueue.prototype.UnpauseProduction = function()
{
       this.paused = false;
       var cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
       this.timer = cmpTimer.SetTimeout(this.entity, IID_ProductionQueue, "ProgressTimeout", g_ProgressInterval, {});
};

ProductionQueue.prototype.OnValueModification = function(msg)
{
       // if the promotion requirements of units is changed,

error: patch failed: binaries/data/mods/public/simulation/components/ProductionQueue.js:813
Applying patch binaries/data/mods/public/simulation/components/ProductionQueue.js with 5 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.

 Patch Failed! 
Usage Exception: Unable to apply patch!

 

Anyone can provide some help on this?
 

 

Thanks!

Edited by crazy_Baboon
Link to comment
Share on other sites

hello, thats probably because differential you are trying to apply is outdated and not compatible with current version of svn. 

If you need any help or you have questions feel free to visit webchat.quakenet.org/?channels=0ad-dev

 

@crazy_Baboon do you run arch patch command from the directory where LICENSE and README files are ?

Edited by Angen
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...