yinwu
yinwu

Reputation: 53

What does _M mean in svn status result

i used "svn merge" command to merge the code change from branch to trunk. After merge finished, i found some files which are not modified in branch were makred "M" in trunk. i diff these files and get below result(for example);

xxxxx$ svn diff knife.sh

Property changes on: knife.sh
___________________________________________________________________
Modified: svn:mergeinfo
    Merged /branches/development/LTE1227/knife.sh:r12198-14851

When i commit the code, i found these file was marked as "_M" in svn editor() like below

   2 --This line, and those below, will be ignored--
   ... ...
   10 _M   xxx.sh
   11 _M   knife.sh
   ... ...

What does _M mean in svn editor? And I don't want to commit these changes and how i can remove these "_M" files from commit list?

Upvotes: 5

Views: 3225

Answers (1)

Patrick Quirk
Patrick Quirk

Reputation: 23757

It means the file has property changes, and in your case it's the svn:mergeinfo property. In SVN 1.7.0 an API was introduced to distinguish between modifications to a file's contents or to its SVN properties. While a property change looks like this:

_M   knife.sh

A text-only modification looks like what you'd expect:

M   knife.sh

The svn:mergeinfo property is added to files when you merge from a different source into them, i.e. from trunk to branch. SVN uses this information to remember what has and has not already been merged so it doesn't get merged again.

It's typically good to leave it on (assuming you have a recent version where some bugs with it appearing too often were fixed), but if you really want to get rid of it you can just revert that file. If it's already committed, use the propdel command:

svn propdel svn:mergeinfo knife.sh

Upvotes: 5

Related Questions