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
Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Mithaldu posted:

Last i checked submodules are flat out retarded and require you to do the following to keep your own repo in synch with a subbed repo:

1. update submodule repo
2. commit to own repo that the subbed repo was updated

Unless you do this everytime the subbed repo changes, your repo will just stick to the old state at which the subbed repo was added first.

This is what I'm understanding from what I'm reading as well.

Who is going to remember to do that every time?

Adbot
ADBOT LOVES YOU

Mithaldu
Sep 25, 2007

Let's cuddle. :3:
I don't know a single person who actually uses them.

ColdPie
Jun 9, 2006

Mithaldu posted:

I don't know a single person who actually uses them.

We use submodules at work. They work very well if you know what you're doing, but it's easy to get lost. They're a great solution to the problem for which they were intended, but a nightmare if you're trying to use them to solve a different problem.

sonic bed head
Dec 18, 2003

this is naturual, baby!
Does anyone know of any resources that I can read that can help me in an effort to have a CVS and mercurial version of a codebase that can be easily kept in sync? The higherups don't yet want a clean switch to mercurial and they want to be able to use both for a certain amount of time.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Ok, I have a fork of a project on github. This fork has been merged with the latest commit of the upstream project.

I just received commit access to the original project...how do I move my local repo over to the upstream project?

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

Thermopyle posted:

Ok, I have a fork of a project on github. This fork has been merged with the latest commit of the upstream project.

I just received commit access to the original project...how do I move my local repo over to the upstream project?

Just run this on the command line:

git remote rm origin
git remote add origin new_url_here

That will change the configured location of the origin repo to the new one.

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."
I'm finding a number of checkout are having their cleanups/updates fail because files that have been versioned and present on the machine for a long while are coming up as no longer versioned. Deleting the offending file brings up the same error complaining of the now missing file, so I had to delete the parent directory and restore it with an update. Does anyone know what's going on?

Also, say the project auto-generates files, so the same unversioned files are on many machines, and then one of those files was committed. Is there anything that can be done short of detecting the conflict ahead of time and removing the file, to stop this killing attempted updates? Is there a recommended procedure, perhaps something the person committing the file should do?

wwb
Aug 17, 2004

Typically, one sets up the generated output to be ignored for vcs purposes. Exactly how really depends on what VCS you are using is.

Sizzlechest
May 7, 2007

BizarroAzrael posted:

I'm finding a number of checkout are having their cleanups/updates fail because files that have been versioned and present on the machine for a long while are coming up as no longer versioned. Deleting the offending file brings up the same error complaining of the now missing file, so I had to delete the parent directory and restore it with an update. Does anyone know what's going on?

Chances are someone or some process is mucking with hidden metadata files/directories or moving files through the OS' file system commands instead of through the VCS client.

epswing
Nov 4, 2003

Soiled Meat
Is the method to add all new files to svn still some bullshit like
svn status | grep "^\?" | awk '{print $2}' | xargs svn add

Sizzlechest
May 7, 2007

epswing posted:

Is the method to add all new files to svn still some bullshit like
svn status | grep "^\?" | awk '{print $2}' | xargs svn add

God no. Do you mean recursively add all files in the current directory and in all subfolders to the working copy? If so, it's:

svn add --force .

If you use an asterisk instead of a period (and no --force), globing rules will gently caress it up. Unix/Linux folks are usually aware of this, but people on Windows aren't aware of this behavior inherited from that command line environment.

epswing
Nov 4, 2003

Soiled Meat

Sizzlechest posted:

svn add --force .

