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
king_kilr
May 25, 2007

Janin posted:

You can give each branch its own directory, so generated temporary files won't get mixed up between branches.
This is terrible, that means when I'm doing development of say, Django, I'd need to muck with my python path since the location of my code would change. Learn to manage your own files properly, I've never once had this temporary files issue.

Janin posted:

It works well on Windows, without having to install a Linux emulation layer, and comes with a GUI if that's your bag.

http://code.google.com/p/msysgit/

Adbot
ADBOT LOVES YOU

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

king_kilr posted:

This is terrible, that means when I'm doing development of say, Django, I'd need to muck with my python path since the location of my code would change. Learn to manage your own files properly, I've never once had this temporary files issue.
You don't have to put them in different directories -- you can always just use the Git way where everything's mashed into one directory, if you want.

Using your Django example, how do you manage changes to the database? I assume you have different database/settings/cache/etc files for each branch, to avoid cross-contamination, and using a merged directory requires lots of temporary "commit; switch; uncommit; commit; switch; uncommit" cycles (which take bloody ages). In Bazaar, I just "cd ../otherbranch".

As for Python paths, if you can't figure out how to use relative paths, maybe the problem is you.

That's like saying I can run SourceSafe natively in Linux, because it works in Wine. I don't want to install GCC/Bash/etc just for a source-control system.

bitprophet posted:

Right, my point is that I think you're working off of old info. I just made a random binary file with dd and then 1) added it as-is, 2) renamed it without modifying it, and 3) renamed AND modified it in the same commit.

[...]

I just tried it with git 1.6.2.3 (latest for download), and it didn't work correctly:
code:
$ dd if=/dev/urandom of=test.bin bs=1024 count=1024
$ git add test.bin
$ git commit -a -m "Created"
$ dd if=/dev/urandom of=test.bin bs=1024 count=1024
$ git commit -a -m "Modified"
$ git mv test.bin test2.bin
$ dd if=/dev/urandom of=test2.bin bs=1024 count=1024
$ git commit -a -m "Moved and modified"
$ git log --follow test2.bin
commit 100444da...
Author: User <user@vm.local>
Date: Fri Apr 17...

    Moved and modified
e: tried again with "git mv", same result

TOO SCSI FOR MY CAT fucked around with this message at 17:58 on Apr 17, 2009

deimos
Nov 30, 2006

Forget it man this bat is whack, it's got poobrain!

Janin posted:

That's like saying I can run SourceSafe natively in Linux, because it works in Wine. I don't want to install GCC/Bash/etc just for a source-control system.

I don't think you "get" msysgit.

king_kilr
May 25, 2007

Janin posted:

You don't have to put them in different directories -- you can always just use the Git way where everything's mashed into one directory, if you want.

Using your Django example, how do you manage changes to the database? I assume you have different database/settings/cache/etc files for each branch, to avoid cross-contamination, and using a merged directory requires lots of temporary "commit; switch; uncommit; commit; switch; uncommit" cycles (which take bloody ages). In Bazaar, I just "cd ../otherbranch".

SQLite is just a file and it's managed in a different repo from my actual work on Django itself.

Janin posted:

As for Python paths, if you can't figure out how to use relative paths, maybe the problem is you.

What? I keep django in /home/user/django_src/ what would you like me to set my python path to such that everything would Just Work(tm) if I were to move it to be in a different directory?

Janin posted:

That's like saying I can run SourceSafe natively in Linux, because it works in Wine. I don't want to install GCC/Bash/etc just for a source-control system.

deimos siad this better than I. Surely you're joking?

tef
May 30, 2004

-> some l-system crap ->

MononcQc posted:

One architect where I work has got some kind of idea he suggested on the corner of a table a few weeks ago, basically replacing the database back-end of a web-service for text and html documents with either git or mercurial.

I thought about doing this for a wiki. Version control is no small amount of effort, and having a git backend (or any dcvs) does have a lot of advantages.

I figured you could just cache a lot of results for speed or otherwise. git is already handling rather large codebases with a large number of committers.

As long as the underlying dcvs was exposed, you could bypass any problems with the web interface, and many people would enjoy having the benefits of dcvs when editing pages or content, rather than the primitive options you get with web-apps.

quote:

Past the loss of full-text search (which could possibly be done anyway by decoupling stuff)

Or extending/wrapping existing tools like git-grep.

quote:

Have anyone ever heard of a similar project being done? I'm looking for success and/or atrocious failure stories.

Many code hosting sites either have wiki pages in the same repository (google code), or text markup enabled when browsing the repository (git-hub), so it's not a new concept in and of itself.

If sites like git-hub and google-code can host a large number of projects I don't imagine there are problems with scalability that can't be solved or have already been solved.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

tef posted:

