Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Ferg
May 6, 2007

Lipstick Apathy

Milde posted:

If a changeset has more than one child, new branches have been created. If a changeset has more than one parent, a merge has occurred.

http://eagain.net/articles/git-for-computer-scientists/
http://git.kernel.org/?p=git/git.git;a=blob;f=graph.c;h=6746d422a98ed010489d4ce74b26a8a4600b183e;hb=HEAD

This might be easier to read than graph.c, and Mercurial's history model is essentially the same as Git's: http://selenic.com/repo/hg/file/17da88da1abd/hgext/graphlog.py

Ha, okay so this was way simpler than I had imagined. But thanks, much appreciated :)

Adbot
ADBOT LOVES YOU

Pardot
Jul 25, 2001




Ferg posted:

Ha, okay so this was way simpler than I had imagined. But thanks, much appreciated :)

The reason it's called git is because it's a "stupid content tracker". It's incredibly simple in the way it does things, which is good.

Sewer Adventure
Aug 25, 2004

haywire posted:

Because the website is giant and most of the time we need to make small changes that don't require having a copy of several GB site and db on our own boxes. I know it is an un-ideal situation, but I really can't think of a better solution at the moment.The site is some giant hack of a 2003 version of osCommerce, I'm pushing for a rewrite, but there's just so much functionality we'd have to replicate.


I currently work on a site that was a huge (multi-million dollar rev) osCommerce hack and we ported it all to Rails last year and it is beautiful and you can fairly easily duplicate all the functionality of the old site and routes lets you map all the old urls to the new ones and you can have a test suite and it will be the best thing ever you should do it.

Ferg
May 6, 2007

Lipstick Apathy

Pardot posted:

The reason it's called git is because it's a "stupid content tracker". It's incredibly simple in the way it does things, which is good.

Yeah, reading through the article on Git for Computer Scientists really puts a lot into perspective. The trick I'm finding now is that git commit objects are only aware of their parents, not their children, so it's easy enough to figure out when to split the graph moving backwards, but pulling it back in is a bit trickier.

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
I'm trying to get some sort of version control working with my remote web server. I set up an SVN repository (on a hosted service) and figured that if I map my remote web server as a drive in Windows (via FTP) then I would be able to use the TortoiseSVN context menus normally in the mapped folder. However they don't appear at all - what are my other options?

I'm basically trying to commit remote files that I have access to via FTP.

uXs
May 3, 2005

Mark it zero!

supster posted:

I'm trying to get some sort of version control working with my remote web server. I set up an SVN repository (on a hosted service) and figured that if I map my remote web server as a drive in Windows (via FTP) then I would be able to use the TortoiseSVN context menus normally in the mapped folder. However they don't appear at all - what are my other options?

I'm basically trying to commit remote files that I have access to via FTP.

What are you trying to do here exactly? Why do you need a version control system on your webserver?

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

supster posted:

I'm trying to get some sort of version control working with my remote web server. I set up an SVN repository (on a hosted service) and figured that if I map my remote web server as a drive in Windows (via FTP) then I would be able to use the TortoiseSVN context menus normally in the mapped folder. However they don't appear at all - what are my other options?

I'm basically trying to commit remote files that I have access to via FTP.
Is FTP your only method of access to these files? Do you have shell access to the web server? What OS is it running?

Committing files with TortoiseSVN over a drive-letter-mapped FTP server is a bad idea. It isn't the worst idea, and you can probably get it to work, but there are much better ways. TortoiseSVN is probably configured to not display its context menus on network drives, and this is a good thing.

You might transfer everything in bulk to a directory on your machine, and commit from there.

You might consider a distributed version control system like Git or Mercurial -- you can just run git init or hg init on the live web server code, commit it, and clone the repository onto your machine.

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH

Lysidas posted:

Committing files with TortoiseSVN over a drive-letter-mapped FTP server is a bad idea. It isn't the worst idea, and you can probably get it to work, but there are much better ways. TortoiseSVN is probably configured to not display its context menus on network drives, and this is a good thing.
Thanks for the info. Unfortunately FTP is pretty much the only way I can access the files. Right now, I've been pulling each changed file to a local copy and then comitting it - which is a huge pain.

If you have any other ideas I'd love to hear it. I also looked for any settings to enable Tortoise context menus in network mapped drives but couldn't find anything.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

supster posted:

Unfortunately FTP is pretty much the only way I can access the files.
Do you pay for this web hosting?

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH

Lysidas posted:

Do you pay for this web hosting?
Client's development environment :sigh:

It's not ideal, but I'm just trying to come up with the best solution I can with what I have to work with.

supster fucked around with this message at 22:11 on Oct 21, 2009

uXs
May 3, 2005

