[Svnmerge] [PATCH] allow the use of the avail command against a URL

Shaddy Baddah shaddy_baddah at hotmail.com
Wed Jun 18 01:48:10 PDT 2008


Dustin J. Mitchell wrote:
>> My understanding is that for a merge, you absolutely need a working copy
>> because you need to queue up the different SVN operations involved in the
>> merge. If you didn't, then you would have to make non-atomic commits of the
>> property changes separate from checking in the actual file changes.
> 
> But none of those changes happen in the branch_dir -- they all happen
> in the current ("trunk") directory.
> 
> Right?  I know I'm still missing something.

Um... have you got things backwards? The first argument in all but the 
init directory refers to the branch directory, i.e. branch_dir.

That means something like:

svn merge http://dev.dummy/repos/someapp/branches/1.x

would not be able to make the modifications it needs.

> Your new patch looks better, but:
>   Why cast cmd to a string?

Two reasons, being consistent with the code above it (shown below), and 
I understood that cmd is returned as non-string type:

     if str(cmd) == "init":
         if len(args) == 1:
             source = args[0]
         elif len(args) > 1:
             optsparser.error("wrong number of parameters", cmd)
     elif str(cmd) in command_table.keys():
         if len(args) == 1:
             branch_dir = args[0]
         elif len(args) > 1:
             optsparser.error("wrong number of parameters", cmd)
     else:
         assert False, "command not handled: %s" % cmd

>   Do all versions of 'svn info' produce the 'Node Kind' key?  Can you
> check has_key first?

You are right, thanks. I've put in a has_key call, which eliminates the 
need to test for an empty dictionary. Please find this attached.

Regards,
Shaddy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allow_avail_url-3.patch
Type: text/x-patch
Size: 1535 bytes
Desc: not available
Url : /pipermail/svnmerge/attachments/20080618/bc601903/attachment.bin 


More information about the Svnmerge mailing list