But this will ignore svn:ignore :(

Sizzlechest
May 7, 2007

epswing posted:

But this will ignore svn:ignore :(

No, it won't. It skips over ignored files.

Here's an example:
You have a directory with three files: foobar.c foobar.obj foobar.exe

Only the .c file should be committed so you ignore the other two.

However, if you type:

svn add foobar.obj

Subversion will add the file even though .obj files are normally ignored. It does this because you explicitly told it to. So why does

svn add * or svn add --force *

add ignored files? It's because of globbing. The asterisk is expanded BEFORE the command is executed. In other words, it's as if you typed:

svn add foobar.c foobar.exe foobar.obj

By using the "." instead of the asterisk, you don't trigger globbing. (The --force is used since there might be files already added in the working copy.)

Yakattak
Dec 17, 2009

I am Grumpypuss
>:3

For some god drat reason, git isn't making commits when I merge :saddowns:. For instance, I'm on master and I want to merge in issue3.

git merge issue3

That by default is supposed to make a commit that's like "Merge branch issue3" or something along those lines. However, such a commit never appears in my log, and it really isn't committing the merge. I've tried doing git merge --commit issue3 but still no commit. I'm on Mac OS X and git version 1.7.2.3.

Lysidas
Jul 26, 2002

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

Yakattak posted:

For some god drat reason, git isn't making commits when I merge :saddowns:. For instance, I'm on master and I want to merge in issue3.

git merge issue3

That by default is supposed to make a commit that's like "Merge branch issue3" or something along those lines. However, such a commit never appears in my log, and it really isn't committing the merge. I've tried doing git merge --commit issue3 but still no commit. I'm on Mac OS X and git version 1.7.2.3.

Does the merge output contain "Fast-forward" or "Merge made by recursive."?

If this is the situation:
code:
o---o---o---o---o---o---o
    ^                   ^
  master              issue3
then running git merge issue3 on the master branch will just move the master branch (think of it as a pointer to a commit) forward without losing any history. Merge means "make this branch contain all of the commits in that other branch", and making a new commit isn't necessary if e.g. issue3 is a superset of master.

If you really want a new commit after the merge (i.e. you want the history to look like this afterward):
code:
                      master
                        v
o---o-------------------o
     \                 /
      o---o---o---o---o
                      ^
                    issue3
then you should run git merge --no-ff issue3 ("no fast-forwards").

Yakattak
Dec 17, 2009

I am Grumpypuss
>:3

Lysidas posted:

Does the merge output contain "Fast-forward" or "Merge made by recursive."?

If this is the situation:
code:
o---o---o---o---o---o---o
    ^                   ^
  master              issue3
then running git merge issue3 on the master branch will just move the master branch (think of it as a pointer to a commit) forward without losing any history. Merge means "make this branch contain all of the commits in that other branch", and making a new commit isn't necessary if e.g. issue3 is a superset of master.

If you really want a new commit after the merge (i.e. you want the history to look like this afterward):
code:
                      master
                        v
o---o-------------------o
     \                 /
      o---o---o---o---o
                      ^
                    issue3
then you should run git merge --no-ff issue3 ("no fast-forwards").

Yeah it does fast forward. What are the drawbacks to not fast forwarding?

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

Yakattak posted:

Yeah it does fast forward. What are the drawbacks to not fast forwarding?

You get a commit. :v:

Lysidas
Jul 26, 2002

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

Yakattak posted:

Yeah it does fast forward. What are the drawbacks to not fast forwarding?

The only drawback is that it makes the history less linear and slightly harder to follow if you're looking at it later (EDIT: and there a lot of other crazy complicated merges in this vicinity).

On the other hand, if you don't fast-forward, the structure of the graph can easily tell you which commits were related to issue3. You lose this information if you do a fast-forward, but this isn't a consideration if you prefix your commit messages with "issue3" or "i3" or something like that.

Lysidas fucked around with this message at 23:33 on Nov 11, 2010

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

Lysidas posted:

this isn't a consideration if you prefix your commit messages with "issue3" or "i3" or something like that.
That defeats the point of having branches. If it's important that they be recognizable, the branch should be merged without fast-forwarding.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Quick high level question, apologies if something similar has already been answered:

I have a small personal project where I am the only developer. I would like to use some sort of easy online source control for a few reasons:

(1) So I can develop on multiple machines easily
(2) Backup
(3) Revert to or view old versions

I would like to emphasize that ease of use is my #1 priority, I don't need anything fancy. I want to be able to push my entire codebase with one click and download with another. Sophisticated merging is unnecessary as I'm the only developer.

Recommendations?

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

Orzo posted:

I have a small personal project where I am the only developer. I would like to use some sort of easy online source control
You want github.

Smugdog Millionaire
Sep 14, 2002

8) Blame Icefrog
I've used github and bitbucket for small personal projects and the overhead is pretty slight. What you get is worth the overhead.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Thanks. I will check it out.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
So is there a way to tell Mercurial "I don't care about these files" without it deleting them on the next commit?

We have a bunch of poo poo on a development web server that sits under the same root as "my" project, but in a different sub directory.

code:
webroot/
  +-.hg 
  +-project.php
  +-project2.php
  +-subdir_of_project/
  +-shit_not_part_of_project/
      +-logo.gif
      +-index.html
I added shit_not_part_of_project into .hgignore, but can other developers now delete shit_not_part_of_project from their repositories without it being deleted from the webroot in the next push? (In reality the subdirectory contains thousands of files)

The current situation is kind of poo poo, but I can live with it if it's not possible.

(I tried "hg forget", but that didn't work quite as I thought :downsgun:. Thank god for version control :v:)

uXs
May 3, 2005

Mark it zero!

Wheany posted:

So is there a way to tell Mercurial "I don't care about these files" without it deleting them on the next commit?

We have a bunch of poo poo on a development web server that sits under the same root as "my" project, but in a different sub directory.

code:
webroot/
  +-.hg 
  +-project.php
  +-project2.php
  +-subdir_of_project/
  +-shit_not_part_of_project/
      +-logo.gif
      +-index.html
I added shit_not_part_of_project into .hgignore, but can other developers now delete shit_not_part_of_project from their repositories without it being deleted from the webroot in the next push? (In reality the subdirectory contains thousands of files)

The current situation is kind of poo poo, but I can live with it if it's not possible.

(I tried "hg forget", but that didn't work quite as I thought :downsgun:. Thank god for version control :v:)

It depends if the files are already in source control or not. hgignore only works for files that Mercurial doesn't know about yet.

If they're not under source control yet, you can just add it to .hgignore.
If they are under source control, I think hg forget is what you need. (Plus adding them to .hgignore.) But in this case you'll have to coordinate what you're doing with the other devs because otherwise you'll have trouble.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

uXs posted:

It depends if the files are already in source control or not. hgignore only works for files that Mercurial doesn't know about yet.

If they're not under source control yet, you can just add it to .hgignore.
If they are under source control, I think hg forget is what you need. (Plus adding them to .hgignore.) But in this case you'll have to coordinate what you're doing with the other devs because otherwise you'll have trouble.

No, hg delete deletes the file, then marks it as deleted.

hg forget marks the file as deleted, then deletes it when you commit.

uXs
May 3, 2005

Mark it zero!
What? No it doesn't.

Edit: after rereading your first post: it will delete them when you push though (or to be more correct, when you update after a push), which I guess is your problem.

If I'm following correctly, you should do:

hg forget the files locally, and add them to .hgignore
then commit

make a backup of the files on the server
push your changes to the server, and update it
at this point the forgotten files will be deleted on the server, but you have a backup, so put it back

Now both locally and on the server the files will be ignored, and your next commits and pushes and updates will all ignore them. Just make sure to never update your server to the changeset where you removed/ignored the files, or any changeset before it.

(Also, test all this before you actually do this on a live server. It also wouldn't hurt to experiment some more with deletes and ignores and everything so you really have a good handle on all of this.)

(And personally, I'm not a fan of using push&update to deploy stuff to a server. You should have some kind of real deployment script/program that handles all this.)

uXs fucked around with this message at 23:27 on Nov 17, 2010

epswing
Nov 4, 2003

Soiled Meat
What's wrong with a server doing pull/update to a specific revision? What script would you write that doesn't involve this?

ATLbeer
Sep 26, 2004
Über nerd
So we have a single file and separately a directory that we want to move out of a project and into different repositories as they have matured enough to be stand-alone libraries and should start to be tracked individually.

Obviously I could create a brand new a repo and just dump the files there but, the SVN commit logs and history of the files are important. Is there anyway to perserve this for these files and transport them to the new repos?

Hmm... looks like this is going to be some SVN server side black magic

svnadmin dump xxx/ | svndumpfilter --drop-empty-revs --renumber-revs include http://xxx/trunk/js/xxx.js > rpr_tmp

?

ATLbeer fucked around with this message at 21:48 on Nov 18, 2010

MachinTrucChose
Jun 25, 2009
I know this isn't the right thread, but anyone recommend a version control tool that works well (fast) with binary files, and is simple to use by a non-technical Windows user?

I have a non-programmer friend doing temperature/water/something research that involves writing some basic FORTRAN code, long input files (thousands of lines), but also huge output binary files (500MB), some of which must be saved, while others are temporary. He spent ages looking for one crucial file yesterday, wading through dozens of backups created by copy-pasting the folders. That's what version control is to the common user.

Is there a version control tool for someone like him, that would let him easily push all that stuff to an external drive? Something that would easily set exclusions (eg never sync files with .temp extension), easily revert back to previous versions, see comments, and so on? Integration with Windows Explorer preferred.

All I know is SVN, and I think TortoiseSVN may be a bit too complicated for him. Plus I'm not sure if SVN chokes on huge binary files.

musclecoder
Oct 23, 2006

I'm all about meeting girls. I'm all about meeting guys.

MachinTrucChose posted:

I know this isn't the right thread, but anyone recommend a version control tool that works well (fast) with binary files, and is simple to use by a non-technical Windows user?

I have a non-programmer friend doing temperature/water/something research that involves writing some basic FORTRAN code, long input files (thousands of lines), but also huge output binary files (500MB), some of which must be saved, while others are temporary. He spent ages looking for one crucial file yesterday, wading through dozens of backups created by copy-pasting the folders. That's what version control is to the common user.

Is there a version control tool for someone like him, that would let him easily push all that stuff to an external drive? Something that would easily set exclusions (eg never sync files with .temp extension), easily revert back to previous versions, see comments, and so on? Integration with Windows Explorer preferred.

All I know is SVN, and I think TortoiseSVN may be a bit too complicated for him. Plus I'm not sure if SVN chokes on huge binary files.

Your best bet may be to set him up with something like Dropbox or one of the "cloud" based backup systems. They may not be able to selectively back stuff up, but it's automatic and most of them have some type of version control built in.

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."
I have a guy who does periodic SVN updates on the project, but most of the time it gets interrupted saying it needs a cleanup. On attempting this, it will say that some file or other is "not under version control", though the SVN tag still shows on the file and there is no reason I can see for it not being under SVN versioning, it's not something this guy has changed.

Firstly, what do you suppose is causing this? I've seen it elsewhere but it only seems to be effecting this guy regularly.

Second, what's the best fix? In the past I have moved or deleted the whole directory and checked it out again, but this stack overflow thread I found says to delete a log file in the .svn directory, but I don't see one in there.

Edit: actually, the problem seemed to be .svn files being marked read only. Was able to switch them back and it looks like it's updating fine. Why would that happen though? It's an automated overnight update so maybe I can just add something to switch appropriate file properties to stop them being read only.

BizarroAzrael fucked around with this message at 12:14 on Nov 22, 2010

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"

MachinTrucChose posted:

I know this isn't the right thread, but anyone recommend a version control tool that works well (fast) with binary files, and is simple to use by a non-technical Windows user?
This is totally the right thread.

All major DVCS (bazaar, mercurial, git) are basically the same when it comes to binary files; they might have some basic compression or bdiff logic, but there's no way around the fact that you're versioning 500MB blobs. They do have all your requested features, and should be reasonably fast, but the repositories will be huge.

Since installing and testing them should take maybe 5 minutes max, how about you just try them out with his workflow and see which works best? Bazaar has a Windows shell extension built in, Mercurial has TortoiseHg, Git has TortoiseGit

tef
May 30, 2004

-> some l-system crap ->

MachinTrucChose posted:

I know this isn't the right thread, but anyone recommend a version control tool that works well (fast) with binary files, and is simple to use by a non-technical Windows user?

Find a tool you think he will like and then pick the version control system.
IDE integration would be best.

I'd recommend a hosted repository for him, as he may enjoy using a web interface
for some tasks (finding old revisions) than going through a shell extension.

quote:

I have a non-programmer friend doing temperature/water/something research that involves writing some basic FORTRAN code, long input files (thousands of lines), but also huge output binary files (500MB), some of which must be saved, while others are temporary.

The output files do not need to be under version control, just backed up. Teach him to make the output files go into timestamped files or directories (with version numbers).

I'd always avoid storing output or logging in svn - version control it isn't as useful for these files and clutters up code repositories. You may be able to sync these with dropbox or similar.

tef
May 30, 2004

-> some l-system crap ->

BizarroAzrael posted:

Firstly, what do you suppose is causing this? I've seen it elsewhere but it only seems to be effecting this guy regularly.

svn is case-sensitive, some file systems aren't. this can break things.

alternatively, something has the svn:needs-lock property.

Cabbages and VHS
Aug 25, 2004

Listen, I've been around a bit, you know, and I thought I'd seen some creepy things go on in the movie business, but I really have to say this is the most disgusting thing that's ever happened to me.
git-wtf has made my life better.

dizzywhip
Dec 23, 2005

Gitbox just hit 1.0. Looks like a lot of nice changes, the main one being you can now open a bunch of repositories in a single window.

It's a sort of commercial app now though. The only restriction on the free version is that you can't open multiple repositories at once. It costs 40bux but it's 30% off until December. It's a pretty useful app, I basically always have it open.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Wheany posted:

I added shit_not_part_of_project into .hgignore, but can other developers now delete shit_not_part_of_project from their repositories without it being deleted from the webroot in the next push? (In reality the subdirectory contains thousands of files)

Hmm, I have no idea what happened, but now it worked for some reason. I did do it step by step this time:

hg remove to remove any deleted files from the directory that was not part of project. Commit.
created .hgignore, added the directory. Commit.
hg forget directory. Commit.

This time it didn't delete stuff. :confused:

BizarroAzrael
Apr 6, 2006

"That must weigh heavily on your soul. Let me purge it for you."
Anyone ever had this:

XML Parsing Error: not well-formed

This guy gets this on attempting to commit a file. He move the file to another machine's working copy and gets the same thing.

Adbot
ADBOT LOVES YOU

Mithaldu
Sep 25, 2007

Let's cuddle. :3:

BizarroAzrael posted:

Anyone ever had this:

XML Parsing Error: not well-formed

This guy gets this on attempting to commit a file. He move the file to another machine's working copy and gets the same thing.

You should mention what VCS this is with. Also: You should move to another one, as a VCS that is based on XML probably sucks hard.

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