public override p4dn.P4MergeStatus Resolve(p4dn.P4MergeData mergeData) { if (DeferedException != null) { return(p4dn.P4MergeStatus.CMS_QUIT); } try { using (MergeData merger = new MergeData(mergeData)) { MergeAction action = _callback.ResolveFile(merger); switch (action) { case MergeAction.Quit: return(p4dn.P4MergeStatus.CMS_QUIT); case MergeAction.Skip: return(p4dn.P4MergeStatus.CMS_SKIP); case MergeAction.AcceptEdit: return(p4dn.P4MergeStatus.CMS_EDIT); case MergeAction.AcceptMerged: return(p4dn.P4MergeStatus.CMS_MERGED); case MergeAction.AcceptTheirs: return(p4dn.P4MergeStatus.CMS_THEIRS); case MergeAction.AcceptYours: return(p4dn.P4MergeStatus.CMS_YOURS); } } } catch (Exception e) { DeferedException = e; } return(p4dn.P4MergeStatus.CMS_QUIT); }
/// <summary> /// Resolves the file. /// </summary> /// <param name="mergeData">The merge data.</param> /// <returns></returns> public override MergeAction ResolveFile(MergeData mergeData) { // don't handle a merge action here throw new Exceptions.MergeNotImplemented(); }
/// <summary> /// Executed when a 'resolve' command seeks input on how to resolve a file. /// </summary> /// <param name="mergeData">The merge data containing information on the files to resolve.</param> /// <returns>Merge action for the file.</returns> /// <remarks> /// mergeData is disposed after ResolveFile completes. Do not persist a reference to the mergeData object. /// </remarks> public virtual MergeAction ResolveFile(MergeData mergeData) { return(MergeAction.Quit); }
public override p4dn.P4MergeStatus Resolve(p4dn.P4MergeData mergeData) { if (DeferedException != null) return p4dn.P4MergeStatus.CMS_QUIT; try { using (MergeData merger = new MergeData(mergeData)) { MergeAction action = _callback.ResolveFile(merger); switch (action) { case MergeAction.Quit: return p4dn.P4MergeStatus.CMS_QUIT; case MergeAction.Skip: return p4dn.P4MergeStatus.CMS_SKIP; case MergeAction.AcceptEdit: return p4dn.P4MergeStatus.CMS_EDIT; case MergeAction.AcceptMerged: return p4dn.P4MergeStatus.CMS_MERGED; case MergeAction.AcceptTheirs: return p4dn.P4MergeStatus.CMS_THEIRS; case MergeAction.AcceptYours: return p4dn.P4MergeStatus.CMS_YOURS; } } } catch (Exception e) { DeferedException = e; } return p4dn.P4MergeStatus.CMS_QUIT; }
/// <summary> /// Executed when a 'resolve' command seeks input on how to resolve a file. /// </summary> /// <param name="mergeData">The merge data containing information on the files to resolve.</param> /// <returns>Merge action for the file.</returns> /// <remarks> /// mergeData is disposed after ResolveFile completes. Do not persist a reference to the mergeData object. /// </remarks> public virtual MergeAction ResolveFile(MergeData mergeData) { return MergeAction.Quit; }