Mark it zero!
Use a distributed system. You can do whatever the gently caress you want locally, and synchronize it afterwards.

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Can you explain in some more detail how a distributed system will help me where SVN can't? Maybe you can expand on "synchronize it afterwards".

Maybe I should make clear that I'm not doing anything locally, files live remotely and work is done remotely. So "whatever the gently caress you want locally" doesn't help much because ideally* I don't want to do anything locally.



*using the term "ideally" pretty loosely here

uXs
May 3, 2005

Mark it zero!
I was assuming that you can develop locally, and then just swap changesets around with whoever else is working on it. And then release to the webserver when something is done.

If you really have to develop remotely, which sucks, can't you install a VCS remotely as well? Git and Mercurial or whatever don't require a whole lot of installation (though this can perhaps depend on what kind of system it is, maybe.)

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

supster posted:

Can you explain in some more detail how a distributed system will help me where SVN can't? Maybe you can expand on "synchronize it afterwards".

Maybe I should make clear that I'm not doing anything locally, files live remotely and work is done remotely. So "whatever the gently caress you want locally" doesn't help much because ideally* I don't want to do anything locally.

*using the term "ideally" pretty loosely here
What you're doing is all kinds of backwards (or it sounds like it).

How exactly are you editing these files remotely if you don't have the capability to do anything remotely? Are you using a text editor built into an FTP client or something (this is a horrible idea)? When you say that everything is done remotely, are you editing files on the live site (this is an even worse idea)?

You are wrong about not wanting to do anything locally, by the way. Normal development practice is to work in a local copy of the files (a Subversion working copy or a Git working tree or whatever) and commit to the repository as you make your changes. When a feature is complete or stable enough to be pushed to production, you can use the same version control system to update the files on the server (either svn up or git pull).

Whose arm do you have to twist to have your client let you use non-braindead development practices?

I repeat: What OS is the web server running?

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Did you read my posts? I'm not sure how to make it more clear. I don't have shell access to use svn or git on the server. It's a remote development environment for my use only. Production is in a completely different physical server (as is a staging environment and other development environments).

Thanks for telling me that "I am wrong" when I've already said that I'm just trying to come up with a clean and easy-to-use source control system for the environment that I am working in (which cannot be changed). Thanks for your help anyway.


edit: The OS not relevant as my only access remains to be FTP, but it's CentOS I think.
edit2: and yes, obviously I need local copies of the files to make changes and then push back via FTP - but yes, this process is automated by my editor.

supster fucked around with this message at 01:29 on Oct 22, 2009

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

supster posted:

Thanks for telling me that "I am wrong" when I've already said that I'm just trying to come up with a clean and easy-to-use source control system for the environment that I am working in (which cannot be changed). Thanks for your help anyway.

When your work environment consists of cobbling together random tools that are generally inappropriate for the job, it's no wonder that things aren't always going to work ideally.

uXs
May 3, 2005

Mark it zero!

supster posted:

edit2: and yes, obviously I need local copies of the files to make changes and then push back via FTP - but yes, this process is automated by my editor.

So, um, you're making local copies... which you edit... and then copy back? Isn't this like another way of saying that you are developing locally? Then why can't you just version control your local copies?

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH

uXs posted:

So, um, you're making local copies... which you edit... and then copy back? Isn't this like another way of saying that you are developing locally? Then why can't you just version control your local copies?
Because the local copies only exist in a temp directory somewhere as a part of the editor's cache. Anyway, I'm giving up on coming up with an easier solution and sticking with what I've been doing for the rest of this project.

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."
A team here have a recurring problem with SVN automatically merging files during the overnight update and breaking the subsequent attempt to build the code. I wanted to pitch the solution to you guys:

Detect files that will be merged using svn status -u
Rename those files
svn update normally, replacing the moves files
Run the build process, which will use the new version of the files from the server rather than the locally changed one
Possibly copy the local copy of the file back
Record all this in a log file for the user, allowing them to merge the files by hand

Sound alright?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Just so you know, if you run the update using --diff3-cmd thisisnotaprogram, it will simply replace everything it was going to merge (because by giving it a junk command to run you have effectively broken that feature). I don't know if this will help you, but I thought it might.

Argue
Sep 29, 2005

I represent the Philippines
We have an svn-hosted project located at http://ourclientsdomain.com/project/trunk/subproject1 (and subproject2 to subproject6 as well). I'm using git-svn. Unfortunately, our client won't give us permission to view trunk, because it has other projects unrelated to ours, so we need to check them out one subproject at a time. Is there a way to check them out under one git repo, such that I only have to use git-svn rebase/dcommit once whenever I change stuff? (As opposed to going through each subproject that was changed and doing stuff from there)

