Giter Club home page Giter Club logo

svn-scm's Introduction

Subversion source control for VS Code

Visual Studio Marketplace Release Date Visual Studio Marketplace Last Updated Visual Studio Marketplace Version Visual Studio Marketplace Rating

GitHub Workflow Status (with branch) semantic-release

Known Vulnerabilities

Prerequisites

Note: This extension leverages your machine's SVN installation,
so you need to install SVN first.

Windows

If you use TortoiseSVN, make sure the option Command Line Tools is checked during installation and C:\Program Files\TortoiseSVN\bin is available in PATH.

Feedback & Contributing

  • Please report any bugs, suggestions or documentation requests via the Issues
  • Feel free to submit pull requests

Features

Checkout

You can checkout a SVN repository with the SVN: Checkout command in the Command Palette (Ctrl+Shift+P). You will be asked for the URL of the repository and the parent directory under which to put the local repository.


  • Source Control View
  • Quick Diffs in gutter
  • Status Bar
  • Create changelists
  • Add files
  • Revert edits
  • Remove files
  • Create branches
  • Switch branches
  • Create patches
  • Diff changes
  • Commit changes/changelists
  • See commit messages

Blame

Please use a dedicated extension like blamer-vs

Settings

Here are all of the extension settings with their default values. To change any of these, add the relevant Config key and value to your VSCode settings.json file. Alternatively search for the config key in the settings UI to change its value.

{
  // Whether auto refreshing is enabled
  "svn.autorefresh": true,

  // Select all files when commit changes
  "svn.commit.changes.selectedAll": true,

  // Check empty message before commit
  "svn.commit.checkEmptyMessage": true,

  // Set file to status resolved after fix conflicts
  "svn.conflicts.autoResolve": null,

  // Encoding of svn output if the output is not utf-8. When this parameter is null, the encoding is automatically detected. Example: 'windows-1252'.
  "svn.default.encoding": null,

  // The default location to checkout a svn repository.
  "svn.defaultCheckoutDirectory": null,

  // When a file is deleted, what SVN should do? `none` - Do nothing, `prompt` - Ask the action, `remove` - automatically remove from SVN
  "svn.delete.actionForDeletedFiles": "prompt"  // values: ["none","prompt","remove"],

  // Ignored files/rules for `svn.delete.actionForDeletedFiles`(Ex.: file.txt or **/*.txt)
  "svn.delete.ignoredRulesForDeletedFiles": [],

  // Controls whether to automatically detect svn externals.
  "svn.detectExternals": true,

  // Controls whether to automatically detect svn on ignored folders.
  "svn.detectIgnored": true,

  // Show diff changes using latest revision in the repository. Set false to use latest revision in local folder
  "svn.diff.withHead": true,

  // Whether svn is enabled
  "svn.enabled": true,

  // Try the experimental encoding detection
  "svn.experimental.detect_encoding": null,

  // Priority of encoding
  "svn.experimental.encoding_priority": [],

  // Url for the gravitar icon using the <AUTHOR>, <AUTHOR_MD5> and <SIZE> placeholders
  "svn.gravatar.icon_url": "https://www.gravatar.com/avatar/<AUTHOR_MD5>.jpg?s=<SIZE>&d=robohash",

  // Use garavatar icons in log viewers
  "svn.gravatars.enabled": true,

  // Ignores the warning when SVN is missing
  "svn.ignoreMissingSvnWarning": null,

  // List of SVN repositories to ignore.
  "svn.ignoreRepositories": null,

  // Ignores the warning when working copy is too old
  "svn.ignoreWorkingCopyIsTooOld": null,

  // Regex to detect path for 'branches' in SVN URL, 'null' to disable. Subpath use 'branches/[^/]+/([^/]+)(/.*)?' (Ex.: 'branches/...', 'versions/...')
  "svn.layout.branchesRegex": "branches/([^/]+)(/.*)?",

  // Regex group position for name of branch
  "svn.layout.branchesRegexName": 1,

  // Set true to show 'branches/<name>' and false to show only '<name>'
  "svn.layout.showFullName": true,

  // Regex group position for name of tag
  "svn.layout.tagRegexName": 1,

  // Regex to detect path for 'tags' in SVN URL, 'null' to disable. Subpath use 'tags/[^/]+/([^/]+)(/.*)?'. (Ex.: 'tags/...', 'stamps/...')
  "svn.layout.tagsRegex": "tags/([^/]+)(/.*)?",

  // Regex to detect path for 'trunk' in SVN URL, 'null' to disable. (Ex.: '(trunk)', '(main)')
  "svn.layout.trunkRegex": "(trunk)(/.*)?",

  // Regex group position for name of trunk
  "svn.layout.trunkRegexName": 1,

  // Number of commit messages to log
  "svn.log.length": 50,

  // Maximum depth to find subfolders using SVN
  "svn.multipleFolders.depth": 4,

  // Allow to find subfolders using SVN
  "svn.multipleFolders.enabled": null,

  // Folders to ignore using SVN
  "svn.multipleFolders.ignore": ["**/.git","**/.hg","**/vendor","**/node_modules"],

  // Path to the svn executable
  "svn.path": null,

  // Only show previous commits for a given user. Requires svn >= 1.8
  "svn.previousCommitsUser": null,

  // Refresh remote changes on refresh command
  "svn.refresh.remoteChanges": null,

  // Set the interval in seconds to check changed files on remote repository and show in statusbar. 0 to disable
  "svn.remoteChanges.checkFrequency": 300,

  // Show the output window when the extension starts
  "svn.showOutput": null,

  // Show the update message when update is run
  "svn.showUpdateMessage": true,

  // Set left click functionality on changes resource state
  "svn.sourceControl.changesLeftClick": "open diff"  // values: ["open","open diff"],

  // Combine the svn external in the main if is from the same server.
  "svn.sourceControl.combineExternalIfSameServer": null,

  // Allow to count unversioned files in status count
  "svn.sourceControl.countUnversioned": true,

  // Hide unversioned files in Source Control UI
  "svn.sourceControl.hideUnversioned": null,

  // Ignore unversioned files like .gitignore, Configuring this will overlook the default ignore rule
  "svn.sourceControl.ignore": [],

  // Changelists to ignore on commit
  "svn.sourceControl.ignoreOnCommit": ["ignore-on-commit"],

  // Changelists to ignore on status count
  "svn.sourceControl.ignoreOnStatusCount": ["ignore-on-commit"],

  // Set to ignore externals definitions on update (add --ignore-externals)
  "svn.update.ignoreExternals": true
}

