TortoiseMerge Standalone and patching

780 views
Skip to first unread message

Raymond Meester

unread,
Jun 8, 2011, 4:15:51 AM6/8/11
to us...@tortoisesvn.tigris.org

I’m using the standalone version of TortoiseMerge (latest version) in a script with the Subversion command line client. In this script I first do a checkout from svn, then I apply a patch to my project with TortoiseMerge and then commit the patched project back to svn. I have some questions regarding this process.



1)      Adding and deleting files

Using TortoisMerge to patch modified files is no problem, but for adding or deleting files this doesn’t work directly. This is because my TortoiseMerge standalone isn’t svn version aware. For example when a file is deleted with TortoiseMerge the file is only deleted from my local file system, but the .svn\entries file is not updated.


To workaround this problem I need to apply a svn add –force for the newly added file from the command line. For deleting files I use the svn status command to get the files marked as missing and then apply a svn delete. How can I make the standalone version svn aware, so that it updates the .svn\entries file directly? (By the way: When using TortoiseMerge from within TortoiseSVN the adding works, but for deleting files the same problem counts. In my case I can’t assume that other people using my script have TortoiseSVN installed on their computer).


2)    Don’t show pop-ups again and configure svn from TortoiseMerge Standalone

On the TortoiseMerge help page there is some information about retrieving to older files or other from SVN, but this doesn’t work for me. Every time a newly added file, TortoiseMerge seems to try to look for SVN, but can’t find it (My SVN is on a Red Hat server). It also show a pop-up that it can’t find the original file, but that’s because it’s a new file. Is there a way to turn off the pop-ups and configure the settings for searching for svn?


3)    SVN patch command in 1.7

I'm now on 1.6.16 and will migrate to 1.7 when this is stable enough. SVN 1.7 provides more direct support for patching. Will it then also be possible to apply a patch directly to svn (instead of choosing a directory where a project is checked out)?



4)      Remember user decisions

When I start TortoiseMerge without the command line parameters it pop-ups a screen where I can choose between Merge and Apply unified diff. When I choose Apply unified diff the next I start TortoiseMerge I doesn’t remember my decision



5)      TortoiseSVN and Subversive

In the FAQ there is a entry “TortoiseSVN does not work well with Eclipse”.

“Eclipse copies directories as part of its normal operation, and in a subversion working copy it will copy the .svn directory as well. This causes TortoiseSVN to think that there are versioned files in the bin directory.

If you want to keep using TortoiseSVN and just prevent this from happening, you need to add '**/.svn/' to Eclipse's source exclude list.

But Eclipse has its very own subversion plugin called Subclipse, which makes Eclipse SVN-aware and fixes the problem at source. You can find it at http://subclipse.tigris.org/. After you install Subclipse you need to make a fresh checkout. It will not fix checkouts that were made before it was installed.”

Does this also count for the Subversive client? (Sometimes my Eclipse crashed when importing from svn, killing TSVNCache.exe solves this problem)



6)      GUI or Command Line

The SVN command line tool doesn’t have GUI of course. TortoiseSVN has command line options, but you can’t really use it from command line. In practice I sometimes want to popup a GUI and sometimes not. I would be nice to use TortoiseSVN from the command line, so I can use for both cases. In how far is Tsvncmd suitable?


Stefan Küng

unread,
Jun 9, 2011, 1:50:21 AM6/9/11
to us...@tortoisesvn.tigris.org
On 08.06.2011 10:15, Raymond Meester wrote:
> I’m using the standalone version of TortoiseMerge (latest version) in a
> script with the Subversion command line client. In this script I first
> do a checkout from svn, then I apply a patch to my project with
> TortoiseMerge and then commit the patched project back to svn. I have
> some questions regarding this process.


Just a note:
the next version (1.7) won't get a standalone version of TortoiseMerge
anymore.

> 1) Adding and deleting files
>
> Using TortoisMerge to patch modified files is no problem, but for adding
> or deleting files this doesn’t work directly. This is because my
> TortoiseMerge standalone isn’t svn version aware. For example when a
> file is deleted with TortoiseMerge the file is only deleted from my
> local file system, but the .svn\entries file is not updated.
>
>
> To workaround this problem I need to apply a svn add –force for the
> newly added file from the command line. For deleting files I use the svn
> status command to get the files marked as missing and then apply a svn
> delete. How can I make the standalone version svn aware, so that it
> updates the .svn\entries file directly? (By the way: When using
> TortoiseMerge from within TortoiseSVN the adding works, but for deleting
> files the same problem counts. In my case I can’t assume that other
> people using my script have TortoiseSVN installed on their computer).

