svn list of files that are modified in local copy
Asked Answered
C

12

60

I use Tortoise client to checkout/commit my changes to SVN. But I found this little difficult because I'm not able to find List of all files that are changed in my local copy. Is there any short cut or something that I overlooked?

I'm new to SVN. FYI.

Cashmere answered 22/7, 2009 at 21:45 Comment(1)
Maybe a mod can clean this thread up, there are like 10 posts here containing the same answer.Benthos
H
31

The "Check for Modifications" command in tortoise will display a list of all changed files in the working copy. "Commit" will show all changed files as well (that you can then commit). "Revert" will also show changed files (that you can then revert).

Heliogravure answered 22/7, 2009 at 21:50 Comment(2)
Ah! I missed to try "check for modifications"Cashmere
TIL Tortoise had a "check for modifications" function :) Many thanks.Recce
H
124

I'm not familiar with tortoise, but with subversion to linux i would type

svn status

Some googling tells me that tortoise also supports commandline commandos, try svn status in the folder that contains the svn repository.

Horologium answered 22/7, 2009 at 21:50 Comment(4)
The Windows command line client has the same command, so you can use this if you are even using cmd.Knacker
To show only the modified files in the directory: svn status -qBenbow
@BrokenLink svn installation contains all the binaries you want to have. Don't always go for UI. It will be painful and time consumingMorose
@sarat, "It will be painful and time consuming," amen! For some things I use the graphical client (Tortoise SVN), but for things like reporting, the CLI is far better, because it's so much easier to capture the report and send it to somebody for review.Sarre
S
45

I couldn't get svn status -q to work. Assuming you are on a linux box, to see only the files that are modified, run: svn status | grep 'M ' On windows I am not sure what you would do, maybe something with 'FindStr'

Sextain answered 15/12, 2010 at 14:59 Comment(2)
svn st | grep ^M is shorter still :)Creel
svn st|grep ^M is even shorter still, but it's not how I'd answer any question on Stackoverflow unless the question was specifically about code golf. @DavidRivers has the best answer.Treed
H
31

The "Check for Modifications" command in tortoise will display a list of all changed files in the working copy. "Commit" will show all changed files as well (that you can then commit). "Revert" will also show changed files (that you can then revert).

Heliogravure answered 22/7, 2009 at 21:50 Comment(2)
Ah! I missed to try "check for modifications"Cashmere
TIL Tortoise had a "check for modifications" function :) Many thanks.Recce
P
10

Below command will display the modfied files alone in windows.

svn status | findstr "^M"
Patellate answered 4/3, 2013 at 23:36 Comment(1)
In windows I used powershell ad did this svn status | Where-Object {$_.StartsWith("M")}Outlier
S
7

If you really want to list modified files only you can reduce the output of svn st by leading "M" that indicates a file has been modified. I would do this like that:

svn st | grep ^M
Swelter answered 21/3, 2014 at 11:12 Comment(0)
I
6

svn status | grep 'M ' works fine on MacOSX.

I just tested this.

Iconoclast answered 21/10, 2015 at 15:58 Comment(4)
From the command line this is my get-go solution. But the OP asked for a solution in TortoiseSVN.Recce
This only shows the files changed but not the changes in the filesBenthos
Btw this is a duplicate answer, the same has been posted by nils in 2014.Benthos
or svn status | grep ^MIntrojection
B
2

If you only want the filenames and also want any files that have been added (A).

svn st | grep ^[AM] | cut -c9-

Note: The first 7 columns are each one character wide followed by a space then the filename.

Bloody answered 21/7, 2015 at 21:26 Comment(0)
I
1

this should do it in Windows: svn stat | find "M"

Ioyal answered 22/1, 2013 at 22:38 Comment(0)
E
0

svn status | grep ^M will list files which are modified. M - stands for modified :)

Empiric answered 11/9, 2013 at 5:47 Comment(0)
H
0

As said you have to use SVN Check for modification in GUI and tortoiseproc.exe /command:repostatus /path:"<path-to-version-control-file-or-directory>" in CLI to see changes related to the root of the <path-to-version-control-file-or-directory>.

Sadly, but this command won't show ALL local changes, it does show only those changes which are related to the requested directory root. The changes taken separately, like standalone checkouts or orphan external directories in the root subdirectory will be shown as Unversioned or Nested and you might miss to commit/lookup them.

To avoid such condition you have to either call to tortoiseproc.exe /command:repostatus /pathfile:"<path-to-file-with-list-of-items-to-lookup-from>" (see detailed documentation on the command line: https://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-automation.html), or use some 3dparty applications/utilities/scripts to wrap the call.

I has been wrote my own set of scripts for Windows to automate the call from the Total Commander:

https://github.com/andry81/tacklebar/tree/HEAD/src/scripts/scm/tortoisesvn (tortoiseproc_by_nested_wc.bat)

https://github.com/andry81/contools/tree/HEAD/Scripts/Tools/ToolAdaptors/vbs (call_nowindow.vbs)

- Opens TortoiseSVN status dialog for a set of WC directories (always opens to show unversioned changes).

Command:   call_nowindow.vbs
Arguments: tortoisesvn\TortoiseProcByNestedWC.bat /command:repostatus "%P" %S

- Opens TortoiseSVN commit dialogs for a set of WC directories (opens only if has not empty versioned changes).

Command:   call_nowindow.vbs
Arguments: tortoisesvn\TortoiseProcByNestedWC.bat /command:commit "%P" %S

See the README_EN.txt for the latest details (you have to execute the configure.bat before the usage and copy rest of scripts on yourself like call_nowindow.vbs).

Homonym answered 13/6, 2017 at 12:14 Comment(0)
F
0

Using Powershell you can do this:

# Checks for updates and changes in working copy.
# Regex: Excludes unmodified (first 7 columns blank). To exclude more add criteria to negative look ahead.
# -u: svn gets updates
$regex = '^(?!\s{7}).{7}\s+(.+)';
svn status -u | %{ if($_ -match $regex){ $_ } };

This will include property changes. These show in column 2. It will also catch other differences in files that show in columns 3-7.

Sources:

Finegan answered 21/11, 2018 at 17:50 Comment(0)
C
-1

Right click folder -> Click Tortoise SVN -> Check for modification

Conflagrant answered 25/9, 2013 at 14:42 Comment(1)
This has already been posted and is just copied from the already accepted answerBenthos

© 2022 - 2024 — McMap. All rights reserved.