1VCSTOOLS(1)                        vcstools                        VCSTOOLS(1)
2
3
4

NAME

6       vcstools - vcstools Documentation
7
8       The  vcstools module provides a Python API for interacting with differ‐
9       ent version control systems (VCS/SCMs).  The VcsClient  class  provides
10       an  API for seamless interacting with Git, Mercurial (Hg), Bzr and SVN.
11       The focus of the API is manipulating on-disk checkouts  of  source-con‐
12       trolled trees.  Its main use is to support the rosinstall tool.
13

GENERAL VCS/SCM API

15       The VcsClient class provides a generic API for
16
17       · Subversion (svn)
18
19       · Mercurial (hg)
20
21       · Git (git)
22
23       · Bazaar (bzr)
24
25       class vcstools.VcsClient(vcs_type, path)
26              API  for interacting with source-controlled paths independent of
27              actual version-control implementation.
28
29              Parameters
30
31                     · vcs_type – type of VCS to use (e.g. ‘svn’, ‘hg’, ‘bzr’,
32                       ‘git’), str
33
34                     · path  –  filesystem  path where code is/will be checked
35                       out , str
36
37              path_exists() -> bool
38
39                     Returns
40                            True if path exists on disk.
41
42              get_path() -> str
43
44                     Returns
45                            filesystem path this client is initialized with.
46
47              url_matches(self, url, url_or_shortcut) -> bool
48                     client can decide whether the url and the other  url  are
49                     equivalent.  Checks string equality by default
50
51                     Parameters
52                            url_or_shortcut   –  url  or  shortcut  (e.g.  bzr
53                            launchpad url)
54
55                     Returns
56                            bool if params are equivalent
57
58              get_version([spec=None]) -> str
59
60                     Parameters
61                            spec 
62
63                            token for identifying repository revision desired.
64                            Token  might be a tagname, branchname, version-id,
65                            or SHA-ID depending on the VCS implementation.
66
67                            · svn: anything accepted by svn info --help,  e.g.
68                              a  revnumber,  {date}, HEAD, BASE, PREV, or COM‐
69                              MITTED
70
71                            · git: anything accepted by git log, e.g.  a  tag‐
72                              name, branchname, or sha-id.
73
74                            · hg:  anything accepted by hg log -r, e.g. a tag‐
75                              name, sha-ID, revision-number
76
77                            · bzr: revisionspec as returned by bzr help  revi‐
78                              sionspec, e.g. a tagname or revno:<number>
79
80
81                     Returns
82                            current  revision number of the repository.  Or if
83                            spec is provided, the globally  unique  identifier
84                            (e.g.  revision  number,  or SHA-ID) of a revision
85                            specified by some token.
86
87              get_remote_version(self, fatch=False) -> str
88                     Find an identifier for the current  revision  on  remote.
89                     Token  spec  might  be  a  tagname, version-id, SHA-ID, …
90                     depending on the VCS implementation.
91
92                     Parameters
93                            fetch – if False, only local  information  may  be
94                            used
95
96                     Returns
97                            current revision number of the remote repository.
98
99              get_current_version_label() -> str
100                     Find an description for the current local version.  Token
101                     spec might be a branchname, version-id, SHA-ID, … depend‐
102                     ing on the VCS implementation.
103
104                        returns
105                               short   description   of  local  version  (e.g.
106                               branchname, tagename).
107
108              checkout(url[, version=''][, verbose=False][, shallow=False])
109                     Checkout the given URL to the path associated  with  this
110                     client.
111
112                     Parameters
113
114                            · url – URL of source control to check out
115
116                            · version – specific version to check out
117
118                            · verbose – flag to run verbosely
119
120                            · shallow  –  flag to create shallow clone without
121                              history
122
123              update(version)
124                     Update the local checkout from upstream source control.
125
126              detect_presence() -> bool
127
128                     Returns
129                            True if path has  a  checkout  with  matching  VCS
130                            type,  e.g.  if  the type of this client is ‘svn’,
131                            the checkout at the path is managed by Subversion.
132
133              get_vcs_type_name() -> str
134
135                     Returns
136                            type of VCS this client is initialized with.
137
138              get_url() -> str
139
140                     Returns
141                            Upstream URL that this code was checked out from.
142
143              get_branch_parent()
144                     (Git Only)
145
146                     Returns
147                            parent branch.
148
149              get_diff([basepath=None])
150
151                     Parameters
152                            basepath – compute diff relative to this path,  if
153                            provided
154
155                     Returns
156                            A string showing local differences
157
158              get_status([basepath=None[, untracked=False]])
159                     Calls scm status command. semantics of untracked are dif‐
160                     ficult to generalize. In SVN, this  would  be  new  files
161                     only.  In  git,  hg, bzr, this would be changes that have
162                     not been added for commit.
163
164                     Parameters
165
166                            · basepath – status path will be relative to this,
167                              if provided.
168
169                            · untracked  –  If  True,  also  show changes that
170                              would not commit
171
172                     Returns
173                            A string summarizing locally modified files
174
175       Example:
176
177          import vcstools
178
179          # interrogate an existing tree
180          client = vcstools.VcsClient('svn', '/path/to/checkout')
181
182          print client.get_url()
183          print client.get_version()
184          print client.get_diff()
185
186          # create a new tree
187          client = vcstools.VcsClient('hg', '/path/to/new/checkout')
188          client.checkout('https://bitbucket.org/foo/bar')
189
190       vcstools is available on pypi and can be installed via pip
191
192          pip install vcstools
193
194       or easy_install:
195
196          easy_install vcstools
197
198       The vcstools module is meant to be used  as  a  normal  Python  module.
199       After it has been installed, you can import it normally and do not need
200       to declare as a ROS package dependency.
201

DEVELOPER’S GUIDE

203   Code API
204   Packages
205   vcstools Package
206   vcstools Package
207       Library for tools that need to interact with ROS-support  version  con‐
208       trol systems.
209
210       vcstools.setup_logger()
211              creates a logger 'vcstools'
212
213   bzr Module
214       bzr vcs support.
215
216       vcstools.bzr.BZRClient
217              alias of vcstools.bzr.BzrClient
218
219       class vcstools.bzr.BzrClient(path)
220              Bases: vcstools.vcs_base.VcsClientBase
221
222              checkout(url,  version=None, verbose=False, shallow=False, time‐
223              out=None)
224                     Attempts to create a local repository given a remote url.
225                     Fails  if  a  target  path  exists,  unless it's an empty
226                     directory.  If a version is provided, the  local  reposi‐
227                     tory  will  be  updated  to that revision. It is possible
228                     that after a failed call to checkout, a repository  still
229                     exists,  e.g. if an invalid revision was given.  If shal‐
230                     low is provided, the scm client may  checkout  less  than
231                     the  full  repository  history to save time / disk space.
232                     If a timeout is specified,  any  pending  operation  will
233                     fail  after the specified amount (in seconds). NOTE: this
234                     parameter might or might not be honored, depending on VCS
235                     client  implementation.   :param  url:  where to checkout
236                     from :type url: str :param version: token for identifying
237                     repository  revision  :type  version: str :param shallow:
238                     hint to checkout less than a full repository :type  shal‐
239                     low:  bool :param timeout: maximum allocated time to per‐
240                     form operation :type shallow: int :returns: True if  suc‐
241                     cessful
242
243              export_repository(version, basepath)
244                     Calls  scm  equivalent  to  svn export, removing scm meta
245                     information and tar gzip'ing the repository  at  a  given
246                     version to the given basepath.
247
248                     Parameters
249                            version  --  version  of the repository to export.
250                            This can
251
252                     be a branch, tag, or path  (svn).   When  specifying  the
253                     version as a path for svn, the path should be relative to
254                     the  root  of  the  svn  repository,  i.e.  'trunk',   or
255                     'tags/1.2.3',  or  './'  for  the root.  :param basepath:
256                     this is the path to the tar gzip, excluding the extension
257                     which  will  be  .tar.gz :returns: True on success, False
258                     otherwise.
259
260              get_affected_files(revision)
261                     Get the files that were affected by a  specific  revision
262                     :param  revision:  SHA  or  revision number.  :returns: A
263                     list of strings with the files  affected  by  a  specific
264                     commit
265
266              get_branches(local_only=False)
267                     Returns a list of all branches in the vcs repository.
268
269                     Parameters
270                            local_only  --  if  True  it  will only list local
271                            branches
272
273                     Returns
274                            list of branches in the  repository,  []  if  none
275                            exist
276
277              get_current_version_label()
278                     Find an description for the current local version.  Token
279                     spec might  be  a  branchname,  version-id,  SHA-ID,  ...
280                     depending on the VCS implementation.
281
282                     Returns
283                            short  description  of local version (e.g. branch‐
284                            name, tagename).
285
286                     Return type
287                            str
288
289              get_diff(basepath=None)
290
291                     Parameters
292                            basepath -- diff paths will be relative  to  this,
293                            if any
294
295                     Returns
296                            A string showing local differences
297
298                     Return type
299                            str
300
301              static get_environment_metadata()
302                     For  debugging purposes, returns a dict containing infor‐
303                     mation about the environment, like the version of the SCM
304                     client,  or  version of libraries involved.  Suggest con‐
305                     sidering  keywords  "version",  "dependency",  "features"
306                     first.   :returns: a dict containing relevant information
307                     :rtype: dict
308
309              get_log(relpath=None, limit=None)
310                     Calls scm log command.
311
312                     This returns a list of dictionaries  with  the  following
313                     fields:
314
315                            · id: the commit SHA or revision number
316
317                            · date: the date the commit was made (python date‐
318                              time)
319
320                            · author: the name of the author of the commit, if
321                              available
322
323                            · email:  the  e-mail address of the author of the
324                              commit
325
326                            · message: the commit message, if any
327
328                     Parameters
329                            relpath -- (optional) restrict logs to  events  on
330                            this
331
332                     resource  path  (folder  or file) relative to the root of
333                     the repository. If None (default), this is  the  root  of
334                     the  repository.   :param  limit:  (optional) the maximum
335                     number of log entries that should be retrieved.  If  None
336                     (default), there is no limit.
337
338              get_remote_version(fetch=False)
339                     Find  an  identifier  for the current revision on remote.
340                     Token spec might be a tagname,  version-id,  SHA-ID,  ...
341                     depending on the VCS implementation.
342
343                     Parameters
344                            fetch  --  if False, only local information may be
345                            used
346
347                     Returns
348                            current revision number of the remote repository.
349
350                     Return type
351                            str
352
353              get_status(basepath=None, untracked=False)
354                     Calls scm status command. Output must  be  terminated  by
355                     newline unless empty.
356
357                     Semantics  of  untracked are difficult to generalize.  In
358                     SVN, this would be new files only. In git, hg, bzr,  this
359                     would be changes that have not been added for commit.
360
361                     Extra  keyword arguments are passed along to the underly‐
362                     ing  vcs  code.   See  the  specific  implementations  of
363                     get_status() for extra options.
364
365                     Parameters
366
367                            · basepath  --  status  path  will  be relative to
368                              this, if any
369
370                            · untracked -- whether to also show  changes  that
371                              would not commit
372
373                     Returns
374                            A string summarizing locally modified files
375
376                     Return type
377                            str
378
379              get_url()
380
381                     Returns
382                            BZR  URL  of  the  branch (output of bzr info com‐
383                            mand),
384
385                     or None if it cannot be determined
386
387              get_version(spec=None)
388
389                     Parameters
390                            spec -- (optional) revisionspec  of  desired  ver‐
391                            sion.  May be any revisionspec as returned by 'bzr
392                            help revisionspec', e.g. a tagname or 'revno:<num‐
393                            ber>'
394
395                     Returns
396                            the  current revision number of the repository. Or
397                            if spec is provided,  the  number  of  a  revision
398                            specified by some token.
399
400              static static_detect_presence(path)
401                     For auto detection
402
403              update(version='', verbose=False, timeout=None)
404                     Sets the local copy of the repository to a version match‐
405                     ing the version parameter. Fails when  there  are  uncom‐
406                     mited  changes.   On failures (also e.g. network failure)
407                     grants the checked out files are in  the  same  state  as
408                     before  the call.  If a timeout is specified, any pending
409                     operation will fail after the specified amount  (in  sec‐
410                     onds)
411
412                     Parameters
413
414                            · version  --  token  for  identifying  repository
415                              revision desired.  Token  might  be  a  tagname,
416                              branchname, version-id, SHA-ID, ... depending on
417                              the VCS implementation.
418
419                            · timeout -- maximum  allocated  time  to  perform
420                              operation
421
422                     Returns
423                            True on success, False else
424
425              url_matches(url, url_or_shortcut)
426                     client  can  decide whether the url and the other url are
427                     equivalent.  Checks string  equality  by  default  :param
428                     url_or_shortcut: url or shortcut (e.g. bzr launchpad url)
429                     :returns: bool if params are equivalent
430
431   git Module
432       git vcs support.
433
434       refnames in git can be branchnames, hashes, partial  hashes,  tags.  On
435       checkout,  git will disambiguate by checking them in that order, taking
436       the first that applies
437
438       This class aims to provide git for linear centralized  workflows.  This
439       means  in case of ambiguity, we assume that the only relevant remote is
440       the one named "origin", and we  assume  that  commits  once  on  origin
441       remain on origin.
442
443       A  challenge with git is that it has strong reasonable conventions, but
444       is very allowing for breaking them. E.g. it is possible to name remotes
445       and  branches  with  names  like "refs/heads/master", give branches and
446       tags the same name, or a valid SHA-ID  as  name,  etc.   Similarly  git
447       allows  plenty of ways to reference any object, in case of ambiguities,
448       git attempts to take the most reasonable disambiguation,  and  in  some
449       cases warns.
450
451       vcstools.git.GITClient
452              alias of vcstools.git.GitClient
453
454       class vcstools.git.GitClient(path)
455              Bases: vcstools.vcs_base.VcsClientBase
456
457              checkout(url,  version=None, verbose=False, shallow=False, time‐
458              out=None)
459                     calls  git  clone  and  then,  if  version   was   given,
460                     update(version)
461
462              export_repository(version, basepath)
463                     Calls  scm  equivalent  to  svn export, removing scm meta
464                     information and tar gzip'ing the repository  at  a  given
465                     version to the given basepath.
466
467                     Parameters
468                            version  --  version  of the repository to export.
469                            This can
470
471                     be a branch, tag, or path  (svn).   When  specifying  the
472                     version as a path for svn, the path should be relative to
473                     the  root  of  the  svn  repository,  i.e.  'trunk',   or
474                     'tags/1.2.3',  or  './'  for  the root.  :param basepath:
475                     this is the path to the tar gzip, excluding the extension
476                     which  will  be  .tar.gz :returns: True on success, False
477                     otherwise.
478
479              get_affected_files(revision)
480                     Get the files that were affected by a  specific  revision
481                     :param  revision:  SHA  or  revision number.  :returns: A
482                     list of strings with the files  affected  by  a  specific
483                     commit
484
485              get_branches(local_only=False)
486                     Returns a list of all branches in the vcs repository.
487
488                     Parameters
489                            local_only  --  if  True  it  will only list local
490                            branches
491
492                     Returns
493                            list of branches in the  repository,  []  if  none
494                            exist
495
496              get_current_version_label()
497                     For  git  we change the label to clarify when a different
498                     remote is configured.
499
500              get_default_remote_version_label()
501                     Find a label for the default branch  on  remote,  meaning
502                     the one that would be checked out on a clean checkout.
503
504                     Returns
505                            a label or None (if not applicable)
506
507                     Return type
508                            str
509
510              get_diff(basepath=None)
511
512                     Parameters
513                            basepath  --  diff paths will be relative to this,
514                            if any
515
516                     Returns
517                            A string showing local differences
518
519                     Return type
520                            str
521
522              static get_environment_metadata()
523                     For debugging purposes, returns a dict containing  infor‐
524                     mation about the environment, like the version of the SCM
525                     client, or version of libraries involved.   Suggest  con‐
526                     sidering  keywords  "version",  "dependency",  "features"
527                     first.  :returns: a dict containing relevant  information
528                     :rtype: dict
529
530              get_log(relpath=None, limit=None)
531                     Calls scm log command.
532
533                     This  returns  a  list of dictionaries with the following
534                     fields:
535
536                            · id: the commit SHA or revision number
537
538                            · date: the date the commit was made (python date‐
539                              time)
540
541                            · author: the name of the author of the commit, if
542                              available
543
544                            · email: the e-mail address of the author  of  the
545                              commit
546
547                            · message: the commit message, if any
548
549                     Parameters
550                            relpath  --  (optional) restrict logs to events on
551                            this
552
553                     resource path (folder or file) relative to  the  root  of
554                     the  repository.  If  None (default), this is the root of
555                     the repository.  :param  limit:  (optional)  the  maximum
556                     number  of  log entries that should be retrieved. If None
557                     (default), there is no limit.
558
559              get_remote_version(fetch=False)
560                     Find an identifier for the current  revision  on  remote.
561                     Token  spec  might  be a tagname, version-id, SHA-ID, ...
562                     depending on the VCS implementation.
563
564                     Parameters
565                            fetch -- if False, only local information  may  be
566                            used
567
568                     Returns
569                            current revision number of the remote repository.
570
571                     Return type
572                            str
573
574              get_status(basepath=None, untracked=False, porcelain=False)
575                     Calls  scm  status  command. Output must be terminated by
576                     newline unless empty.
577
578                     Semantics of untracked are difficult to  generalize.   In
579                     SVN,  this would be new files only. In git, hg, bzr, this
580                     would be changes that have not been added for commit.
581
582                     Extra keyword arguments are passed along to the  underly‐
583                     ing  vcs  code.   See  the  specific  implementations  of
584                     get_status() for extra options.
585
586                     Parameters
587
588                            · basepath -- status  path  will  be  relative  to
589                              this, if any
590
591                            · untracked  --  whether to also show changes that
592                              would not commit
593
594                     Returns
595                            A string summarizing locally modified files
596
597                     Return type
598                            str
599
600              get_url()
601
602                     Returns
603                            git URL of the directory path (output of git  info
604                            command), or None if it cannot be determined
605
606              get_version(spec=None)
607
608                     Parameters
609
610                            · spec  --  (optional)  token  to identify desired
611                              version. For git, this may be anything  accepted
612                              by  git  log,  e.g.  a  tagname,  branchname, or
613                              sha-id.
614
615                            · fetch -- When spec is given, can be used to sup‐
616                              press git fetch call
617
618                     Returns
619                            current  SHA-ID  of  the repository. Or if spec is
620                            provided, the SHA-ID of a commit specified by some
621                            token if found, else None
622
623              is_tag(tag_name, fetch=True)
624                     checks list of tags for match.  Set fetch to False if you
625                     just fetched already.
626
627                     Returns
628                            True if tag_name among known tags
629
630                     Raises GitError when call to git fetch fails
631
632              static static_detect_presence(path)
633                     For auto detection
634
635              update(version=None,  verbose=False,  force_fetch=False,   time‐
636              out=None)
637                     if  version  is  None,  attempts  fast-forwarding current
638                     branch, if any.
639
640                     Else interprets version as a local branch, remote branch,
641                     tagname, hash, etc.
642
643                     If  it is a branch, attempts to move to it unless already
644                     on it, and to fast-forward, unless not a tracking branch.
645                     Else go untracked on tag or whatever version is. Does not
646                     leave if current commit would become dangling.
647
648                     Returns
649                            True if already up-to-date with  remote  or  after
650                            successful fast_foward
651
652       exception vcstools.git.GitError
653              Bases: Exception
654
655   hg Module
656       hg vcs support.
657
658       using ui object to redirect output into a string
659
660       vcstools.hg.HGClient
661              alias of vcstools.hg.HgClient
662
663       class vcstools.hg.HgClient(path)
664              Bases: vcstools.vcs_base.VcsClientBase
665
666              checkout(url,  version='',  verbose=False,  shallow=False, time‐
667              out=None)
668                     Attempts to create a local repository given a remote url.
669                     Fails  if  a  target  path  exists,  unless it's an empty
670                     directory.  If a version is provided, the  local  reposi‐
671                     tory  will  be  updated  to that revision. It is possible
672                     that after a failed call to checkout, a repository  still
673                     exists,  e.g. if an invalid revision was given.  If shal‐
674                     low is provided, the scm client may  checkout  less  than
675                     the  full  repository  history to save time / disk space.
676                     If a timeout is specified,  any  pending  operation  will
677                     fail  after the specified amount (in seconds). NOTE: this
678                     parameter might or might not be honored, depending on VCS
679                     client  implementation.   :param  url:  where to checkout
680                     from :type url: str :param version: token for identifying
681                     repository  revision  :type  version: str :param shallow:
682                     hint to checkout less than a full repository :type  shal‐
683                     low:  bool :param timeout: maximum allocated time to per‐
684                     form operation :type shallow: int :returns: True if  suc‐
685                     cessful
686
687              export_repository(version, basepath)
688                     Calls  scm  equivalent  to  svn export, removing scm meta
689                     information and tar gzip'ing the repository  at  a  given
690                     version to the given basepath.
691
692                     Parameters
693                            version  --  version  of the repository to export.
694                            This can
695
696                     be a branch, tag, or path  (svn).   When  specifying  the
697                     version as a path for svn, the path should be relative to
698                     the  root  of  the  svn  repository,  i.e.  'trunk',   or
699                     'tags/1.2.3',  or  './'  for  the root.  :param basepath:
700                     this is the path to the tar gzip, excluding the extension
701                     which  will  be  .tar.gz :returns: True on success, False
702                     otherwise.
703
704              get_affected_files(revision)
705                     Get the files that were affected by a  specific  revision
706                     :param  revision:  SHA  or  revision number.  :returns: A
707                     list of strings with the files  affected  by  a  specific
708                     commit
709
710              get_branch()
711
712              get_branches(local_only=False)
713                     Returns a list of all branches in the vcs repository.
714
715                     Parameters
716                            local_only  --  if  True  it  will only list local
717                            branches
718
719                     Returns
720                            list of branches in the  repository,  []  if  none
721                            exist
722
723              get_current_version_label()
724
725                     Parameters
726                            spec  --  (optional)  spec  can  be what 'svn info
727                            --help' allows, meaning a revnumber, {date}, HEAD,
728                            BASE, PREV, or COMMITTED.
729
730                     Returns
731                            current  revision  number of the repository. Or if
732                            spec provided, the number of a revision  specified
733                            by some token.
734
735              get_diff(basepath=None)
736
737                     Parameters
738                            basepath  --  diff paths will be relative to this,
739                            if any
740
741                     Returns
742                            A string showing local differences
743
744                     Return type
745                            str
746
747              static get_environment_metadata()
748                     For debugging purposes, returns a dict containing  infor‐
749                     mation about the environment, like the version of the SCM
750                     client, or version of libraries involved.   Suggest  con‐
751                     sidering  keywords  "version",  "dependency",  "features"
752                     first.  :returns: a dict containing relevant  information
753                     :rtype: dict
754
755              get_log(relpath=None, limit=None)
756                     Calls scm log command.
757
758                     This  returns  a  list of dictionaries with the following
759                     fields:
760
761                            · id: the commit SHA or revision number
762
763                            · date: the date the commit was made (python date‐
764                              time)
765
766                            · author: the name of the author of the commit, if
767                              available
768
769                            · email: the e-mail address of the author  of  the
770                              commit
771
772                            · message: the commit message, if any
773
774                     Parameters
775                            relpath  --  (optional) restrict logs to events on
776                            this
777
778                     resource path (folder or file) relative to  the  root  of
779                     the  repository.  If  None (default), this is the root of
780                     the repository.  :param  limit:  (optional)  the  maximum
781                     number  of  log entries that should be retrieved. If None
782                     (default), there is no limit.
783
784              get_remote_version(fetch=False)
785                     Find an identifier for the current  revision  on  remote.
786                     Token  spec  might  be a tagname, version-id, SHA-ID, ...
787                     depending on the VCS implementation.
788
789                     Parameters
790                            fetch -- if False, only local information  may  be
791                            used
792
793                     Returns
794                            current revision number of the remote repository.
795
796                     Return type
797                            str
798
799              get_status(basepath=None, untracked=False)
800                     Calls  scm  status  command. Output must be terminated by
801                     newline unless empty.
802
803                     Semantics of untracked are difficult to  generalize.   In
804                     SVN,  this would be new files only. In git, hg, bzr, this
805                     would be changes that have not been added for commit.
806
807                     Extra keyword arguments are passed along to the  underly‐
808                     ing  vcs  code.   See  the  specific  implementations  of
809                     get_status() for extra options.
810
811                     Parameters
812
813                            · basepath -- status  path  will  be  relative  to
814                              this, if any
815
816                            · untracked  --  whether to also show changes that
817                              would not commit
818
819                     Returns
820                            A string summarizing locally modified files
821
822                     Return type
823                            str
824
825              get_url()
826
827                     Returns
828                            HG URL of the directory path. (output of hg paths
829
830                     command), or None if it cannot be determined
831
832              get_version(spec=None)
833
834                     Parameters
835                            spec -- (optional) token for identifying  version.
836                            spec  can be a whatever is allowed by 'hg log -r',
837                            e.g. a tagname, sha-ID, revision-number
838
839                     Returns
840                            the current SHA-ID of the repository. Or  if  spec
841                            is provided, the SHA-ID of a revision specified by
842                            some token.
843
844              static static_detect_presence(path)
845                     For auto detection
846
847              update(version='', verbose=False, timeout=None)
848                     Sets the local copy of the repository to a version match‐
849                     ing  the  version  parameter. Fails when there are uncom‐
850                     mited changes.  On failures (also e.g.  network  failure)
851                     grants  the  checked  out  files are in the same state as
852                     before the call.  If a timeout is specified, any  pending
853                     operation  will  fail after the specified amount (in sec‐
854                     onds)
855
856                     Parameters
857
858                            · version  --  token  for  identifying  repository
859                              revision  desired.   Token  might  be a tagname,
860                              branchname, version-id, SHA-ID, ... depending on
861                              the VCS implementation.
862
863                            · timeout  --  maximum  allocated  time to perform
864                              operation
865
866                     Returns
867                            True on success, False else
868
869   svn Module
870       svn vcs support.
871
872       vcstools.svn.SVNClient
873              alias of vcstools.svn.SvnClient
874
875       class vcstools.svn.SvnClient(path)
876              Bases: vcstools.vcs_base.VcsClientBase
877
878              checkout(url, version='',  verbose=False,  shallow=False,  time‐
879              out=None)
880                     Attempts to create a local repository given a remote url.
881                     Fails if a target  path  exists,  unless  it's  an  empty
882                     directory.   If  a version is provided, the local reposi‐
883                     tory will be updated to that  revision.  It  is  possible
884                     that  after a failed call to checkout, a repository still
885                     exists, e.g. if an invalid revision was given.  If  shal‐
886                     low  is  provided,  the scm client may checkout less than
887                     the full repository history to save time  /  disk  space.
888                     If  a  timeout  is  specified, any pending operation will
889                     fail after the specified amount (in seconds). NOTE:  this
890                     parameter might or might not be honored, depending on VCS
891                     client implementation.  :param  url:  where  to  checkout
892                     from :type url: str :param version: token for identifying
893                     repository revision :type version:  str  :param  shallow:
894                     hint  to checkout less than a full repository :type shal‐
895                     low: bool :param timeout: maximum allocated time to  per‐
896                     form  operation :type shallow: int :returns: True if suc‐
897                     cessful
898
899              export_repository(version, basepath)
900                     Calls scm equivalent to svn  export,  removing  scm  meta
901                     information  and  tar  gzip'ing the repository at a given
902                     version to the given basepath.
903
904                     Parameters
905                            version -- version of the  repository  to  export.
906                            This can
907
908                     be  a  branch,  tag,  or path (svn).  When specifying the
909                     version as a path for svn, the path should be relative to
910                     the   root  of  the  svn  repository,  i.e.  'trunk',  or
911                     'tags/1.2.3', or './' for  the  root.   :param  basepath:
912                     this is the path to the tar gzip, excluding the extension
913                     which will be .tar.gz :returns: True  on  success,  False
914                     otherwise.
915
916              get_affected_files(revision)
917                     Get  the  files that were affected by a specific revision
918                     :param revision: SHA or  revision  number.   :returns:  A
919                     list  of  strings  with  the files affected by a specific
920                     commit
921
922              get_branches(local_only=False)
923                     Returns a list of all branches in the vcs repository.
924
925                     Parameters
926                            local_only -- if True  it  will  only  list  local
927                            branches
928
929                     Returns
930                            list  of  branches  in  the repository, [] if none
931                            exist
932
933              get_current_version_label()
934                     Find an description for the current local version.  Token
935                     spec  might  be  a  branchname,  version-id,  SHA-ID, ...
936                     depending on the VCS implementation.
937
938                     Returns
939                            short description of local version  (e.g.  branch‐
940                            name, tagename).
941
942                     Return type
943                            str
944
945              get_diff(basepath=None)
946
947                     Parameters
948                            basepath  --  diff paths will be relative to this,
949                            if any
950
951                     Returns
952                            A string showing local differences
953
954                     Return type
955                            str
956
957              static get_environment_metadata()
958                     For debugging purposes, returns a dict containing  infor‐
959                     mation about the environment, like the version of the SCM
960                     client, or version of libraries involved.   Suggest  con‐
961                     sidering  keywords  "version",  "dependency",  "features"
962                     first.  :returns: a dict containing relevant  information
963                     :rtype: dict
964
965              get_log(relpath=None, limit=None)
966                     Calls scm log command.
967
968                     This  returns  a  list of dictionaries with the following
969                     fields:
970
971                            · id: the commit SHA or revision number
972
973                            · date: the date the commit was made (python date‐
974                              time)
975
976                            · author: the name of the author of the commit, if
977                              available
978
979                            · email: the e-mail address of the author  of  the
980                              commit
981
982                            · message: the commit message, if any
983
984                     Parameters
985                            relpath  --  (optional) restrict logs to events on
986                            this
987
988                     resource path (folder or file) relative to  the  root  of
989                     the  repository.  If  None (default), this is the root of
990                     the repository.  :param  limit:  (optional)  the  maximum
991                     number  of  log entries that should be retrieved. If None
992                     (default), there is no limit.
993
994              get_remote_version(fetch=False)
995                     Find an identifier for the current  revision  on  remote.
996                     Token  spec  might  be a tagname, version-id, SHA-ID, ...
997                     depending on the VCS implementation.
998
999                     Parameters
1000                            fetch -- if False, only local information  may  be
1001                            used
1002
1003                     Returns
1004                            current revision number of the remote repository.
1005
1006                     Return type
1007                            str
1008
1009              get_status(basepath=None, untracked=False)
1010                     Calls  scm  status  command. Output must be terminated by
1011                     newline unless empty.
1012
1013                     Semantics of untracked are difficult to  generalize.   In
1014                     SVN,  this would be new files only. In git, hg, bzr, this
1015                     would be changes that have not been added for commit.
1016
1017                     Extra keyword arguments are passed along to the  underly‐
1018                     ing  vcs  code.   See  the  specific  implementations  of
1019                     get_status() for extra options.
1020
1021                     Parameters
1022
1023                            · basepath -- status  path  will  be  relative  to
1024                              this, if any
1025
1026                            · untracked  --  whether to also show changes that
1027                              would not commit
1028
1029                     Returns
1030                            A string summarizing locally modified files
1031
1032                     Return type
1033                            str
1034
1035              get_url()
1036
1037                     Returns
1038                            SVN URL of the directory path (output of svn  info
1039                            command), or None if it cannot be determined
1040
1041              get_version(spec=None)
1042
1043                     Parameters
1044
1045                            · spec  --  (optional)  spec can be what 'svn info
1046                              --help' allows,  meaning  a  revnumber,  {date},
1047                              HEAD, BASE, PREV, or COMMITTED.
1048
1049                            · path -- the url to use, default is for this repo
1050
1051                     Returns
1052                            current  revision  number of the repository. Or if
1053                            spec provided, the number of a revision  specified
1054                            by some token.
1055
1056              static static_detect_presence(path)
1057                     For auto detection
1058
1059              update(version=None, verbose=False, timeout=None)
1060                     Sets the local copy of the repository to a version match‐
1061                     ing the version parameter. Fails when  there  are  uncom‐
1062                     mited  changes.   On failures (also e.g. network failure)
1063                     grants the checked out files are in  the  same  state  as
1064                     before  the call.  If a timeout is specified, any pending
1065                     operation will fail after the specified amount  (in  sec‐
1066                     onds)
1067
1068                     Parameters
1069
1070                            · version  --  token  for  identifying  repository
1071                              revision desired.  Token  might  be  a  tagname,
1072                              branchname, version-id, SHA-ID, ... depending on
1073                              the VCS implementation.
1074
1075                            · timeout -- maximum  allocated  time  to  perform
1076                              operation
1077
1078                     Returns
1079                            True on success, False else
1080
1081       vcstools.svn.canonical_svn_url_split(url)
1082              checks  url  for  traces  of canonical svn structure, and return
1083              root, type, name (of tag or branch), subfolder, query and  frag‐
1084              ment  (see urllib urlparse) This should allow creating a differ‐
1085              ent url for switching to a different tag or branch
1086
1087              Parameters
1088                     url -- location of central repo, str
1089
1090              Returns
1091                     dict {root, type, name, subfolder, query, fragment}
1092
1093              with type one of "trunk", "tags", "branches"
1094
1095       vcstools.svn.get_remote_contents(url)
1096
1097   tar Module
1098       tar vcs support.
1099
1100       The implementation uses the "version" argument to indicate a  subfolder
1101       within  a  tarfile.   Hence  one  can  organize sources by creating one
1102       tarfile with a folder inside for each version.
1103
1104       vcstools.tar.TARClient
1105              alias of vcstools.tar.TarClient
1106
1107       class vcstools.tar.TarClient(path)
1108              Bases: vcstools.vcs_base.VcsClientBase
1109
1110              checkout(url, version='',  verbose=False,  shallow=False,  time‐
1111              out=None)
1112                     untars  tar  at  url to self.path.  If version was given,
1113                     only the subdirectory 'version' of the tar will end up in
1114                     self.path.   Also  creates  a  file  next to the checkout
1115                     named
1116                     *
1117                     .tar which is a yaml file listing origin url and  version
1118                     arguments.
1119
1120              export_repository(version, basepath)
1121                     Calls  scm  equivalent  to  svn export, removing scm meta
1122                     information and tar gzip'ing the repository  at  a  given
1123                     version to the given basepath.
1124
1125                     Parameters
1126                            version  --  version  of the repository to export.
1127                            This can
1128
1129                     be a branch, tag, or path  (svn).   When  specifying  the
1130                     version as a path for svn, the path should be relative to
1131                     the  root  of  the  svn  repository,  i.e.  'trunk',   or
1132                     'tags/1.2.3',  or  './'  for  the root.  :param basepath:
1133                     this is the path to the tar gzip, excluding the extension
1134                     which  will  be  .tar.gz :returns: True on success, False
1135                     otherwise.
1136
1137              get_current_version_label()
1138                     Find an description for the current local version.  Token
1139                     spec  might  be  a  branchname,  version-id,  SHA-ID, ...
1140                     depending on the VCS implementation.
1141
1142                     Returns
1143                            short description of local version  (e.g.  branch‐
1144                            name, tagename).
1145
1146                     Return type
1147                            str
1148
1149              get_diff(basepath=None)
1150
1151                     Parameters
1152                            basepath  --  diff paths will be relative to this,
1153                            if any
1154
1155                     Returns
1156                            A string showing local differences
1157
1158                     Return type
1159                            str
1160
1161              static get_environment_metadata()
1162                     For debugging purposes, returns a dict containing  infor‐
1163                     mation about the environment, like the version of the SCM
1164                     client, or version of libraries involved.   Suggest  con‐
1165                     sidering  keywords  "version",  "dependency",  "features"
1166                     first.  :returns: a dict containing relevant  information
1167                     :rtype: dict
1168
1169              get_remote_version(fetch=False)
1170                     Find  an  identifier  for the current revision on remote.
1171                     Token spec might be a tagname,  version-id,  SHA-ID,  ...
1172                     depending on the VCS implementation.
1173
1174                     Parameters
1175                            fetch  --  if False, only local information may be
1176                            used
1177
1178                     Returns
1179                            current revision number of the remote repository.
1180
1181                     Return type
1182                            str
1183
1184              get_status(basepath=None, untracked=False)
1185                     Calls scm status command. Output must  be  terminated  by
1186                     newline unless empty.
1187
1188                     Semantics  of  untracked are difficult to generalize.  In
1189                     SVN, this would be new files only. In git, hg, bzr,  this
1190                     would be changes that have not been added for commit.
1191
1192                     Extra  keyword arguments are passed along to the underly‐
1193                     ing  vcs  code.   See  the  specific  implementations  of
1194                     get_status() for extra options.
1195
1196                     Parameters
1197
1198                            · basepath  --  status  path  will  be relative to
1199                              this, if any
1200
1201                            · untracked -- whether to also show  changes  that
1202                              would not commit
1203
1204                     Returns
1205                            A string summarizing locally modified files
1206
1207                     Return type
1208                            str
1209
1210              get_url()
1211
1212                     Returns
1213                            TAR URL of the directory path (output of tar info
1214
1215                     command), or None if it cannot be determined
1216
1217              get_version(spec=None)
1218                     Find an identifier for a the current or a specified revi‐
1219                     sion. Token spec might be  a  tagname,  branchname,  ver‐
1220                     sion-id, SHA-ID, ... depending on the VCS implementation.
1221
1222                     Parameters
1223                            spec  (str)  --  token  for identifying repository
1224                            revision
1225
1226                     Returns
1227                            current revision number of the repository.  Or  if
1228                            spec is provided, the respective revision number.
1229
1230                     Return type
1231                            str
1232
1233              static static_detect_presence(path)
1234                     For auto detection
1235
1236              update(version='', verbose=False, timeout=None)
1237                     Does  nothing except returning true if tar exists in same
1238                     "version" as checked out with vcstools.
1239
1240   vcs_abstraction Module
1241       undoc-members
1242
1243       show-inheritance
1244
1245       vcstools.vcs_abstraction.VCSClient
1246              alias of vcstools.vcs_abstraction.VcsClient
1247
1248       class vcstools.vcs_abstraction.VcsClient(vcs_type, path)
1249              DEPRECATED API  for  interacting  with  source-controlled  paths
1250              independent of actual version-control implementation.
1251
1252       vcstools.vcs_abstraction.get_registered_vcs_types()
1253
1254              Returns
1255                     list of valid key to use as vcs_type
1256
1257       vcstools.vcs_abstraction.get_vcs(vcs_type)
1258              Returns the class interfacing with vcs of given type
1259
1260              Parameters
1261                     vcs_type -- id of the tpye, e.g. git, svn, hg, bzr
1262
1263              Returns
1264                     class extending VcsClientBase
1265
1266              Raises ValueError for unknown vcs_type
1267
1268       vcstools.vcs_abstraction.get_vcs_client(vcs_type, path)
1269              Returns  a  client  with which to interact with the vcs at given
1270              path
1271
1272              Parameters
1273                     vcs_type -- id of the tpye, e.g. git, svn, hg, bzr
1274
1275              Returns
1276                     instance of VcsClientBase
1277
1278              Raises ValueError for unknown vcs_type
1279
1280       vcstools.vcs_abstraction.register_vcs(vcs_type, clazz)
1281
1282              Parameters
1283
1284                     · vcs_type -- id, str
1285
1286                     · clazz -- class extending VcsClientBase
1287
1288   vcs_base Module
1289       vcs support library base class.
1290
1291       undoc-members
1292
1293       show-inheritance
1294
1295       class vcstools.vcs_base.VcsClientBase(vcs_type_name, path)
1296              parent class for all vcs clients, provides their public API
1297
1298              checkout(url, version=None, verbose=False, shallow=False,  time‐
1299              out=None)
1300                     Attempts to create a local repository given a remote url.
1301                     Fails if a target  path  exists,  unless  it's  an  empty
1302                     directory.   If  a version is provided, the local reposi‐
1303                     tory will be updated to that  revision.  It  is  possible
1304                     that  after a failed call to checkout, a repository still
1305                     exists, e.g. if an invalid revision was given.  If  shal‐
1306                     low  is  provided,  the scm client may checkout less than
1307                     the full repository history to save time  /  disk  space.
1308                     If  a  timeout  is  specified, any pending operation will
1309                     fail after the specified amount (in seconds). NOTE:  this
1310                     parameter might or might not be honored, depending on VCS
1311                     client implementation.  :param  url:  where  to  checkout
1312                     from :type url: str :param version: token for identifying
1313                     repository revision :type version:  str  :param  shallow:
1314                     hint  to checkout less than a full repository :type shal‐
1315                     low: bool :param timeout: maximum allocated time to  per‐
1316                     form  operation :type shallow: int :returns: True if suc‐
1317                     cessful
1318
1319              detect_presence()
1320                     For auto detection
1321
1322              export_repository(version, basepath)
1323                     Calls scm equivalent to svn  export,  removing  scm  meta
1324                     information  and  tar  gzip'ing the repository at a given
1325                     version to the given basepath.
1326
1327                     Parameters
1328                            version -- version of the  repository  to  export.
1329                            This can
1330
1331                     be  a  branch,  tag,  or path (svn).  When specifying the
1332                     version as a path for svn, the path should be relative to
1333                     the   root  of  the  svn  repository,  i.e.  'trunk',  or
1334                     'tags/1.2.3', or './' for  the  root.   :param  basepath:
1335                     this is the path to the tar gzip, excluding the extension
1336                     which will be .tar.gz :returns: True  on  success,  False
1337                     otherwise.
1338
1339              get_affected_files(revision)
1340                     Get  the  files that were affected by a specific revision
1341                     :param revision: SHA or  revision  number.   :returns:  A
1342                     list  of  strings  with  the files affected by a specific
1343                     commit
1344
1345              get_branches(local_only=False)
1346                     Returns a list of all branches in the vcs repository.
1347
1348                     Parameters
1349                            local_only -- if True  it  will  only  list  local
1350                            branches
1351
1352                     Returns
1353                            list  of  branches  in  the repository, [] if none
1354                            exist
1355
1356              get_current_version_label()
1357                     Find an description for the current local version.  Token
1358                     spec  might  be  a  branchname,  version-id,  SHA-ID, ...
1359                     depending on the VCS implementation.
1360
1361                     Returns
1362                            short description of local version  (e.g.  branch‐
1363                            name, tagename).
1364
1365                     Return type
1366                            str
1367
1368              get_default_remote_version_label()
1369                     Find  a  label  for the default branch on remote, meaning
1370                     the one that would be checked out on a clean checkout.
1371
1372                     Returns
1373                            a label or None (if not applicable)
1374
1375                     Return type
1376                            str
1377
1378              get_diff(basepath=None)
1379
1380                     Parameters
1381                            basepath -- diff paths will be relative  to  this,
1382                            if any
1383
1384                     Returns
1385                            A string showing local differences
1386
1387                     Return type
1388                            str
1389
1390              static get_environment_metadata()
1391                     For  debugging purposes, returns a dict containing infor‐
1392                     mation about the environment, like the version of the SCM
1393                     client,  or  version of libraries involved.  Suggest con‐
1394                     sidering  keywords  "version",  "dependency",  "features"
1395                     first.   :returns: a dict containing relevant information
1396                     :rtype: dict
1397
1398              get_log(relpath=None, limit=None)
1399                     Calls scm log command.
1400
1401                     This returns a list of dictionaries  with  the  following
1402                     fields:
1403
1404                            · id: the commit SHA or revision number
1405
1406                            · date: the date the commit was made (python date‐
1407                              time)
1408
1409                            · author: the name of the author of the commit, if
1410                              available
1411
1412                            · email:  the  e-mail address of the author of the
1413                              commit
1414
1415                            · message: the commit message, if any
1416
1417                     Parameters
1418                            relpath -- (optional) restrict logs to  events  on
1419                            this
1420
1421                     resource  path  (folder  or file) relative to the root of
1422                     the repository. If None (default), this is  the  root  of
1423                     the  repository.   :param  limit:  (optional) the maximum
1424                     number of log entries that should be retrieved.  If  None
1425                     (default), there is no limit.
1426
1427              get_path()
1428                     returns the path this client was configured for
1429
1430              get_remote_version(fetch=False)
1431                     Find  an  identifier  for the current revision on remote.
1432                     Token spec might be a tagname,  version-id,  SHA-ID,  ...
1433                     depending on the VCS implementation.
1434
1435                     Parameters
1436                            fetch  --  if False, only local information may be
1437                            used
1438
1439                     Returns
1440                            current revision number of the remote repository.
1441
1442                     Return type
1443                            str
1444
1445              get_status(basepath=None, untracked=False, **kwargs)
1446                     Calls scm status command. Output must  be  terminated  by
1447                     newline unless empty.
1448
1449                     Semantics  of  untracked are difficult to generalize.  In
1450                     SVN, this would be new files only. In git, hg, bzr,  this
1451                     would be changes that have not been added for commit.
1452
1453                     Extra  keyword arguments are passed along to the underly‐
1454                     ing  vcs  code.   See  the  specific  implementations  of
1455                     get_status() for extra options.
1456
1457                     Parameters
1458
1459                            · basepath  --  status  path  will  be relative to
1460                              this, if any
1461
1462                            · untracked -- whether to also show  changes  that
1463                              would not commit
1464
1465                     Returns
1466                            A string summarizing locally modified files
1467
1468                     Return type
1469                            str
1470
1471              get_url()
1472
1473                     Returns
1474                            The source control url for the path or None if not
1475                            set
1476
1477                     Return type
1478                            str
1479
1480              get_vcs_type_name()
1481                     used when auto detected
1482
1483              get_version(spec=None)
1484                     Find an identifier for a the current or a specified revi‐
1485                     sion.  Token  spec  might  be a tagname, branchname, ver‐
1486                     sion-id, SHA-ID, ... depending on the VCS implementation.
1487
1488                     Parameters
1489                            spec (str) --  token  for  identifying  repository
1490                            revision
1491
1492                     Returns
1493                            current  revision number of the repository.  Or if
1494                            spec is provided, the respective revision number.
1495
1496                     Return type
1497                            str
1498
1499              path_exists()
1500                     helper function
1501
1502              static static_detect_presence(path)
1503                     For auto detection
1504
1505              update(version=None, verbose=False, timeout=None)
1506                     Sets the local copy of the repository to a version match‐
1507                     ing  the  version  parameter. Fails when there are uncom‐
1508                     mited changes.  On failures (also e.g.  network  failure)
1509                     grants  the  checked  out  files are in the same state as
1510                     before the call.  If a timeout is specified, any  pending
1511                     operation  will  fail after the specified amount (in sec‐
1512                     onds)
1513
1514                     Parameters
1515
1516                            · version  --  token  for  identifying  repository
1517                              revision  desired.   Token  might  be a tagname,
1518                              branchname, version-id, SHA-ID, ... depending on
1519                              the VCS implementation.
1520
1521                            · timeout  --  maximum  allocated  time to perform
1522                              operation
1523
1524                     Returns
1525                            True on success, False else
1526
1527              url_matches(url, url_or_shortcut)
1528                     client can decide whether the url and the other  url  are
1529                     equivalent.   Checks  string  equality  by default :param
1530                     url_or_shortcut: url or shortcut (e.g. bzr launchpad url)
1531                     :returns: bool if params are equivalent
1532
1533       exception vcstools.vcs_base.VcsError(value)
1534              To  be  thrown when an SCM Client faces a situation because of a
1535              violated assumption
1536
1537   Changelog
1538   Changelog
1539   0.1
1540   0.1.42
1541       · remove cosmic and disco until we have hosting for it
1542
1543   0.1.41
1544       · fix git submodule error due to lack of quoting
1545
1546       · Fix git update failure by refreshing git index before fast-forward
1547
1548       · Fix python3 incompatibility due to wrong use of urlopen
1549
1550       · Updating get_affected_files function by removing single quotes cover‐
1551         ing format (#129)
1552
1553       · Fix export_upstream for git submodules with relative urls. (#130)
1554
1555   0.1.40
1556       · Trivial style and testing changes
1557
1558   0.1.39
1559       · Added support for git submodule in export_repository
1560
1561       · Add Wily Xenial Yakkety
1562
1563       · Add get_affected_files for all vcss
1564
1565   0.1.38
1566       · Fixed test failures due to SVN 1.9.
1567
1568       · Added  the  get_default_remote_version_label()  API method to support
1569         changes in wstool.
1570
1571       · Renamed some internal functions to have a leading _ to indicate  that
1572         they are private.
1573
1574   0.1.37
1575       · Fix an issue where log were restricted to the named branch (hg).
1576
1577       · Fixed  svn to use a global revision number rather than a branch-local
1578         revision.
1579
1580       · Added the get_remote_version()  and  get_current_version_label()  API
1581         calls.
1582
1583       · Enhanced use of no_warn in run_shell_command().
1584
1585       · Fix get_version() to catch stderr.
1586
1587       · Added get_branches() API call.
1588
1589       · Fix some errors and warnings to output to stderr.
1590
1591       · Fix output to avoid extra newlines when show_stdout=True.
1592
1593   0.1.36
1594       · Updates to the release platforms (-lucid +utopic +vivid)
1595
1596       · Fix an issue with updating branches on git, see vcstools/wstool#25
1597
1598   0.1.31
1599       · Fix submodule support on checkout #71
1600
1601   0.1.30
1602       · use  netrc  to  download  tars from private repos, also will work for
1603         private rosinstall files
1604
1605       · Fix checks for empty repository #62
1606
1607   0.1.29
1608       · fix #57 shallow checkout of non-master breaks with git >= 1.8.0
1609
1610       · unit test fixes
1611
1612   0.1.28
1613       · test of new upload method
1614
1615   0.1.27
1616       · fix #51 hg status and diff dont work if workspace is inside hg repo
1617
1618       · fix #47  several  performance  improvements  by  removing  unecessary
1619         update actions after checkout
1620
1621       · fix #46 https tar download fails behind proxy
1622
1623       · fix #45 sometimes commands run forever
1624
1625       · fix #44 minor bug when checking out from repo with default branch not
1626         master
1627
1628       · fix #41 improvedAPI, get_vcs_client function part of vcstools module
1629
1630   0.1.26
1631       · fix #38 git commands fail in local  repositories  with  many  (>2000)
1632         references
1633
1634       · fix #31 get_log() svn xml not available on Ubuntu Lucid (hg 1.4.2)
1635
1636       · fix #37 update() returns True even when fetch failed
1637
1638   0.1.25
1639       · minor bugfixes
1640
1641       · travis-ci config file
1642
1643       · fix unit tests for svn diff&status ordering changes
1644
1645       · deprecated VcsClient Class
1646
1647       · added get_log function
1648
1649   0.1.24
1650       · fix  git  update return value to False when fast-forward not possible
1651         due to diverge
1652
1653       · fix. svn certificate prompt invisible, svn checkout and update become
1654         verbose due to this
1655
1656   0.1.22
1657       · Changed the way that git implements detect_presence to fix a bug with
1658         submodules in newer versions of git
1659
1660       · fix for git single quotes on Windows
1661
1662       · minor internal api bug where a git function always returned True
1663
1664       · fix gub in svn export_repository
1665
1666   0.1.21
1667       · bugfix #66: hg http username prompt hidden
1668
1669       · add export_repository method to vcs_base and all implementations with
1670         tests
1671
1672       · bugfix #64: unicode decoding problems
1673
1674   0.1.20
1675       · rosws update –verbose for git prints small message when rebasing
1676
1677       · improved python3 compatibility
1678
1679   0.1.19
1680       · more python3 compatibility
1681
1682       · code style improved
1683
1684       · match_url to compare bzr shortcuts to real urls
1685
1686       · more unit tests
1687
1688       · get_status required to end with newline, to fix #55
1689
1690   0.1.18
1691       · added shallow flag to API, implemented for git
1692
1693   0.1.17
1694       · svn stdout output on get_version removed
1695
1696   0.1.16
1697       · All SCMs show some output when update caused changes
1698
1699       · All SCMs have verbose option to show all changes done on update
1700
1701       · bugfix for bazaar getUrl() being a joined abspath
1702
1703       · bugfix for not all output being shown when requested
1704
1705   0.1.15
1706       · Added pyyaml as a proper dependency, removed detection code.
1707
1708       · remove use of tar entirely, switch to tarfile module
1709
1710       · fix #36 allowing for tar being bsdtar on OSX
1711
1712   0.1.14
1713       · Added tarball uncompression.
1714
1715   0.1.13
1716       · added this changelog
1717
1718       · git get-version fetches only when local lookup fails
1719
1720       · hg get-version pulls if label not found
1721
1722       · Popen error message incudes cwd path
1723
1724   0.1.12
1725       · py_checker clean after all refactorings since 0.1.0
1726
1727   0.1.11
1728       · svn and hg update without user interaction
1729
1730       · bugfix #30
1731
1732       · minor bugfixes
1733
1734   0.1.10
1735       · minor bugs
1736
1737   0.1.9
1738       · safer sanitization of shell params
1739
1740       · git diff and stat recurse for submodules
1741
1742       · base class manages all calls to Popen
1743
1744   0.1.8
1745       · several bugfixes
1746
1747       · reverted using shell commands instead of bazaar API
1748
1749   0.1.7
1750       · reverted using shell commands instaed of pysvn and mercurial APIs
1751
1752       · protection against shell incection attempts
1753
1754   0.1.6
1755       · bugfixes to svn and bzr
1756
1757       · unified all calls through Popen
1758
1759   0.1.5
1760       · missing dependency to dateutil added
1761
1762   0.1.4
1763       switched  shell  calls  to  calls  to  python API of mercurial, bazaar,
1764       py-svn
1765
1766   0.1.3
1767       · fix #6
1768
1769   0.1.2
1770       · fix #15
1771
1772   0.1.1
1773       · more unit tests
1774
1775       · diverse bugfixes
1776
1777       · major   change   to   git   client   behavior,   based   around   git
1778         https://kforge.ros.org/vcstools/trac/ticket/1
1779
1780   0.1.0
1781       · documentation fixes
1782
1783   0.0.3
1784       · import from svn
1785
1786   Bug reports and feature requests
1787       · Submit a bug report
1788
1789   Developer Setup
1790       vcstools  uses  setuptools, which you will need to download and install
1791       in order to run the packaging.  We use setuptools instead of  distutils
1792       in order to be able use setup() keys like install_requires.
1793          cd vcstools python setup.py develop
1794
1795   Testing
1796       Install test dependencies
1797
1798          pip install nose
1799          pip install mock
1800
1801       vcstools  uses  Python  nose  for testing, which is a fairly simple and
1802       straightfoward test framework.  The vcstools  mainly  use  unittest  to
1803       construct  test fixtures, but with nose you can also just write a func‐
1804       tion that starts with the name test and use normal assert statements.
1805
1806       vcstools also uses mock to create mocks for testing.
1807
1808       You can run the tests, including coverage, as follows:
1809
1810          cd vcstools
1811          make test
1812
1813   Documentation
1814       Sphinx is used to provide API documentation for  vcstools.   The  docu‐
1815       ments are stored in the doc subdirectory.
1816
1817       · genindex
1818
1819       · modindex
1820
1821       · search
1822

AUTHOR

1824       Tully Foote, Thibault Kruse, Ken Conley
1825
1827       2020, Willow Garage
1828
1829
1830
1831
18320.1.42                           Jul 29, 2020                      VCSTOOLS(1)
Impressum