Emacs.VersionControl History

Hide minor edits - Show changes to output - Cancel

 
 
March 09, 2009, at 08:59 PM by OtherMichael - using RCS notes
Added line 2:
(:toc:)
Added lines 50-91:

!!Using RCS in GNU Emacs
(adapted from http://agave.garden.org/~aaronh/rcs/emacs.html)

Emacs has integrated support for RCS (and other version control systems). Emacs looks for RCS comma-v ([@,v@]) files in the current directory or in an RCS subdirectory.
Version Control Commands in Emacs

Commands are located in the menu system in Tools...Version Control. The keyboard command prefix for all version control commands is [@C-x v@].

!!!Starting a File in RCS with Emacs
To check in a new file to RCS - Register command (keyboard sequence [@C-x v i@] or [@C-x v v@].

!!!Interpretering the Emacs Mode Line
Files that are using RCS will have the following status line:

->[@--1-:%%-F1  strntok.c        (C RCS-1.2)--L1--Top-------@]

The [@%%@] indicates the buffer is read-only. The [@RCS-1.2@] indicates that this file is under RCS control, and you are viewing revision 1.2.

!!!Checking Out and Editing File
To checkout and be able to edit the file - Check In/Out command [@C-x v v@] The status line will now be:

->[@--1-:---F1  strntok.c        (C RCS:1.2)--L1--Top------@]

The missing [@%%@] means the file is writeable, and the semicolon (: after RCS, resulting in RCS:, means the file is locked.

!!!Viewing the Changes with [@rcsdiff@]
To compare the current version of the file you're editing with the last version in RCS - Compare to Last Version [@C-v =@], which opens a buffer with the output of the rcsdiff command.

!!!Checking in Changes
To check in files use the same command as check out - Register command [@C-x v v@]

Checking in files results in Emacs asking to save the buffer it hasn't been saved, and creates a window (buffer *VC-log*)to enter a change comment. Emacs tells you to type [@C-c C-c@] when done.

!!!Reverting to Undo Changes
To undo all the changes to a file - Revert to Last Version [@C-x v u@]

!!!Viewing the Revision Log
The meta revision information of a file - Show History [@C-x v l@]

!!!Viewing Another Revision
View another revision of a file in another window - Show Other Version [@C-x v ~@]
 
 
March 09, 2009, at 08:49 PM by OtherMichael -
Changed line 31 from:
!! Using CVS inside of Emacs
to:
!![[#CVS]] Using CVS inside of Emacs
Changed line 39 from:
!! RCS
to:
!![[#RCS]] RCS
Changed line 51 from:
!! Mercurial integration
to:
!![[#mercurial]] Mercurial integration
 
 
February 21, 2009, at 02:47 PM by OtherMichael - more on rcs
Added line 30:
Added line 38:
Changed lines 45-60 from:
NOTE: Emacs + RCS works happily at the [=UofS=] - it's quite convenient. This is a [=FreeBSD=] system. RCS is the basis for CVS. Smaller footprint and good for individual files. Haven't gotten it installed and working on windows, though....


o-kay. getting closer. copied command-line built (provided
to me in the inevitable error message) and when tunning from the cmd-shell, found a new error : [@The TZ environment variable is not set; please set it to your timezone@] - set it per [[http://www.mail-archive.com/help-rcs@gnu.org/msg00588.html|this suggestion]], and it ran.

but not from w/in emacs
. so go figure.


okay. On Monday, I got RCS errors on checkins - it was insisting that
it should checking the file that was in the RCS directory, and so it would not fine /RCS/RCS/target.file grrrr...

Aaaaand, Wednesday, no reboot, no restart of emacs (that I can recall) -- it's working. AAAARGH! I'm happy it's working -- but... why? Is this repeatable? I hate cargo-cult engineering....

Thursday -- wasn't working, again.

Saturday -- I launch [@emacs.exe -q@] - and all RCS command work just fine. create directory, register, check in, check out, etc. That's a good, and annoying, sign. I've looked through my [@.emacs@] file -- nothing obvious jumps out. Perhaps one of the auto-loaded directories? :::sigh::: well, I'll get there....

to:
I had issues with RCS under my [=WinXP EmacsW32=] set-up. Usually it wouldn't work; sometimes it would. It would always work from the command-line (cmd-shell outside of Emacs). Finally, I found some some other installation of [@ci.exe@] (etc.) that had a higher-priority in my path. Or at least the Emacs path. I re-orged my PATH environment-variable to put the RCS/bin directory much earlier than it was. But if that were the problem/solution, it never would have worked from the command-shell in the first place. Hunh. My other thought was that Cygwin was interfering, somehow -- but that isn't even in the path. So, I am left with RCS working, but no definitive answer for how I fixed it. Aaaargh. cargo-cult programming, once again....

Changed lines 54-56 from:
to:
I used Mercurial (from Emacs, mostly) for a few months at work. Ultimately, I ran afoul of case-sensitivity issues. Windows is not case-sensitive, Mercurial is. And since it allowed me to enter the same file in different casings (eg [=myFile.txt and MyFile.txt=]) - case-sensitive MErcurial insisted they were different files, yet part of the same archive-file (however it internally works) and wouldn't let me retrieve anything. Several weeks of commits lost to a case issue. Aaaaargh. I found a reference to somebody facing the same problem, who got around it by patching and recompiling the source. I lost the reference, and didn't attempt it, either. :::sigh:::

Deleted line 65:
[[IT.UsingCVS#Emacs]]
 
 
February 21, 2009, at 01:47 PM by OtherMichael - more RCS issues and notes
Changed lines 55-61 from:
to:
Thursday -- wasn't working, again.

Saturday -- I launch [@emacs.exe -q@] - and all RCS command work just fine. create directory, register, check in, check out, etc. That's a good, and annoying, sign. I've looked through my [@.emacs@] file -- nothing obvious jumps out. Perhaps one of the auto-loaded directories? :::sigh::: well, I'll get there....

If anybody asks "why on earth use RCS when, since you have a local server installed, you could use CVS?", I would respond that I prefer using CVS for projects, but RCS is handier for one-off files here and there. Or so it seems to me.

Changed line 80 from:
[[!Emacs]] [[!VersionControl]]
to:
[[!Emacs]] [[!VersionControl]]
 
 
February 18, 2009, at 11:07 PM by OtherMichael - RCS happiness and irritation
Added line 39:
[[http://agave.garden.org/~aaronh/rcs/emacs.html|Using RCS in GNU Emacs]]
Changed lines 41-42 from:
to:
EmacsWiki:PclCvsTips
Changed lines 48-51 from:
but not from w/in emacs. so go figure....


EmacsWiki:PclCvsTips
to:
but not from w/in emacs. so go figure.


okay
. On Monday, I got RCS errors on checkins - it was insisting that it should checking the file that was in the RCS directory, and so it would not fine /RCS/RCS/target.file grrrr...

Aaaaand, Wednesday, no reboot, no restart of emacs (that I can recall) -- it's working. AAAARGH! I'm happy it's working -- but... why? Is this repeatable? I hate cargo-cult engineering....
 
 
February 16, 2009, at 01:46 PM by OtherMichael -
Added line 38:
EmacsWiki:RevisionControlSystem
 
 
February 11, 2009, at 08:28 PM by OtherMichael - getting closer?
Added lines 41-46:


o-kay. getting closer. copied command-line built (provided to me in the inevitable error message) and when tunning from the cmd-shell, found a new error : [@The TZ environment variable is not set; please set it to your timezone@] - set it per [[http://www.mail-archive.com/help-rcs@gnu.org/msg00588.html|this suggestion]], and it ran.

but not from w/in emacs. so go figure....

 
 
January 07, 2009, at 09:23 AM by OtherMichael - RCS notes, link moved from main page
Changed lines 37-40 from:
NOTE: Emacs + RCS works happily at the [=UofS=] - it's quite convenient.
to:
!! RCS
[[http://obsidianrook.com/devnotes/joys-of-rcs.html|rcs under Emacs]]

NOTE: Emacs + RCS works happily at the [=UofS=] - it's quite
convenient. This is a [=FreeBSD=] system. RCS is the basis for CVS. Smaller footprint and good for individual files. Haven't gotten it installed and working on windows, though....
 
 
November 28, 2008, at 09:02 AM by OtherMichael - xref
Added lines 56-57:
Programming.VersionControl
 
 
November 26, 2008, at 08:42 PM by OtherMichael -
Added lines 38-40:

EmacsWiki:PclCvsTips

 
 
November 26, 2008, at 08:33 PM by OtherMichael -
Added lines 35-37:
[[http://www.xemacs.org/Documentation/packages/html/pcl-cvs_3.html|Getting Started with PCV-CVS]]

NOTE: Emacs + RCS works happily at the [=UofS=] - it's quite convenient.
 
 
November 04, 2008, at 11:15 AM by OtherMichael - change logs
Changed line 1 from:
(:description versions:)
to:
(:description different strokes:)
Added lines 39-45:

!! Log files
[[http://aaronhawley.livejournal.com/15389.html|the logfile will never go away]]

>>clip<<
[=The problem is that the relation between version control software and ChangeLog files isn't automatic enough as it should be. [....] In Emacs, ChangeLog support is quite successful.=]
>><<
 
 
November 03, 2008, at 09:23 AM by OtherMichael - Mercurial and .emacs examples
Added lines 1-29:
(:description versions:)
!! Native Emacs "versioning" - backups, etc.
TODO: more notes

from my [@.emacs@]:
(:source lang=lisp:)
;; Put autosave files (ie #foo#) in one place, *not*
;; scattered all over the file system!
(defvar autosave-dir "~/autosaves/")

(make-directory autosave-dir t)

(defun auto-save-file-name-p (filename)
  (string-match "^#.*#$" (file-name-nondirectory filename)))

(defun make-auto-save-file-name ()
  (concat autosave-dir
  (if buffer-file-name
      (concat "#" (file-name-nondirectory buffer-file-name) "#")
    (expand-file-name
    (concat "#%" (buffer-name) "#")))))

;; Put backup files (ie foo~) in one place too. (The backup-directory-alist
;; list contains regexp=>directory mappings; filenames matching a regexp are
;; backed up in the corresponding directory. Emacs will mkdir it if necessary.)
(defvar backup-dir "~/backups/")
(setq backup-directory-alist (list (cons "." backup-dir)))
(:sourceend:)

Changed lines 31-33 from:
http://www.eyrie.org/~eagle/notes/cvs/emacs.html
http://www.cs.utah.edu/dept/old/texinfo/cvs/pcl-cvs_toc.html
http://ximbiot.com/cvs/cvshome/cyclic/cvs/soft-pcl.html
to:
[[http://www.eyrie.org/~eagle/notes/cvs/emacs.html|Using CVS inside emacs]]
[[
http://www.cs.utah.edu/dept/old/texinfo/cvs/pcl-cvs_toc.html|http://www.cs.utah.edu/dept/old/texinfo/cvs/pcl-cvs_toc.html]]
[[http://ximbiot.com/cvs/cvshome/cyclic/cvs/soft-pcl.html|out-of-date Emacs PCL-CVS info]]


!! Mercurial integration
Stack Overflow: [[http://stackoverflow.com/questions/247544/best-mercurial-mode-for-emacs|best Emacs mode for Mercurial]]

 
 
February 06, 2008, at 09:23 AM by MichaelPaulukonis -
Added lines 1-10:
!! Using CVS inside of Emacs
http://www.eyrie.org/~eagle/notes/cvs/emacs.html
http://www.cs.utah.edu/dept/old/texinfo/cvs/pcl-cvs_toc.html
http://ximbiot.com/cvs/cvshome/cyclic/cvs/soft-pcl.html

!! See Also
[[IT.UsingCVS#Emacs]]

!! Tags
[[!Emacs]] [[!VersionControl]]