The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Version labeling is out of control iBot UNIX and Linux RSS News 0 06-07-2008 10:40 AM
Check version of Oracle am_yadav SUN Solaris 1 02-04-2008 06:46 AM
How do you automate an hourly file check? mals UNIX for Dummies Questions & Answers 1 01-15-2007 10:37 AM
Version Control Deepa UNIX for Dummies Questions & Answers 3 05-12-2002 03:51 PM
to check version to library dilipluhar High Level Programming 1 09-16-2001 12:32 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-10-2008
siegfried siegfried is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 91
How to automate check outs from version control?

I'm in a fustrating situation where I am repeatidly checking code, editing,
synchronizing, finding something is broke, reverting all my changes and starting over. This if often easier than trying to merge my changes with someone who has beat me to the checkin.

Is there a way I can mitigate this with a script? Doing perl search and replace on files helps. I know there are some patch utilties that will generate a patch file that (I think) are part of CVS. The problem is that we are not using CVS or SVN.

Is there an open source utiltity, perhaps a perl module, that will apply the changes I have made to a file again when I have starting over from a fresh checkout? I was hoping for one based on search strings instead of line numbers.

It seems like there should be a way to make emacs save a journal that I can execute again later.

Thanks,
siegfried
  #2 (permalink)  
Old 04-10-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
If it's not SVN or CVS then what are you using?

Sounds like you should look at some of the distributed version control systems out there. Some have pretty sophisticated patch handling. Darcs is supposed to be good at this, although I can't say I've had it live up to its promise for me. (I like it a lot, otherwise.)
  #3 (permalink)  
Old 04-10-2008
siegfried siegfried is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 91
Dont' ask me, I just work here!

I am told we are using a derivative or variant of perforce called source depot. I don't know how this could be because I've used perforce before and this command line interface is quite different. Also, I don't understand how a derivative or variant of a commercial product like perforce could exist.

I do have rcs installed for my personal use: that must be able to compute and execute deltas.

Anyway, I did not select source depot. I'm just "contingency staff". It's command line interface sure is crude compared to the nice GUIs available for CVS and SVN.

My prediction came true again today! Only this time, it is because I broke the build and I have to revert everything to fix that immediately.

So I did my editing with using elisp code and saved that code so I could execute my editing changes again. There must be a better way!

Siegfried
  #4 (permalink)  
Old 04-11-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
You certainly can use RCS locally if Source Depot will allow that. You don't even have to have the ,v files in the same directory or a subdirectory, although I'm not sure this is documented anywhere -- I saw a colleague use that and vaguely recall having read about it somewhere, but I could not find it in the documentation when I wanted to read about it.

(This is from memory, I don't have RCS here.)


Code:
co file /path/to/file,v

Similarly for ci, rlog, etc.

If the conflicts are complex, you still end up with a mess. I hear Mercurial (or was it Monotone?) is supposed to bring some relief to resolving conflicts. Also, have you tried xxdiff, emerge (if you use Emacs) or some other dedicated diff merge tool?

Of course, according to theory, you should talk to your colleagues so you can avoid conflicts, not just struggle with a merge tool in your cubicle.
  #5 (permalink)  
Old 04-11-2008
siegfried siegfried is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 91
How to compute deltas and execute them?

Can you help me understand the rcs commands to compute the deltas between two files and save the delta so I can apply it again after I have reverted using source depot?
Siegfried
  #6 (permalink)  
Old 04-12-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
It's all just diff and patch anyway, RCS doesn't particularly add anything to that. I have been assuming you've tried diff and patch already and not been happy with the result? If not, try that first.


Code:
mv file file.mine
sd revert file # or whatever the command to revert is
diff -u file file.mine >mine.patch
sd get # or whatever you do to bring in the latest version
patch <p0 mine.patch
# pore over conflicts
sd commit
rm file.mine mine.patch

It's been a long time since I used RCS, but if I remember correctly, even CVS brings substantial improvements to conflict handling in particular. There's nothing to prevent you from checking the files into a local CVS repo, save for the CVS directory which might upset another version control system, and/or need manual sync if you use another version control in tandem.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0