Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Learning How to Use CVS for Personal Perl Coding Practices

by Rhose (Priest)
on Nov 03, 2005 at 15:13 UTC ( [id://505385]=note: print w/replies, xml ) Need Help??


in reply to Re: Learning How to Use CVS for Personal Perl Coding Practices
in thread Learning How to Use CVS for Personal Perl Coding Practices

While there is nothing incorrect with your example, I've followed the suggestion of using trunk, tags, and branches, and have found it to be very helpful. (Use branches for parallel development... like migrating code to a new platform while development continues on the current one. Use tags for "point in time" snapshots.) I use this structure even for repositories for which I'm *sure* I'll never need them. (If, for no better reason, than to always know I need to check out the trunk on any given repo.)

You set this up before the initial import. Create a directory (let's assume /home/rhose/svn). In this directory, create three more directories -- trunk, tags, and branches. Place all your directories/code in the trunk directory.

cd /home/rhose mkdir svn cd svn mkdir trunk mkdir tags mkdir branches cd trunk cp /home/rhose/work/project123/* .

You are now ready to import. (Please note, I'm using the Subversion daemon in this example.)

svn import /home/rhose/svn svn://myserver/myrepo -m "Initial import"

You are now free to nuke your import structure, checkout the trunk, and start working. Also, I like to make a temporary copy of the original files until I verify the repo import worked correctly and everything is in there... I've never had a problem, but I tend to play it extra safe. (Please note... once you check out a repo, do NOT mess with the .svn directories -- like Bruce Banner, you'll not like them when they're angry.)

cd /home/rhose/svn rm -rf * cd /home/rhose/work mv project123 project123.save mkdir project123 cd project123 svn checkout svn://myserver/myrepo/trunk/ . vi mycode.pl svn commit -m "Made change XXX for project YYYY" cd .. rm -rf project123.save

If you are in a Windows environment, I'd like to second tphyahoo's advice -- TortoiseSVN is wonderful.

Replies are listed 'Best First'.
Re^3: Learning How to Use CVS for Personal Perl Coding Practices
by neversaint (Deacon) on Nov 03, 2005 at 16:57 UTC
    Dear Rhose,
    [snip] svn://myserver/myrepo [snip]
    Where and how do you set/define this server repository? Say if I am only working locally for myself.

    ---
    neversaint and everlastingly indebted.......
      Read chapters 1,2,3,5, and 6 of The SVN Book referenced in the posts above.

      Basically, instead of writing to a local file, you can share your repository (make it available for people on other computers) using a Subversion daemon or Apache. This takes a little bit of effort to set up, but it works well.

        If he is only using this for his own code and for code contributed by those with an account on the same machine then local repository access is sufficient. He can access it remotely (via ssh) with a url like svn+ssh://machine/path/to/repository

        - caedes

      The url for a local repository is file:///path/to/repository

      - caedes

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://505385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2024-03-28 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found