I thought about doing this for a wiki. Version control is no small amount of effort, and having a git backend (or any dcvs) does have a lot of advantages.

I figured you could just cache a lot of results for speed or otherwise. git is already handling rather large codebases with a large number of committers.

As long as the underlying dcvs was exposed, you could bypass any problems with the web interface, and many people would enjoy having the benefits of dcvs when editing pages or content, rather than the primitive options you get with web-apps.

Ikiwiki is kinda cool, yeah.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

deimos posted:

I don't think you "get" msysgit.

Git's written in C, shell scripts, and Perl. Unless msysgit is a rewrite of all the scripts into C, it will require a UNIX shell, supporting binaries, and Perl to be installed.

king_kilr posted:

SQLite is just a file and it's managed in a different repo from my actual work on Django itself.

And the rest of the file types I mentioned? Not every project is so self-contained that there are no cache or temporary files generated.

king_kilr posted:

What? I keep django in /home/user/django_src/ what would you like me to set my python path to such that everything would Just Work(tm) if I were to move it to be in a different directory?

If you've got a project you're devloping in ~/django_src/, then instead of hardcoding "/home/user/django_src" into testing scripts, just add the project's current directory to the Python path.

king_kilr
May 25, 2007

Janin posted:

Git's written in C, shell scripts, and Perl. Unless msysgit is a rewrite of all the scripts into C, it will require a UNIX shell, supporting binaries, and Perl to be installed.

It's just one installer, so yeah.

Janin posted:

And the rest of the file types I mentioned? Not every project is so self-contained that there are no cache or temporary files generated.

I don't understand this? Delete your temp files, keep them in the repo, or use git stash. You seem to be arguing that people have files that need to exist in the same directory as the repository, need to be long lived, and aren't actually part of the repository.

Janin posted:

If you've got a project you're devloping in ~/django_src/, then instead of hardcoding "/home/user/django_src" into testing scripts, just add the project's current directory to the Python path.

I don't hardcode anything to my other scripts, they simply import django. I have ~/django_src/ on my python path, however if that's a moving target I have to be constantly moving my pythonpath, you seem to be acting deliberately obtuse.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

king_kilr posted:

I don't understand this? Delete your temp files, keep them in the repo, or use git stash. You seem to be arguing that people have files that need to exist in the same directory as the repository, need to be long lived, and aren't actually part of the repository.

That's precisely what I'm arguing, because that's something I've experienced both with my own projects, and others.

king_kilr posted:

I don't hardcode anything to my other scripts, they simply import django. I have ~/django_src/ on my python path, however if that's a moving target I have to be constantly moving my pythonpath, you seem to be acting deliberately obtuse.

So you've got several scripts that are hardcoded to use a particular directory, which may or may not actually be the version they expect to import? Awesome.

Pardot
Jul 25, 2001




Janin posted:

That's precisely what I'm arguing, because that's something I've experienced both with my own projects, and others.
Maybe I also don't get it, but isn't that what .gitignore files are all about?

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

Pardot posted:

Maybe I also don't get it, but isn't that what .gitignore files are all about?

I've got a branch. To work on that branch, I need a large temporary file that takes time to generate. If I switch to another branch, I have two choices:

* Leave the file in place, and risk corruption from two different versions of the code modifying it.
* Delete and re-generate the file each time I change the branch.

sklnd
Nov 26, 2007

NOT A TRACTOR

Janin posted:

I've got a branch. To work on that branch, I need a large temporary file that takes time to generate. If I switch to another branch, I have two choices:

* Leave the file in place, and risk corruption from two different versions of the code modifying it.
* Delete and re-generate the file each time I change the branch.
I really don't see how that is different from a sqlite db (aside from the corruption bit). Seems like you should just move your temp file out of your repo (say, into a tmp directory where it should be anyway?) and have a config setting telling your code where it is. Anything else seems to be a bit insane anyway if you're going to be jumping between such disparate branches often.

TOO SCSI FOR MY CAT
Oct 12, 2008

this is what happens when you take UI design away from engineers and give it to a bunch of hipster art student "designers"

sklnd posted:

I really don't see how that is different from a sqlite db (aside from the corruption bit). Seems like you should just move your temp file out of your repo (say, into a tmp directory where it should be anyway?) and have a config setting telling your code where it is. Anything else seems to be a bit insane anyway if you're going to be jumping between such disparate branches often.

Or I could just not restructure my project to work around deficiencies in the version control.

sklnd
Nov 26, 2007

NOT A TRACTOR
Or you could put temp files where they go, instead of parceling them about the source tree like a temp file Johnny Appleseed and then bitching when your VCS makes that suck.

tef
May 30, 2004

-> some l-system crap ->
Would this happen to be a temporary file with a hardcoded name throughout the project?

If this could be passed as a parameter, could you just not keep multiple versions around.

