On 07.04.2009 19:36, Steve Borho wrote:
> On Tue, Apr 7, 2009 at 12:29 PM, Adrian Buehlmann <[email protected]> wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <[email protected]>
>> # Date 1239116128 -7200
>> # Node ID 26037a7c9cbf7c350b5f2d72a52707fd5254091c
>> # Parent  ce64e8c75a3a851b0ff9d062efebd2820d6db237
>> clone: set selected folder as default source and destination folder
>>
>> Currently, the selected folder is set as the destination folder and
>> the source folder is empty, which doesn't make much sense IMHO.
>> I often clone a local master repo and would like to say 'clone' on that
>> repo's folder using the context menu. Setting that same folder name as
>> default for the destination in the dialog allows me to quickly edit the
>> destination.
>>
>> Example use case: I have a clone of 'http://bitbucket.org/tortoisehg/crew/'
>> on my disk at 'W:\thg-crew'. When I want to start working on a new patch I
>> want to clone 'W:\thg-crew' to, let's say, 'W:\thg-crew-hack1'.
>> With this patch I can open an explorer window on 'W:', point at the 
>> 'thg-crew'
>> folder and choose "Create Clone" from the context menu, which then opens the
>> clone dialog with 'W:\thg-crew' preset both for the source and destination 
>> repo
>> folder. I can then quickly edit the destination folder name by appending
>> '-hack1' to it.
> 
> While I think the end-goal is correct, I don't want to make
> modifications to the context menu logic just for this fix.  Can your
> patch simply use os.getcwd() as the default source, or perhaps run a
> root finding algorithm on os.getcwd()?

Hmm. This looks all a bit strange to me. We have a selection from explorer,
why use getcwd()?

The way hggtk\clone.py is picking up file arguments is just a bit odd:

if __name__ == "__main__":
    import sys
    opts = {}
    opts['cwd'] = os.getcwd()
    opts['files'] = sys.argv[1:]
    run(**opts)

I'll probably leave that aside for the moment. Maybe you see a better way
to achieve what I was trying.



------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to