skidooer
Aug 6, 2001
I cannot for the life of me figure out this one:
code:
local$ git status
# On branch master
nothing to commit (working directory clean)
local$ git push
Everything up-to-date

remote$ git status
# On branch master
nothing to commit (working directory clean)
remote $ git pull
Already up-to-date.
Looks good to me, except several changes made on "local" are not being merged on "remote," despite both systems claiming they are up-to-date. Both "local" and "remote" are pushing/pulling from the same resource (located on a third machine). Is there some crazy git command to force the update, or otherwise fix this problem?

Pardot
Jul 25, 2001




What happens if you do git push origin master? That's assuming that origin is what your remote's name when you do git remote -v

bitprophet
Jul 22, 2004
Taco Defender
Yea, that only makes sense if one of them has incorrect remote settings, or has incorrect tracking/merging settings for their local verison of the master branch. Double check that stuff and you'll hopefully find something amiss. Or print out your remotes / cat your .git/config, and share with us.

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.
Is anyone using AnkhSVN, Visual Studio 2008 with Visual SVN Server? I have some specific issues but wanted to see if anyone out there had experience.

Nevermind, figured it out. The server wasn't setup correctly, so every single solution was going to one repository.

Uziel fucked around with this message at 17:44 on Nov 17, 2009

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.
OK, so I have a trunk version and a branch called 1.0.0. I'm using AnkhSVN's plugin for Visual Studio 2008, and VisualSVN server.

I made some changes to 4 style sheets in the trunk version that I want to push to the branch.

I looked at the merge wizard but I don't understand at all. I just want to overwrite the stylesheets in the branch with those in the trunk.

gold brick
Jun 19, 2001

no he isn't

Uziel posted:

OK, so I have a trunk version and a branch called 1.0.0. I'm using AnkhSVN's plugin for Visual Studio 2008, and VisualSVN server.

I made some changes to 4 style sheets in the trunk version that I want to push to the branch.

I looked at the merge wizard but I don't understand at all. I just want to overwrite the stylesheets in the branch with those in the trunk.
It might help to think of it the other way around. "I want to pull revision {x} from the trunk into my branch". Open up a working copy of the branch and try running the merge wizard from there. You want to merge a range of revisions. If you branched correctly, the merge wizard should autodetect that branch 1.0.0 came from trunk and prepopulate the "Merge from" dialog with something sensible.

wwb
Aug 17, 2004

AnkhSVN is still around? I'd just pay the $10 for VisualSVN and get on with my life . . .

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."

Munkeymon posted:

Just so you know, if you run the update using --diff3-cmd thisisnotaprogram, it will simply replace everything it was going to merge (because by giving it a junk command to run you have effectively broken that feature). I don't know if this will help you, but I thought it might.

Sorry, accidentally unbookmarked the thread. That sounds useful, so I just pass any bullshit there as an argument and it will stop merging?

I'm looking at removing a versioned directory (which, if it matters, has versioned contents inside it) but it may contain unversioned files on other computers. What becomes of those files? Or does it create a conflict and kill the update?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



BizarroAzrael posted:

Sorry, accidentally unbookmarked the thread. That sounds useful, so I just pass any bullshit there as an argument and it will stop merging?

I'm looking at removing a versioned directory (which, if it matters, has versioned contents inside it) but it may contain unversioned files on other computers. What becomes of those files? Or does it create a conflict and kill the update?

That's been my experience on Windows and OSX from at least 1.4.something up to relatively current builds - I haven't had to do it in at least a few months. Relying on it does make me a little nervous because I bet they could change the behavior to throw an error and end the operation if they really wanted, but if they do I hope they add a 'stomp on changes' flag. Also keep in mind that the diff only happens when SVN feels the need to merge things - it won't just stomp on any file newer than the repo copy, but at least it won't try to merge anything.

I'm assuming it will act the same w.r.t. directories with unversioned files as it always does, but I didn't think to test that.

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."

Munkeymon posted:

That's been my experience on Windows and OSX from at least 1.4.something up to relatively current builds - I haven't had to do it in at least a few months. Relying on it does make me a little nervous because I bet they could change the behavior to throw an error and end the operation if they really wanted, but if they do I hope they add a 'stomp on changes' flag. Also keep in mind that the diff only happens when SVN feels the need to merge things - it won't just stomp on any file newer than the repo copy, but at least it won't try to merge anything.

I'm assuming it will act the same w.r.t. directories with unversioned files as it always does, but I didn't think to test that.

May have found a solution that means I won' have to delete the directory, so that's alright. Since testing it involves committing such a change I probably won't test it just to satisfy curiosity.

I do still have a problem with conflicts between unversioned files on working copies and versioned stuff on the server killing updates. Really I want the local stuff to remain without stopping the rest of the update. I can use status -u to find conflict files ahead of time, or get them from update error messages, but is there a way to exclude files from the update? So I can tell SVN to update a whole directory but exclude certain files so the conflict doesn't happen.

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.

