Opened 18 years ago

Closed 13 years ago

#2574 closed enhancement (fixed)

Support for Additional VCS features

Reported by: roy.keene@… Owned by: nobody@…
Priority: low Milestone:
Component: version control Version: unspecified
Severity: minor Keywords:
Cc: timmichelsen@…, alexl@…, rgheck@…, ps@…

Description (last modified by ps)

A useful feature to support in the future would be support for using
"Subversion" instead of "RCS" for managing documents under version control.

Attachments (1)

VCBackend.cpp_with_bzr (20.1 KB ) - added by timmichelsen@… 16 years ago.
first proposal: added section for bzr and its commands

Download all attachments as: .zip

Change History (39)

comment:1 by Richard Heck, 17 years ago

Cc: rgheck@… added

comment:2 by michael.gerz@…, 17 years ago

Agree. RCS is dead. It's a shame that we still support it but ignore the modern
svn tool.

comment:3 by levon, 17 years ago

Nonsense. RCS is not dead, it is still widely used. However, support for more
modern version control systems would be great.

comment:4 by alexl@…, 16 years ago

Cc: alexl@… added

comment:5 by alexl@…, 16 years ago

Can somebody update the Summary to note that this is in addition to CVS/RCS, not
just a replacement (I tried but didn't have the permission). Ideally it would
autodetect which version control system was being used in the current direct and
use the correct one make it transparent to the user (the way Emacs can figure
out whether to cvs or svn).

comment:6 by Richard Heck, 16 years ago

Summary: Support for "Subversion" instead of "RCS" for document version controlDisentangle version control support from the VCS

comment:7 by Uwe Stöhr, 16 years ago

Summary: Disentangle version control support from the VCSsupport for SVN additionally to CVS/RCS

comment:8 by gregory.rome@…, 16 years ago

I think that svn support is a great idea but it is not sufficient, I think that
the following functionality should be implemented:

+ visual revisions comparison: the user can compare two revisions with a two

pane s window as text comparison tools (winmerge...). The user can compare
either the latex code or the standard view.

comment:9 by ps@…, 16 years ago

Cc: ps@… added

comment:10 by Richard Heck, 16 years ago

Summary: support for SVN additionally to CVS/RCSSupport for Additional VCS (svn, git, etc)

Updating the summary.

This should not be hardcoded but should instead use something akin to the
Formats or Copiers section of the preferences dialog. Installed VCS should be
detected and configured, and there should be some way of tweaking the settings.

comment:11 by ps@…, 16 years ago

unfortunately some hardcoding for each VCS is necessary as they often differ
philosophically, not just by some syntax sugar. the current infrastructure is
set for RCS and have to be changed if we want something like git.

comment:12 by ps@…, 16 years ago

svn support http://www.lyx.org/trac/changeset/25785

For future references:

  • the error handling has to be completely rewritten
  • cvs update after that or check it the same way as in svn
  • locking architecture governs now, but its appropriatte only for RCS, so this should be changed too
  • svn/cvs diff would be very easy job
  • and the biggest problem : we don't have any annoucement/log of successful case i would love to have it in statusbar, but have failed to put it there. current lfun handling simple destroy any message sent from LFUN_MESSAGE.

mail thread about these:
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg142097.html

comment:13 by ps@…, 16 years ago

Summary: Support for Additional VCS (svn, git, etc)Support for Additional VCS features (git, etc)

comment:14 by ps@…, 16 years ago

Cc: timmichelsen@… added

comment:15 by ps@…, 16 years ago

* #5105 has been marked as a duplicate of this bug. *

comment:16 by ps@…, 16 years ago

From the bug:

Many projects are using distributed version control such as Bazaar, Git or
Mercury (HG).
It would be nice if Lyx could support any of these through a wrapper library.
Maybe there is a python module that does this.
At least for bazaar there is a python module which may be used.

two possibilities:

  1. completely refactorise vcs code.
  2. add only basic support for others in the same manner as here:

http://www.lyx.org/trac/changeset/25785

the more i think about 1. the more nightmares i get :) it seems quite
problematic to devise some API which would cover all so different concepts.

the point 2. is just question of copy/paste the VCS child class and some tuning
about error logs. except git and arch(which i dont belive to be accepted by
other developers, so it would be my personal branch of lyx:) i'm not intersted
in implementing different VCS like bazaar or mercury, but you are free
to post patches, it shouldn't be hard :)

if you have some wrappers/libraries in mind, you can add links...

comment:17 by younes, 16 years ago

I don't see why we should forbid git now that cvs and svn are in...

comment:18 by ps@…, 16 years ago

that was about arch :)

comment:19 by timmichelsen@…, 16 years ago

Hello,
I checked on the python oackages available.

There is one being agnostic about the VCS used:
http://pypi.python.org/pypi/qct/1.5

such a tool was what I had in mind.

With bazaar for instance you can use the usual aliases such as
bzr co
bzr commit
bzr log

I think that we would have a option in the preferences where one may select the
used control system.
Then, Lyx would choose the appropriate commands.
How is this currently implemented?
Does this support only Linux or as well Windows users who may only have
TortoiseSVN on their system?
Does lyx actually controll SVN or just pass the appriate commands through a
command line wrapper?

Kind regards,
Timmie

comment:20 by ps@…, 16 years ago

How is this currently implemented?

currently it is automatically detected which VCS is used (rcs/cvs/svn).
for details read extended features manual and even more details are in
src/LyXVC.cpp and src/VCBackend.cpp :)

Does this support only Linux or as well Windows users who may only have
TortoiseSVN on their system?

you can try to test it and report back :) basically only "svn" binary in the
path is needed.

Does lyx actually controll SVN or just pass the appriate commands through a
command line wrapper?

it just runs commands like svn -q commit file -m "message"
or so.

comment:21 by timmichelsen@…, 16 years ago

Does lyx actually controll SVN or just pass the appriate commands through a
command line wrapper?

it just runs commands like svn -q commit file -m "message"
or so.

This seems to be kind of a wrapper approch. Very nice and flexible.
It could be easy to call
bzr commit foo -m "committing foo"
instead of
svn -q commit file -m "message"

I will try to look at the source. I donno C. Only python and bash.

Thanks!

comment:22 by ps@…, 16 years ago

It could be easy to call
bzr commit foo -m "committing foo"
instead of
svn -q commit file -m "message"

the hardest part would be error detection,i.e. some log parsing.

by timmichelsen@…, 16 years ago

Attachment: VCBackend.cpp_with_bzr added

first proposal: added section for bzr and its commands

comment:23 by ps@…, 16 years ago

the key functions (BZR::scanLogFile, BZR::findFile) remain as it was before, ie
to make your patch work is equivalent to write it from the scratch; sorry i dont
have time for it.

comment:24 by timmichelsen@…, 16 years ago

the key functions (BZR::scanLogFile, BZR::findFile) remain as it was before, ie

to make your patch work is equivalent to write it from the scratch;
maybe it was worth the intention. And someone who knows can help out.

comment:25 by timmichelsen@…, 16 years ago

I just remembered:
I host my repository on a server (FTP) which needs password entry.
Does Lyx already support that?

comment:26 by ps@…, 16 years ago

lyx knows nothing about the network communication, thats the job of vcs.
either you will be asked on console for some password (by vcs, not lyx)
or you have to automatize ftp login (in linux there is .netrc file for it).
good luck.

comment:27 by Richard Heck, 16 years ago

We can come back to this for 1.7. It's too late for 1.6 anyway.

comment:28 by timmichelsen@…, 16 years ago

There is a pythonic abstraction package in development that we could use here:

Be-devel] shameless promotion of my simple vcs abstraction lib
http://void.printf.net/pipermail/be-devel/2008-September/000045.html

http://www.bitbucket.org/RonnyPfannschmidt/anyvc

comment:29 by ps@…, 15 years ago

vc-command for customizations was recently added to the codebase

comment:30 by timmichelsen@…, 15 years ago

Could you please tell, what vc-command would mean?

comment:31 by ps@…, 15 years ago

look for LFUN_VC_COMMAND in LFUNs.lyx once 1.6.2 is released

comment:32 by timmichelsen@…, 15 years ago

Ah, found somehing at:
http://www.lyx.org/trac/changeset/28151

But will this be included in the next 1.6.x?

comment:33 by Uwe Stöhr, 15 years ago

But will this be included in the next 1.6.x?

Yes, http://www.lyx.org/trac/changeset/28151 was the commit for the stable LyX
1.6.x tree, that will become LyX 1.6.2.

What's the status of this bug now?

comment:34 by ps@…, 15 years ago

i would let it open

comment:35 by ps@…, 15 years ago

1.6.3 will support svn file locking

comment:36 by ps@…, 15 years ago

dependson: 2198

comment:37 by ps, 15 years ago

Priority: highlow

comment:38 by ps, 13 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed
Summary: Support for Additional VCS features (git, etc)Support for Additional VCS features
Note: See TracTickets for help on using tickets.