If you wanted to, you could then add something to your build scripts to get the name of the current branch, and use that to generate the name of the temporary file?


The inability to deal with multiple temporary files is really a deficiency of your process, not the vcs.

ignorant slut
Apr 27, 2008
subversion question:

is there a command that allows one to see commits per author in the repo?

sonic bed head
Dec 18, 2003

this is naturual, baby!
Is it possible to run an svn log that takes into account the current revision and goes some amount of revisions back? Basically I'm looking for something equivalent to this without searching back for a revision number.
code:
svn log -r -5:HEAD

sonic bed head
Dec 18, 2003

this is naturual, baby!

ignorant slut posted:

subversion question:

is there a command that allows one to see commits per author in the repo?

code:
svn log | grep USER_NAME

OddObserver
Apr 3, 2009

sonic bed head posted:

Is it possible to run an svn log that takes into account the current revision and goes some amount of revisions back? Basically I'm looking for something equivalent to this without searching back for a revision number.
code:
svn log -r -5:HEAD

Well... svn log --limit 5 would print the last 5 changelog entries, which may be more than 5 rnumbers back, is that OK? If it's not, dunno of a builtin option, but you could probably grep it out of 'svn info' output easily, so a quick script in your scripting language of choice may be less work than reading the manual.

Sebbe
Feb 29, 2004

So I'm in a small group that's doing a small project for university.

Naturally, version control appeals to me, so it'd be nice to get something set up for the project on some kind of server.

Most of the experience I have with source control comes from working on TAEB. I really do like darcs, but it seems to be pretty much impossible to find somewhere to host it, lest you have a server yourself.

Any recommendations for something I can easily set up, preferably on a HostGator shared account (not likely, it seems) or some sort of free hosting site (Like GitHub and Google Code, for instance, only allowing for private projects without paying a subscription)?

As a last resort, I suppose there is the university servers, though I prefer to keep that as a last resort.

king_kilr
May 25, 2007
http://bitbucket.org/plans/ offers 1 free private repo.

sonic bed head
Dec 18, 2003

this is naturual, baby!

OddObserver posted:

Well... svn log --limit 5 would print the last 5 changelog entries, which may be more than 5 rnumbers back, is that OK? If it's not, dunno of a builtin option, but you could probably grep it out of 'svn info' output easily, so a quick script in your scripting language of choice may be less work than reading the manual.

:)
That's exactly what I'm looking for. I didn't know that there was a limit option.

Sebbe
Feb 29, 2004

king_kilr posted:

http://bitbucket.org/plans/ offers 1 free private repo.

That looks just like what we need; thanks!

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Does anyone have any easier way of commiting partial changes to file(s)?

Right now I go through the annoying process of making a copy of the file I want to commit partial changes of then reverting the original to the HEAD revision. Then I open up the two (in TortoiseMerge) and move the changes I want to commit from the copy to the original, save the original, and commit it.

There's got to be a better way.

No Safe Word
Feb 26, 2005

supster posted:

Does anyone have any easier way of commiting partial changes to file(s)?

Right now I go through the annoying process of making a copy of the file I want to commit partial changes of then reverting the original to the HEAD revision. Then I open up the two (in TortoiseMerge) and move the changes I want to commit from the copy to the original, save the original, and commit it.

There's got to be a better way.

A number of VCSes have this ability built in. darcs has had it for a long time, and I'm pretty sure git's "interactive" commits allow you to cherry-pick, and probably mercurial's as well.

As far as with just SVN (which it seems that you're using, but I can't be sure), I don't know of any better process than what you've got.

supster
Sep 26, 2003

