Domanda

                    SvnUpdateArgs asdf = new SvnUpdateArgs();
                    asdf.AllowObstructions = false;
                    asdf.Depth = SvnDepth.Infinity;
                    asdf.IgnoreExternals = false;
                    asdf.UpdateParents = true;
                    asdf.Revision = SvnRevision.Head;
                    asdf.Conflict += new EventHandler<SvnConflictEventArgs>(asdf_Conflict);

                    asdf.Notify += new EventHandler<SvnNotifyEventArgs>(asdf_Notify);
                    asdf.Progress += new EventHandler<SvnProgressEventArgs>(asdf_Progress);


                    SvnUpdateResult res;

                    client.Status(dir, new EventHandler<SvnStatusEventArgs>(Status_Hook));



                    if (client.Update(dir, asdf, out res))
                    {
                        Console.WriteLine("Updated");
                        Console.WriteLine(res.Revision);
                        Console.WriteLine(res.ResultMap);
                    }

    static void asdf_Conflict(object sender, SvnConflictEventArgs e)
    {
        e.Choice = SvnAccept.TheirsFull;
    }

quindi capisco Aggiornato scritti, ma i file esistenti non vengono aggiornati.se mancano alcuni file, verranno scaricati.ma i file esistenti non vengono aggiornati.

Sto impazzendo con quella roba, per favore aiutami, mio ​​eroe!

È stato utile?

Soluzione

È necessario impostare la proprietà MergedFile.In caso contrario, SharpSVN non unirà il file come hai descritto.

static void asdf_Conflict(object sender, SvnConflictEventArgs e)
{
    e.Choice = SvnAccept.TheirsFull;
    e.MergedFile = e.TheirFile;
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top