I suggest you ...

Allow update when I lock out of date file

Now, when I have to lock out of date file, I only get warning message "One or more your local resources are out of date.. and so on" with "OK" button. It would be better have dialog with something similar "One or more your local resources are out of date. Do you want get latest version?" with button Yes, No.

15 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
gavenda shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • sarimak commented  ·   ·  Flag as inappropriate

    a patch for LockCommand.cs follows:

    try
    {
    e.GetService<IProgressRunner>().RunModal("Locking",
    delegate(object sender, ProgressWorkerArgs ee)
    {
    SvnLockArgs la = new SvnLockArgs();
    la.StealLock = stealLocks;
    la.Comment = comment;
    ee.Client.Lock(files, la);
    });
    }
    catch (Exception ex)
    {
    if (ex.InnerException is SvnFileSystemOutOfDateException)
    {
    DialogResult diagResult = MessageBox.Show("There is newer revision in the repository. Do you want to update to latest and lock?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
    if (diagResult == DialogResult.Yes)
    {
    SvnUpdateResult ur;
    ProgressRunnerArgs pa = new ProgressRunnerArgs();
    pa.CreateLog = true;

    SvnRevision updateTo = SvnRevision.Head;
    SvnDepth depth = SvnDepth.Empty;

    // Update
    e.GetService<IProgressRunner>().RunModal(CommandStrings.UpdatingTitle, pa,
    delegate(object sender, ProgressWorkerArgs ee)
    {
    SvnUpdateArgs ua = new SvnUpdateArgs();
    ua.Depth = depth;
    ua.Revision = updateTo;
    e.GetService<IConflictHandler>().RegisterConflictHandler(ua, ee.Synchronizer);
    ee.Client.Update(files, ua, out ur);
    });

    // Lock
    e.GetService<IProgressRunner>().RunModal("Locking",
    delegate(object sender, ProgressWorkerArgs ee)
    {
    SvnLockArgs la = new SvnLockArgs();
    la.StealLock = stealLocks;
    la.Comment = comment;
    ee.Client.Lock(files, la);
    });
    }
    }
    else
    throw ex;
    }

Feedback and Knowledge Base