svn-scm's People

Contributors

aswinkumar863 avatar azuo avatar bergren2 avatar blashaq avatar bytehow avatar csholmq avatar dbausch avatar dependabot-preview[bot] avatar dependabot[bot] avatar edgardmessias avatar eramitmittal avatar faputa avatar fractalboy avatar fudiou avatar greenkeeper[bot] avatar johnjacobkenny avatar johnstoncode avatar katrinleinweber avatar klren0312 avatar lapo-luchini avatar loncardom avatar mattjackson1 avatar mgierw avatar mjbvz avatar mrlalelu avatar rwatts3 avatar sergi0 avatar simonsiefke avatar theohegemann avatar yanpas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svn-scm's Issues

Click on file opens diff

First of all thanks for the effort to finally implement a SVN extension!

I suggest to improve the feature from #4 and not only open the files from changes list, but open the file in diff view.

Maxes all available CPUs

Running on a vanilla VSCode on macOS Sierra 10.12.6. Looks like a large number of svn status processes are running in parallel.

Feature: Support for non standard layouts

Create option in settings to allow users to define which layout is used.

Example:

{
  "svn.layout.trunk": "trunk",
  "svn.layout.branches": "branches",
  "svn.layout.tags": "tags"
}

Non Standard:

{
  "svn.layout.trunk": "main",
  "svn.layout.branches": "versions",
  "svn.layout.tags": "stamps"
}

Failed match in getRepoUrl

  • VSCode Version: 1.18.1
  • OS Version: Some Arch Linux
  • Extension Version: 1.2.0
  • System Language: en

There was an error on commit.

Cannot read property '1' of null

at svn.js:202:22

    getRepoUrl() {
        return __awaiter(this, void 0, void 0, function* () {
            const info = yield this.svn.info(this.root);
            if (info.exitCode !== 0) {
                throw new Error(info.stderr);
            }
            let repoUrl = info.stdout.match(/<root>(.*?)<\/root>/)[1];
            const match = info.stdout.match(/<url>(.*?)\/(trunk|branches|tags).*?<\/url>/);
            if (match[1]) { // HERE
                repoUrl = match[1];
            }
            return repoUrl;
        });
    }

Which does seem to make sense, as my repository does not care about conventions and has no trunk, branches or tags.

Diff is not encoding aware

  • VSCode Version: 1.18.1
  • OS Version: linux
  • Extension Version: 0.10.0
  • System Language: ru

Steps to Reproduce:

  1. Create repo with file in CP1251 encoding (windows 1251)
  2. Save it and commit to repo. (svn st should return 0 lines)
  3. Open in vs code, lines with cyrillic symbols will have blue diff stripe.
    image