TortoiseMerge uses TortoiseProc to execute svn commands. If it's
missing, automatic adds and deletes don't work.
And TSVN automatically deletes missing files properly if they're checked
in the commit dialog, so that's not a problem if you're using TSVN.


> 2) Don’t show pop-ups again and configure svn from TortoiseMerge
> Standalone
>
> On the TortoiseMerge help page there is some information about
> retrieving to older files or other from SVN, but this doesn’t work for
> me. Every time a newly added file, TortoiseMerge seems to try to look
> for SVN, but can’t find it (My SVN is on a Red Hat server). It also show
> a pop-up that it can’t find the original file, but that’s because it’s a
> new file. Is there a way to turn off the pop-ups and configure the
> settings for searching for svn?

It's not looking for svn but for TortoiseProc.exe. If it can't find
that, fetching files from the repo to better apply a patch just can't work.

> 3) SVN patch command in 1.7
>
> I'm now on 1.6.16 and will migrate to 1.7 when this is stable enough.
> SVN 1.7 provides more direct support for patching. Will it then also be
> possible to apply a patch directly to svn (instead of choosing a
> directory where a project is checked out)?

No, you can't apply a patch to a repository. You must have a working
copy and then commit the changes from there.
Anything else would be asking for trouble: how can you be sure that
after applying the patch your project even compiles? You *need* a
working copy for that.

> 4) Remember user decisions
>
> When I start TortoiseMerge without the command line parameters it
> pop-ups a screen where I can choose between Merge and Apply unified
> diff. When I choose Apply unified diff the next I start TortoiseMerge I
> doesn’t remember my decision

It remembers that state in nightly builds. But as I mentioned above:
there won't be a standalone client anymore.

> 5) TortoiseSVN and Subversive
>
> In the FAQ there is a entry “TortoiseSVN does not work well with Eclipse”.
>
> “Eclipse copies directories as part of its normal operation, and in a
> subversion working copy it will copy the .svn directory as well. This
> causes TortoiseSVN to think that there are versioned files in the bin
> directory.
>
> If you want to keep using TortoiseSVN and just prevent this from
> happening, you need to add '**/.svn/' to Eclipse's source exclude list.
>
> But Eclipse has its very own subversion plugin called Subclipse, which
> makes Eclipse SVN-aware and fixes the problem at source. You can find it
> at http://subclipse.tigris.org/. After you install Subclipse you need to
> make a fresh checkout. It will not fix checkouts that were made before
> it was installed.”
>
> Does this also count for the Subversive client? (Sometimes my Eclipse
> crashed when importing from svn, killing TSVNCache.exe solves this problem)

Any svn plugin for Eclipse would work. The FAQ entry just hasn't been
updated recently.

> 6) GUI or Command Line
>
> The SVN command line tool doesn’t have GUI of course. TortoiseSVN has
> command line options, but you can’t really use it from command line. In
> practice I sometimes want to popup a GUI and sometimes not. I would be
> nice to use TortoiseSVN from the command line, so I can use for both
> cases. In how far is Tsvncmd suitable?

TSVN always shows an UI. There is no way to suppress the UI completely.


Stefan

--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2760635

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Raymond Meester

unread,
Jul 1, 2011, 4:45:23 AM7/1/11
to us...@tortoisesvn.tigris.org
Thanks, this is much clearer now. Here under I commented some of the replies


> the next version (1.7) won't get a standalone version of TortoiseMerge
> anymore.

I think this is better as this gives a svn aware version only. For missing files I still needs to use the command line solution as I only want to prompt the user for diff information and not to bother them with the SVN tasks.


>It's not looking for svn but for TortoiseProc.exe. If it can't find
>that, fetching files from the repo to better apply a patch just can't work.

Ok, but in my case I am sure that these files will not exist. Is there away to turn the looking for TortoiseProc.exe off (by option)?


> No, you can't apply a patch to a repository. You must have a working
> copy and then commit the changes from there.
> Anything else would be asking for trouble: how can you be sure that
> after applying the patch your project even compiles? You *need* a
> working copy for that.

Yes, you don't know if the files will compile or are correct. I mostly patch files (xml) that don't need to be compiled. Of course these files still needs to be valid, but I want to check this with continous builds, instead of locally on my computer. So this may protect user, it also limited in certain cases.


> It remembers that state in nightly builds. But as I mentioned above:
> there won't be a standalone client anymore.

Thanks


> Any svn plugin for Eclipse would work. The FAQ entry just hasn't been
> updated recently.

Again thanks


> TSVN always shows an UI. There is no way to suppress the UI completely.

Ok, then I use both clients. One client that can be used from command line and GUI woud be great though.

Reply all
Reply to author
Forward
0 new messages