I'M TOO FUCKING STUPID
TO READ A SIMPLE GRAPH
Yep, using SVN. :(

Filburt Shellbach
Nov 6, 2007

Apni tackat say tujay aaj mitta juu gaa!

Sebbe posted:

Any recommendations for something I can easily set up, preferably on a HostGator shared account (not likely, it seems) or some sort of free hosting site (Like GitHub and Google Code, for instance, only allowing for private projects without paying a subscription)?

http://patch-tag.com offers github for darcs. Dunno about private projects.

supster posted:

Yep, using SVN. :(

You could use svk or git-svn, both of which have interactive commit functionality. svk ci -i and git add -p. There would be a lot of other benefits, like every operation not being slow as gently caress.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
Is there a simple way in git to have standing differences between two branches? Eg. if I want to have a release branch with a bunch of dummy config files, and a regular working branch with fleshed-out versions of those same config files, and be able to merge poo poo from the working branch to release without overwriting the release branch's config files or using cherry-pick instead of merging.

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

Otto Skorzeny posted:

Is there a simple way in git to have standing differences between two branches? Eg. if I want to have a release branch with a bunch of dummy config files, and a regular working branch with fleshed-out versions of those same config files, and be able to merge poo poo from the working branch to release without overwriting the release branch's config files or using cherry-pick instead of merging.

  • Prepare working branch
  • Branch from working branch to create release branch
  • Change config files in release branch, and commit
  • Make commits in working branch
  • Merge from working branch to release branch
    • If none of the working branch commits touched the config files, then the merge will not change the config files in the release branch
    • If the working branch commits changed the config files, then there will be a merge conflict for you to resolve. If these are the only merge conflicts you expect, you can just use the "ours" merge strategy to automatically resolve them by throwing away the changes from the working branch that conflict.

Filburt Shellbach
Nov 6, 2007

Apni tackat say tujay aaj mitta juu gaa!

Otto Skorzeny posted:

I want to have a release branch with a bunch of dummy config files, and a regular working branch with fleshed-out versions of those same config files

We solve that one by having two config files: config.yml which is versioned and site_config.yml which is not. site_config trumps config. If you're using Perl then Hash::Merge is perfect for combining the configs.

sonic bed head
Dec 18, 2003

this is naturual, baby!
I had a trunk directory out of which I made a branch a few months ago. All development was in the branch and we had < 10 small bug fixes in the trunk. I merged the trunk into the branch so now all of the bug fixes are in the branch and the branch is now the perfect production ready bit of code. How can I now just move this directly to the trunk directory and keep the correct revision history? I tried merging the branch back into the trunk and it skipped a million things and had conflicts, which shouldn't happen because nothing has changed in those files. Some files even had the status "R" which I can't find documented anywhere. Thanks in advance.

wolffenstein
Aug 2, 2002
 
Pork Pro
I've been having a hell of a time trying to send all my git commits to an empty subversion repo. There are some pages I found through Google, but their instructions don't work with the newest versions of git. Any help?

Pardot
Jul 25, 2001




Just heard about this at railsconf, and it seems cool: http://hg-git.github.com/

It lets you use HG clients but store everything in a git repo. It's not 100% yet, though.

uXs
May 3, 2005

Mark it zero!
I'm using git on Windows, and I want to configure an external tool (diffmerge) for diffs. I'm supposed to set an option "diff.external" as the command to call the tool. So I did, but when I call "git diff", the external tool isn't called, it just shows the diff right in the git bash shell. It also doesn't complain when I put gibberish in the diff.external option and then call diff.

The manual says that the environment variable GIT_EXTERNAL_DIFF would override diff.external, but I don't have it set.

I configured diffmerge as an external tool as well, and that does work. I got all the info on how to configure it from http://www.davesquared.net/2009/02/setting-up-diff-and-merge-tools-for-git.html

Any ideas?

moneydick
Jul 2, 2004
YUMZER
We are an SVN house, for the reals... Someday I'll try to get everyone on the Git, but one thing at a time.

I have a Q... Looking to create a simple file upload system that users can access via normal login credentials that would store (potentially in SVN) all versions of those files. User would hopefully then have access to all version of same file. Anything prebuilt out there that yall have used for this?

(UPDATE: this is for the internet. 'End users' 'Joe sixpack')

epswing
Nov 4, 2003

Soiled Meat
Something is wrong with this reporistory and I don't know what. Server is 1.4.6, Client is 1.5.3 (tortoise).

There's a directory, <root>/WEB-INF/classes which I don't want in the repo. So I delete it using tortoise (equivalent of `svn rm` I'm assuming), commit that change, then add an svn:ignore property to the <root>/WEB-INF directory (to ignore "classes"). When I build my project, the classes folder is created and populated, but instead of looking like it's ignored, it looks like there are changes (red exclamation point).

Trying to commit from <root> I get "no files to commit", running an update on <root> yields no changes, however running an update on <root>/WEB-INF/classes brings in a load of .class files, reason is "Restored".

What's going on here?

wwb
Aug 17, 2004

Just ignore the folder without deleting the files.

epswing
Nov 4, 2003

Soiled Meat
"Ignore strange behavior" is not a real solution. Something is definitely wrong here, either in my understanding or in svn itself.

wwb
Aug 17, 2004

Sorry, that was pre-coffee. By ignore I meant svn-ignore the folder and don't bother deleting the files. SVN should take care of the rest.

Adbot
ADBOT LOVES YOU

sonic bed head
Dec 18, 2003

this is naturual, baby!

epswing posted:

"Ignore strange behavior" is not a real solution. Something is definitely wrong here, either in my understanding or in svn itself.

I am pretty sure that your understanding of what svn:ignore does is incorrect. svn:ignore has nothing to do with the repository/server. It is just a setting that tells the client to ignore that directory when updating/committing. It doesn't mean that you can't force an update by calling it directly on that directory, it just means that if a higher directory is updated, svn will ignore updating that directory from the repository.

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