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? Best, Oliver
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
Mojca Miklavec wrote:
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.
how about adding a --filter flag? we might assume that users who have complex setups script the update anyway ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, 25 May 2009, Oliver Buerschaper wrote:
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.
Yep. (Although I'm not quite sure what --keep exactly does here.)
Does not add --delete flag to rsync. Aditya
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
but that's only for texmf-local i assume ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Sat, May 23, 2009 at 21:06, Hans Hagen wrote:
Oliver Buerschaper wrote:
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
but that's only for texmf-local i assume
I'm just guessing that Oliver is asking about the whole installation. texmf-local is left intact anyway. Mojca
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
but that's only for texmf-local i assume
I'm just guessing that Oliver is asking about the whole installation. texmf-local is left intact anyway.
Exactly. I downloaded the minimals distro from scratch and put the entire distro tree under svn control. What I would like to update now is this very installation ... Best, Oliver
participants (4)
-
Aditya Mahajan
-
Hans Hagen
-
Mojca Miklavec
-
Oliver Buerschaper