[dev-context] Making a minimals update svn friendly

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sat May 23 18:16:53 CEST 2009


On Sat, May 23, 2009 at 17:03, Oliver Buerschaper wrote:
> Hi folks,
>
> what I would like to do is updating a minimal context tree which is under
> svn version control ... the problem with the current setup is that
>
> mtxrun mtx-update.lua
>
> deletes all .svn subdirectories in the destination directories it touches
> for synchronization. This is bad because it completely spoils version
> control.
>
> However, by supplying the additional flag
>
> --filter="P .svn"
>
> to the rsync command one should be able to sync and still preserve .svn
> subdirectories. Hence I suggest the following patches to
>
> mtxrun
> mtx-update.lua
>
> in order to make the updating process svn friendly:
>
> diff bin/mtxrun bin.orig/mtxrun
> 9384c9384
> < --~           ["flags"]      = "-rpztlv --stats --filter='P .svn'",
> ---
>> --~           ["flags"]      = "-rpztlv --stats",
>
> diff bin/mtx-update.lua bin.orig/mtx-update.lua
> 459c459
> <     states.set("rsync.flags.normal", environment.argument("flags"),
> "-rpztlv --stats --filter='P .svn'", true) -- ok
> ---
>>     states.set("rsync.flags.normal", environment.argument("flags"),
>> "-rpztlv --stats", true) -- ok
>
> This works on my machine (Mac OS X 10.5.7). I'm afraid I cannot test this on
> other platforms at the moment ...
>
> What do you guys think?

That sounds fine to me. Though I suspect that one could add
    --flags="-rpzltv --filter='P .svn'"
when calling rsync, this would probably fail because of
    states.set("rsync.flags.normal", environment.argument("flags"),
"-rpztlv --stats", true) -- ok
    states.set("rsync.flags.delete", nil, "--delete", true) -- ok
so the second one is hardcoded.

To what Aditya has answered: --keep option is probably not the
solution to what Oliver wants to achieve. I suspect that he indeed
wants to delete obsolete files, but preserve .svn.

This needs to be fixed by Hans, but my preference would probably be to
fix the behaviour for the other hardcoded delete flag. Exactly because
there might pop up other users wanting to ignore their git, mercurial,
darcs, ... files. And it would make sense to document that behaviour
somewhere.

Mojca


More information about the dev-context mailing list