wwb posted:

AnkhSVN is still around? I'd just pay the $10 for VisualSVN and get on with my life . . .
Yeah, I had another issue today, and AnkhSVN looks to be the culprit. I grabbed the VisualSVN client today and it has been smoothing sailing. However, its $49 per license now, and I'm not sure my company is going to spring for the cost given how stingy things are recently money wise.

LightI3ulb
Oct 28, 2006

Standard pleasure model.
I have an SVN that stores reports that can be of quite excessive size through use of a perl module. I've been tasked with trying to find a way to have the module be able to add a file to the svn if the file does not already exist.

The easy part is figuring out whether or not the file exists, I just do a checkout on the file and parse the results. The hard part is trying to add the file to the svn when it does not exist. I need to find a way to be able to retrieve the .svn/entries file for the directory without checking out the entire directory.

Is there any way to get the .svn/entries file on its own, or is there a way to add a file to the svn without the .svn/entries file?

chips
Dec 25, 2004
Mein Führer! I can walk!
One thing I haven't been able to work out with git (or it might just be git svn) is how to determine and change what a branch is tracking remotely. It doesn't seem to be in .git/config, and I can't find any mention of it.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

LightI3ulb posted:

I have an SVN that stores reports that can be of quite excessive size through use of a perl module. I've been tasked with trying to find a way to have the module be able to add a file to the svn if the file does not already exist.

The easy part is figuring out whether or not the file exists, I just do a checkout on the file and parse the results. The hard part is trying to add the file to the svn when it does not exist. I need to find a way to be able to retrieve the .svn/entries file for the directory without checking out the entire directory.

Is there any way to get the .svn/entries file on its own, or is there a way to add a file to the svn without the .svn/entries file?
You might consider brushing up on some terminology and fundamental concepts to make communication about this stuff easier. Subversion is a software project. You do not have a Subversion and you do not commit to the Subversion. You have a repository.

Your question about the .svn/entries file is quite strange and I think you're making this a lot harder than it is. That, or I'm totally misunderstanding your question.

To list what's in the repository, use svn ls (this is much better than running 'svn checkout' and parsing that output). To add a file, svn add.

Mine GO BOOM
Apr 18, 2002
If it isn't broken, fix it till it is.

LightI3ulb posted:

The easy part is figuring out whether or not the file exists, I just do a checkout on the file and parse the results. The hard part is trying to add the file to the svn when it does not exist. I need to find a way to be able to retrieve the .svn/entries file for the directory without checking out the entire directory.
If you are asking how to check in one file into a directory without checking everything out, just copy the file directly into the repository with svn copy local.file svn://server/repo/reports/ and it will add it in.

ToxicFrog
Apr 26, 2008


chips posted:

One thing I haven't been able to work out with git (or it might just be git svn) is how to determine and change what a branch is tracking remotely. It doesn't seem to be in .git/config, and I can't find any mention of it.

In plain git, it's in .git/config:
code:
[remote "origin"]
        url = git://orias/git/lua.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "test"]
        remote = origin
        merge = refs/heads/master
Here, both "master" and "test" are set up to track remote branch origin/master.

If git-svn does something weird here, I don't know, sorry.

nelson
Apr 12, 2009
College Slice
I've managed to screw something up every VCS I've come in contact with :doh:. This includes RCS, CVS, Source Safe and Subversion. The RCS and CVS screw ups I was able to recover from using nothing more than an ASCII Text editor. The Source Safe and Subversion screw ups lost my data forever. CVS is generally better than RCS for group work. So if your source files are ASCII text files and you or the people you work with are like me :ohdear: you may want to go with CVS.

nelson fucked around with this message at 05:01 on Jan 16, 2010

shrughes
Oct 11, 2008

(call/cc call/cc)

nelson posted:

:ohdear: you may want to go with CVS.

What is this? What is this post? Advocating CVS? Are you mad? Lunatical? Trolltastic? Uninformanic? Have you, are you, what you, CVS, what have you? Did PC do pituitary pregnant? Where was clownburger when misdrop ice cream codes?

nelson posted:

I've managed to screw something up every VCS I've come in contact with :doh:.

Adbot
ADBOT LOVES YOU

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

nelson posted:

So if your source files are ASCII text files and you or the people you work with are like me :ohdear: you may want to go with CVS.

nelson posted:

I've managed to screw something up every VCS I've come in contact with :doh:.
What the hell is wrong with you? How did you manage to break a Subversion repository unless you were trying to do it on purpose? Did you try to directly edit the repository files, or something?

Try Git and let us know how badly you break it.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply