Commit Graph

165 Commits

Author SHA1 Message Date
Yuriy Skalko
d927e9343c Suppress unneeded git log output 2020-12-28 15:44:39 +02:00
Richard Kimberly Heck
8c805db9d3 Typo 2020-12-18 17:35:58 -05:00
Richard Kimberly Heck
49f019e129 Remove unnecessary change. 2020-12-18 17:11:05 -05:00
Richard Kimberly Heck
03897206bb Minor code simplification 2020-12-18 16:59:57 -05:00
Richard Kimberly Heck
7e5c42593e Simplify checking whether files are controlled by SVN and GIT. 2020-12-18 16:43:52 -05:00
Richard Kimberly Heck
05551a7cfb Remove unused return values and useless member assignment.
The master_ variable holds a FileName that points to the meta-data
for this file, e.g., CVS/Entries. There is no such thing in SVN or GIT.
So we remove that variable from those classes.
2020-12-18 16:27:57 -05:00
Richard Kimberly Heck
77cdef1fe0 Allow registration of files with svn when parents directory is not yet registered. 2020-12-18 16:01:43 -05:00
Richard Kimberly Heck
fdbbddecb7 Fix bug with registering files for VC when they are in repo subdirs. 2020-12-18 15:48:51 -05:00
Richard Kimberly Heck
2405788d84 Style 2020-12-18 14:56:18 -05:00
Richard Kimberly Heck
73e7cfb26a Const 2020-12-18 14:55:58 -05:00
Richard Kimberly Heck
68e60f95d3 Remove unused file output 2020-12-18 14:51:56 -05:00
Richard Kimberly Heck
fd4d546d5b Comment 2020-12-18 14:50:13 -05:00
Richard Kimberly Heck
bd306ae118 Style 2020-12-18 14:37:58 -05:00
Pavel Sanda
b670990bc1 Improve VCS error message when RCS is not installed.
User's report that it takes time to realize what package
is 'ci' part of, so we can give a hint for the initial
file registration.
2020-12-04 18:16:44 +01:00
Yuriy Skalko
7779316e6c Include standard <regex> 2020-11-29 15:27:28 +02:00
Yuriy Skalko
196d9caeb0 Clean includes using the output of iwyu tool 2020-10-20 11:38:55 +03:00
Yuriy Skalko
fe85162a29 Refactoring 2020-10-05 14:55:00 +02:00
Richard Kimberly Heck
3b2bcef455 Fix some warnings. 2020-05-03 02:46:11 -04:00
Pavel Sanda
a6634f5bb3 git VCS: add support for short hashes in inset info ("Abbreviated revision").
Fixes bug #11620.

Patch from Joel Kulesza.
2019-07-28 22:01:17 +02:00
Pavel Sanda
eceed02a90 Do not issue error dialog when no tag is found in git repo for tree-revision info.
Reported by Joel Kulesza.

Candidate for branch.
2019-07-25 14:31:20 +02:00
Jean-Marc Lasgouttes
ca217fbfaa Check regex_match result when parsing cvslog
Spotted by coverity.
2019-07-13 00:10:32 +02:00
Pavel Sanda
8c24070c85 RCS: commit undo allowed only in unlocked state. 2018-01-10 10:47:48 +01:00
Christian Ridderström
95e7abadc0 Add missing 'break' for four default cases in VCBackend.cpp
Replace four cases of 'default: ;' in VCBackend.cpp with
    default:
        break;

Justification: Make consistent with the rest of the LyX source code.
I found no other occurences of 'default: ;' in the source.
2017-07-30 14:23:38 +02:00
Jean-Marc Lasgouttes
d54578a951 When scanning CVS skip unreadable lines
Spotted by coverity.
2017-03-31 11:33:34 +02:00
Jean-Marc Lasgouttes
5d8918f68f Compilation fix
It is actually better to compile code before pushing changes...
2017-03-11 20:51:39 +01:00
Jean-Marc Lasgouttes
d6d412c49e Limit the size of strings we read from RCS
This calms down Coverity which fears than an evil RCS repository would break LyX.
2017-03-11 20:46:32 +01:00
Guillaume Munch
0cb85e9206 Disable edition when external modifications are detected
Introduce a distinction between being read-only and having the read-only flag. A
buffer is read-only if either it has been externally modified or if it has the
read-only flag.
2017-03-11 00:50:57 +01:00
Jean-Marc Lasgouttes
a4e7114d98 Typo 2016-10-19 11:21:02 +02:00
Stephan Witt
ac4cca6ed4 Fix missing includes after change 670efa8f64 2016-07-04 12:11:24 +02:00
Richard Heck
355395174b Mark a number of coverity false positives.
Fixes coverity #23284, 23285, 23286, 23287, 23289.
2016-06-11 23:09:30 -04:00
Stephan Witt
89985bebf9 #9940 VCS now toggles buffer read-only state if locking is not active and it is enabled by VC backend 2016-02-20 07:32:56 +01:00
Stephan Witt
faef2f93dd fix GIT - version control for LyX documents not detected 2016-01-17 08:03:57 +01:00
Uwe Stöhr
5fe5ae3e80 VCBackend.cpp: addendum to [f51d7fdd/lyxgit] 2015-07-16 21:10:50 +02:00
Enrico Forestieri
306b136cc0 Fix bug #4812 (Layout in local directory lost on Save As, Copying)
The "save-as" part of the bug is fixed by extending the \textclass tag
such that, if a local layout file is used, its path relative to the
document directory is now stored together with the name. If a relative
path cannot be used, an absolute one is used but, in this case, the
document is not usable on a different platform.

The "copy" part is fixed by introducing a new \origin tag, which is
written when the file is saved. This tag stores the absolute path of
the document directory. If the document is manually copied to a
different location, the local layout file is retrivied by using
\origin (which is only updated on save).
This new tag may prove useful also for locating other files when the
document is manually moved to a different directory.

As in the original implementation the files needed for the layout
(for example, a latex class) had to be in the same directory as the
layout file, this directory has also to be added to TEXINPUTS.
2015-05-13 22:02:13 +02:00
Scott Kostyshak
36c3495a3a Correct the spelling of "occured" to "occurred" 2015-02-09 18:44:02 -05:00
Georg Baum
06cfd26d5e Fix return value of CVS::toString() + cosmetics
CVS::toString() returns a docstring, so rather be explicit than relying on a
cast that not everybody understands how it works at first sight.
2014-11-30 12:41:49 +01:00
Georg Baum
f09a9fe2e6 Remove unsafe method FileName::tempName()
FileName::tempName() created a new temp file name by using qt to create a
temporary file with a unique name, and then deleting that file and returning
the name. This was unsafe, since other processes or even other threads of the
running LyX could create files with the same name between deletion and then
using the temp name.
This is fixed by using the TempFile class instead. As a side effect, a few
cases where the temp files were not deleted after usage were fixed as well.
The only place that is still unsafe is createTmpDir().
2014-06-09 13:05:50 +02:00
Pavel Sanda
154319d063 Remove some header leftovers based on Scott's script hints.
False positive rate of hints is quite high. Although the includes can be
technically removed (due to other includes) they logically belong to the
header.
2013-05-02 00:30:16 -07:00
Pavel Sanda
fb16e5cca1 Make parameter more readable. 2013-04-13 21:56:52 -07:00
Tommaso Cucinotta
7779d46920 Replacing git status --porcelain along with output parsing, with a simple git ls-files.
git ls-files tells me straight whether or not a file-name is in the repo.
I cannot say the same of git status --porcelain.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
2013-04-11 02:04:25 +01:00
Tommaso Cucinotta
34dfe2d71e Avoid check mistakenly current folder for .git/.svn/.CVS, when going up the path checking for parents. 2013-04-11 02:04:24 +01:00
Georg Baum
ceb2303e2b Remove partial support for non-buffer files in VCS
This reverts a small part of 0526eb9d and gets rid of the double calls of
SVN::findFile() and GIT::findFile(). Please note that git detection does
currently not work because of 26dd4d0c.
2013-04-10 22:31:38 +02:00
Tommaso Cucinotta
26dd4d0c15 Now LyX correctly asks to retrieve non-existing file from GIT repo only if the file is actually registered in repo.
See also discussion at: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177840.html
2013-04-06 16:12:06 +01:00
Vincent van Ravesteijn
41843646b7 Fix monolithic build 2013-03-18 20:42:28 +01:00
Pavel Sanda
f7d47a803d git typo 2013-02-17 23:30:07 -08:00
Pavel Sanda
8ef1e2b9df Git VCS: use describe for tree revision info. 2013-02-17 23:22:50 -08:00
Pavel Sanda
6ba3e8d408 Leftover from SVN. 2013-02-09 19:50:06 -08:00
Pavel Sanda
75090250d4 Add very simple revision comparison for git.
At this moment we do not allow comparison between arbitrary hashes,
but except GUI the code is ready.
Thanks to the powerful way of git addressing we could even ask
for comparisons like '-2 weeks back' if someone wants to play
with GuiCompareHistory.
2013-02-09 19:35:22 -08:00
Georg Baum
22b7ad2b0a Implement revision info for git 2013-02-08 21:02:37 +01:00
Georg Baum
2f9ef2b98a Implement very basic git support
Only the local index is considered, no remote repo. Also getting the revision
(aka commit hash) is missing. How push and pull could be integrated with the
LyX VCS interface needs to be discussed, but the implemented functionality was
quite straight forward.
2013-02-06 22:07:31 +01:00