svn

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package svn command parser.

Index

Constants

View Source
const (
	CliName     = "svn"   // 命令名称
	BaseVersion = "1.8.3" // 依赖版本信息
)

@Date: 2018/12/5 0005 22:25 @Author: Joshua Conero @Name: Svn 包(基于 svn 命令)

Variables

This section is empty.

Functions

func Call

func Call(args ...string) (string, error)

Call call the system command

func Version

func Version() string

Version get the svn version information

Types

type Bridge

type Bridge struct {
	Path string // svn path
}

Bridge cLI command bridge between SVN and SVN

func (*Bridge) GetArgs

func (b *Bridge) GetArgs(args ...string) []string

func (*Bridge) Info

func (b *Bridge) Info(pArgs ...string) (XmlInfo, error)

Info svn info --xml

func (*Bridge) Log

func (b *Bridge) Log(pArgs ...string) (XmlLog, error)

Log svn log --xml

type XICommit

type XICommit struct {
	XMLName  xml.Name `xml:"commit"`
	Author   string   `xml:"author"`
	Date     string   `xml:"date"`
	Revision string   `xml:"revision,attr"`
}

XICommit commit

type XIEnter

type XIEnter struct {
	XMLName  xml.Name `xml:"entry"`
	Path     string   `xml:"path,attr"`
	Revision string   `xml:"revision,attr"`
	Kind     string   `xml:"kind,attr"`
	Url      string   `xml:"url"`
	Repo     XIRepo
	Wc       XIWc
	Commit   XICommit
}

XIEnter enter

type XIRepo

type XIRepo struct {
	XMLName xml.Name `xml:"repository"`
	Root    string   `xml:"root"`
	Uuid    string   `xml:"uuid"`
}

XIRepo repository

type XIWc

type XIWc struct {
	XMLName xml.Name `xml:"wc-info"`
	Path    string   `xml:"wcroot-abspath"`
}

XIWc wc-info

type XLEnter

type XLEnter struct {
	XMLName  xml.Name `xml:"logentry"`
	Revision string   `xml:"revision,attr"`
	Author   string   `xml:"author"`
	Date     string   `xml:"date"`
	Msg      string   `xml:"msg"`
}

type XmlInfo

type XmlInfo struct {
	XMLName xml.Name `xml:"info"`
	Enter   XIEnter
}

XmlInfo info xml format

func (*XmlInfo) Author

func (x *XmlInfo) Author() string

Author get author

func (*XmlInfo) Date

func (x *XmlInfo) Date() string

func (*XmlInfo) Revision

func (x *XmlInfo) Revision() string

Revision get the svn version/revision

func (*XmlInfo) Url

func (x *XmlInfo) Url() string

Url the the repository url

func (*XmlInfo) Uuid

func (x *XmlInfo) Uuid() string

type XmlLog

type XmlLog struct {
	XMLName xml.Name  `xml:"log"`
	Enter   []XLEnter `xml:"logentry"`
}

XmlLog log --xml output format

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL