On Sat, Sep 19, 2009 at 12:55, Steve Borho <st...@borho.org> wrote:
> On Fri, Sep 18, 2009 at 9:52 PM, Yuki KODAMA <endflow....@gmail.com> wrote:
>> On Sat, Sep 19, 2009 at 11:36, Steve Borho <st...@borho.org> wrote:
>>> On Fri, Sep 18, 2009 at 12:21 AM, Yuki KODAMA <endflow....@gmail.com> wrote:
>>>> On Fri, Sep 18, 2009 at 00:04, Steve Borho <st...@borho.org> wrote:
>>>>> On a side node, I think our update dialog should add --check to the
>>>>> update command arguments if the --clean checkbox is not checked.  The
>>>>> user is explicitly selecting the revision to update to, and thus they
>>>>> are aware of any branch hopping that might be necessary.
>>>>
>>>> I'm still working on Update dialog.
>>>> It might be changed drastically, but I'll certainly respect "--check" 
>>>> option.
>>>> I understood what you said with your changeset <6a83929f6085>.
>>>
>>> Actually, my commit was wrong.  Specifying --check prevents you from
>>> doing any update if the working directory is dirty, even if you're not
>>> switching branches.
>>>
>>> So both --clean and --check need to be checkboxes, or we need radio
>>> buttons with 'force clean', 'check clean', 'allow merge'.. or
>>> something similar.
>>
>> I see, I'll start to work on that.
>>
>> BTW, after pulling in synch dialog, it shows bottom bar contained
>> "Update to branch tip"
>> button and "Check update" checkbox.  I suppose we should turn on "Check 
>> update"
>> checkbox in default, how about this?
>> I failed many times at this since I forgot check that checkbox.
>
> Hmm,  'Check Update' probably isn't the best name for it, now that I
> think about it.
>
> '--check' really means 'check if the repo is clean, only then update
> unconditionally'
> '--clean' really means' update unconditionally, discarding local changes'
> neither means 'update and merge local changes, unless it requires a
> branch change'
>
> Three entirely different things.

Indeed. And I confused what "Check update" means in first time.

> It's beginning to dawn on me that the best approach here is to add
> some smarts behind the update feature.  When the user presses update,
> we should determine whether the update requires a branch change.  If
> not, then just let it continue.  If it does, it should check if the
> repo is clean.  If it's clean, we should add the --check flag for the
> user so the update succeeds.   If it requires a branch change, and the
> repo is dirty, we should ask the user whether they want to discard
> changes or offer to open the shelve tool or something.

Good idea.  We can check local changes before starting update.
I'll try to implement it in Update dialog.
The new Update dialog can be used as backend of "Update to branch tip"
button in Synch dialog.  Actual implementation of "Update to branch tip"
action uses CmdDialog to do that.
But I suppose it can utilize the smart features of new Update dialog
instead of CmdDialog.

-- 
Yuki KODAMA

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to