Some cyrillic text:

hello world.
привет мир.

PS Personally I prefer UTF8, but I have to work with legacy code :(

Create guide to use the plugin

I think would be useful a small guide to use the extension. I installed it but I don't see anything in the SCM section.
I had svn on my system: Client Subversion, versione 1.6.17-SlikSvn-tag-1.6.17@1130898-X64

A troubleshooting guide would be appreciated. Thanks

Support for multiple .svn folders

  • VSCode Version: Version 1.18.0 (1.18.0)
  • OS Version: MacOS High-Sierra
  • Extension Version: 0.10.0
  • System Language: English

Steps to Reproduce:
Extension doesn't work if you open folder with multiple projects. Only if you open certain folder with one .svn folder inside.

Is this possible to change?

can't refresh!

  • VSCode Version:
  • OS Version:
  • Extension Version:
  • System Language:

Steps to Reproduce:

symlink paths cant be found

symlink paths cant be resolved by svn.

The paths are the full symlink paths rather than the path the symlink points to.

  • Create repository object to lookup paths and update.

VSCode diff show changes with respect to the latest revision in the repository, not in relation to the local copy.

1.18.1 - VSCode Version:
Windows 7 x64- OS Version:
v1.3.2 - Extension Version:
Russian cp1251- System Language:

Steps to Reproduce:

  1. SVN checkout in one place, for example exampleFolder1 revision 4.
  2. SVN checkout in other place, for example exampleFolder2 revision 4..
  3. Do some changes in folder exampleFolder1, do not commit.
  4. Do some changes in folder exampleFolder2, commit them in trunk. Thats how we get revision 5.
  5. Look into Changes mark in exampleFolder1, it will show to you diff between revision 4 and revision 5 plus your own changes into local copy.

So in my case SVNdiff gives one change in the file based on 50 revision.
svndiff

But VSCode show a lot of changes made by my collegue. Actually 39 changes in gap of 50->64 revision.
vscode diff

I think thats not proper behaviour. I expect same result as SVNdiff gives.

Problems with multi-project workspace

  • VSCode Version: 1.18.1
  • OS Version: Windows 7
  • Extension Version: 1.4.5
  • System Language: English

Steps to Reproduce:

  1. Open a multi-project workspace
  2. Make changes to the first project - changes are recognized correctly
  3. Make changes to the second project - changes are ignored

Seems like the extension only recognizes the first project in a multi-project workspace.

Unable to add file

  • VSCode Version: 1.17.2
  • OS Version: ubuntu 16.04
  • Extension Version: 0.8.7
  • System Language: ru_RU.UTF8

Steps to Reproduce:

  1. Create unversioned files
  2. Click on "+" icon

PS there is nothing interesting in devtools: no stack trace, just the same message with some callbacks.

SCM input box not triggering commit

Hi,

When trying to commit using the SCM input box it appears to do nothing.

If the field is left empty and Ctrl + Enter the command pallet appears but again on entering a description/commit message and pressing Enter it does nothing.

Looking at the change logs it says v5 supports the SCM input box but doesnt appear to be working.

Extra info:
Im using TortoiseSVN client.

The plugin is picking up new changes and files that aren't currently tracked.

Thanks.

Changelist is not updated if changelist reaches zero amount

VSCode Version: 1.17.2
OS Version: ubuntu 16.04
Extension Version: 0.8.9
System Language: ru_RU.UTF8

Steps to Reproduce:

  1. open folder with no changes (svn status returns no lines)
  2. edit some file, save it
  3. Undo changes, save it

File is still in the change list, change list is not updated

See also #23

Diff Changes HEAD is not working

  • VSCode Version: 1.18.1
  • OS Version: Windows10/Ubuntu 14.4
  • Extension Version: 1.0.1
  • System Language: german

Steps to Reproduce:

  1. Goto SCM Explorer
  2. Right mouse on a modified file
  3. Select "Diff Changes HEAD" from context menu

Result: Nothing

The Editor shows the decorations for changes correctly and the quick diff works.

VS Code and Multi-root Workspaces and SVN Support

Hi,

I'm from the VS Code team [we have chatted before :)] and I'm reaching out with some additional resources for adopting multi-root workspaces.

But first let me say thank you for working on SVN Support for VS Code, we really appreciate the work you have done to make VS Code better. Adding support for SVN is a wildly popular request from our community.

The purpose of this issue is that we are very close to releasing a significant new feature for VS Code - Multi-root Workspaces - which is the most requested missing feature. If you have not heard of multi-root workspaces we have described this in several of our recent updates. Today it's only enabled in our insiders release but our intent is to enable it for all users in our next update, targeted for release in the first week of November.

This is a pretty significant change and over the last four months we have updated pretty much all of VS Code to be Multi-root aware as well as updated all of our own extensions. In the process of doing this we have created a set of guidelines for Extension Authors to follow to ensure their extension can fully leverage the awesomeness that is Multi-root workspaces.

Our Request:

There are a few things to review in your extension to ensure it can fully capitalize on Multi-root Workspaces....

  • Check you do not make use of the (now deprecated) workspace.rootPath property, there is a proposed migration path and sample for this case.
  • Review any settings you contribute or change, specifically you need to review whether some of the settings can be applied on a resource (= file location) level instead of being global (= workspace level).

How Can We Help/Resources:

We realize we are asking for your help here - our goal is to make sure that your extensions works well with multi-root and continues to be loved by the community. The guide above outlines the changes that are required and we have a samples as well.

But we are sure you will have questions and we thought one way we could look to help is by getting a number of the team members (myself included) to be ready to respond to questions on a Slack Channel that we will dedicate to this issue. To join that channel simply follow this link.

Again thank you for being part of the VS Code community - we appreciate everything you have done. With the release of Multi-root Workspaces we will be shipping our most requested feature, together we can really help this feature light up for users.

Happy Coding!
Sean McBreen

p.s. we are also working on some additional cool SCM features - specifically SCM Status in the Explorer and Inline SCM Actions more details on these will be included in the next release.

// cc @bpasero @joaomoreno

SVN is not available in your PATH

  • VSCode Version:1.17.2
  • OS Version:Windows 10
  • Extension Version:PHP
  • System Language:

SVN is not available in your PATH. svn-scm is unable to run!

I am getting this error in visual studio code .I have already set my SVN path in environmental variables. Still getting this issues .

Steps to Reproduce:

1.Install the extension .
2.Open any project .It is showing on top

Feature Request: Commit selected items

Great extension so far.

Using it today I found myself only wanting to commit certain files.

Would be good if you could commit only the selected files in the list rather than all of them.

Dan

Conflicted files dont show properly in source control view

  • VSCode Version:1.18.1
  • OS Version:Fedora 25
  • Extension Version:1.3.2
  • System Language:English

Steps to Reproduce:

  1. Have a conflicted file in the repository.
  2. Look at source control view
  3. In changes, file is missing the conflicted icon
  4. In not tracked the conflict files are shown

For example defaults.conf is missing icons in changes and in not tracked the following are listed.
defaults.conf.mine
defaults.conf.r1
defaults.conf.r5

Diff in UTF-8 nonenglish text

  • VSCode Version: 1.18.1
  • OS Version: Ubuntu 16.4
  • Extension Version: 1.4.5
  • System Language:german

Steps to Reproduce:

  1. Open an unchanged UTF-8 file with Umlauts
  2. See the decoration for a diff
  3. Open diff or diff to head

image

The file above is unchanged, local and remote file are both in UTF-8. See the diff regarding the Umlauts.
This is also in the side by side diff. VSCode is set to UTF-8. svn diff schows no difference.

Open file on click

A suggestion.
Open file when you do click on filename in changes list.

changelist is not updated on "+" icon click

VSCode Version: 1.17.2
OS Version: ubuntu 16.04
Extension Version: 0.8.10
System Language: ru_RU.UTF8

Steps to Reproduce:

  1. create unversioned file
  2. press "+" in vcs sidebar
  3. file is actually added, but sidebar is not refreshed

Configure source path

I have a project which includes various modules and I'm only working on one of them with VSCode, the problem using this extension is that it tries to look up for the files where the .svn folder is (in the parent directory) when it should look up on the current directory. For example my main project is en C:\project but the project I'm working on with VSCode is in C:\project\VSCproject, if I have a file on this folder it tries to compare it with the file in C:\project\file.x and not in C:\project\VSCproject\file.x
And thats why this extension should allow us to configure the path we are working on to specify where it should look up for the files.

Error: "Unable to update", if nothing to update

  • VSCode Version: 1.18.1
  • OS Version: CentOS 7.4
  • Extension Version: 1.4.0
  • System Language: DE

Steps to Reproduce:

  1. Open directory with clean workspace and unchanged repo
  2. Select "Svn update"
  3. Error message "Unable to update" occurs

I think this message is a little bit misleading.

Clicking

When VSCode is open in a sub-directory of a SVN repo, clicking on the file in the changes list fails (this was working before 0.8.x I think).
The error is that the sub-directory is ignored.

For example:

 main
    .svn
    subdir  --> VSCode opened from this directory
        file

When clicking on file, VSC reports "file not found (main/file)".

Add confirm to revert command

  • VSCode Version:1.18.1
  • OS Version:Fedora 25
  • Extension Version:1.3.2
  • System Language:English

Probably should add a confirm to the revert command to avoid accidents.

Changes mark shows on nonenglish comments.

In this codeblock was no changes, but comments marked like they have been changed. It appears all over the file only when russian comment posted. Using Windows1251 encoding.
iddqd

Support SVN lower than 1.9

  • VSCode Version: 1.17.2
  • OS Version: CentOS 7
  • Extenstion Version: 0.8.7

Please provide support for SVN 1.7. CentOS ships only with that old version.

Unable to commit

@ZhiPing-S

"hi , after i apply commit, it pop up message "Unable to commit", can you give me some advices ? thanks"

Tortoise SVN diff/merge tool in VSCode

  • VSCode Version: 1.18.1
  • OS Version: Window 10 64bit (fall creator update)
  • Extension Version: 1.4.5
  • System Language: English

Hi,

I can't make the SVN plugin to use the Tortoise SVN diff/merge tools instead of the default ones from the SVN plugin.

I have both Visual Studio 2017 and VSCode installed, so I reference both to make sure there's no confusion.

I have the VisualSVN extension installed for Visual Studio 2017 and configured to use Tortoise SVN diff/merge tools. This works flawlessly.

When configuring VSCode, I can't find the similar setting anywhere.

I read the Readme and checked in VSCode that $env:Path (in the powershell output) has Tortoise SVN path (which it does). I also installed the Commande Line Tools correctly.

Yet, no matter what I do in VSCode, I get the SVN diff/merge tools, not the Tortoise SVN ones.

Could help me a bit please, I'm totally new to VSCode. What am I missing?

Status of files outside of current folder being shown

It seems that, if I have VS Code open to a specific folder within my overall SVN repository, the SCM provider is now showing the status of files everywhere in the SVN repository rather than just the files that are under the current folder somewhere.

For example, if VS Code is open to C:\Dev\branches\A\1\, and my SVN repo's root is C:\Dev, I'm now seeing the status of all files in C:\Dev, rather than just those under C:\Dev\branches\A\1\.

I believe this might be a recent regression, I'm fairly sure it used to only show the status of files within the currently open folder.

Unable to commit

  • VSCode Version:1.18.1
  • OS Version:windows 10 1709
  • Extension Version:1.20
  • System Language:chinese

Steps to Reproduce:

1.Only show Unable to commit,Can't find any error msg.Include output panel
2.I use Command Line Tools is normal

Source control doesn't display anything when working in a svn rep subfolder.

  • VSCode Version: 1.18.1
  • OS Version: Win7 x86
  • Extension Version: 1.4.1
  • System Language:

Don't know exactly if it is intended or not, but since last version (1.4.1), i'm unable to see source control :

Im working on a multi-languages project, and used to only open the folder where i work, which is a actually a subfolder belonging to a large SVN repository that contains everything.

Worked until 1.4, doesn't work anymore now.
Only work when opening root folder.

Was practical.

Thanks for you precious work
Guema

Right Click Commit Changes -> esc [to cancel] -> commits "undefined"

  • VSCode Version: 1.19.0-insider 6e4cc713eeb96c7a67453c33e5954e659fcfe3c0 (today's version)
  • OS Version: Ubuntu 17.04
  • Extension Version: 0.9.0
  • System Language: EN-US

Steps to Reproduce:

  1. Right-click file to commit from 'changes' pane
  2. Prompt for commit message says 'esc' to cancel, press esc
  3. Successful commit message displayed
  4. Check repo, file is committed with message "undefined"

Thanks for the great plugin, and the new feature(s)!

Commit action commits all changed files in tree, not only in local folder

VSCode Version: 1.17.2
OS Version: ubuntu 16.04
Extension Version: 0.8.7
System Language: ru_RU.UTF8

Steps to Reproduce:

x
  .svn
  y
    file1
    file2
  file3
  ...

Your current folder is y, all files are versioned, file1 and file3 are modified. Commit action commits file1 and file3, but it must commit only file1

Feature request: Add more file-options e.g. Revert

Hi, Currently , if you open the context menu for a file in the SourceControl view, there is only one option:

"Commit Selected".

image

Consider adding more options, especially "Revert" would be very useful here. (Other a nice-to-have but not a must-have)

See the context-menus of an Eclipse SVN-Plugin in comparison.

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.