You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Chris Graham <ch...@gmail.com> on 2012/03/01 01:41:30 UTC

GIT DIFF

Can someone please walk me through exactly what it is doing?

It's doing two different diffs, and then I'm not sure what, and I certainly
don't know why.

TIA,

-Chris

Re: GIT DIFF

Posted by Chris Graham <ch...@gmail.com>.
No it's not.

I'm working on the jazz SCM provider.

The GIT one, I'm using for reference, as it has similar concepts (re
push/pull) to Jazz's (deliver/accept).

So, yes, it's a GIT specific question, but it is very much the in the
context of the maven-scm-providers.

So, this is the right place to ask.

-Chris

On Thu, Mar 1, 2012 at 11:52 AM, Ansgar Konermann <
ansgar.konermann@googlemail.com> wrote:

> Am 01.03.2012 01:41 schrieb "Chris Graham" <ch...@gmail.com>:
> >
> > Can someone please walk me through exactly what it is doing?
>
> This is the wrong list for git-related questions.
>
> Best
>
> Ansgar
>
> >
> > It's doing two different diffs, and then I'm not sure what, and I
> certainly
> > don't know why.
> >
> > TIA,
> >
> > -Chris
>

Re: GIT DIFF

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 01.03.2012 01:41 schrieb "Chris Graham" <ch...@gmail.com>:
>
> Can someone please walk me through exactly what it is doing?

This is the wrong list for git-related questions.

Best

Ansgar

>
> It's doing two different diffs, and then I'm not sure what, and I
certainly
> don't know why.
>
> TIA,
>
> -Chris

Re: GIT DIFF

Posted by Chris Graham <ch...@gmail.com>.
On Fri, Mar 2, 2012 at 10:10 AM, Barrie Treloar <ba...@gmail.com> wrote:

> So that means your working copy reflects what stream you pulled down
> from the server.
> And the only way to switch that work is to contact the server again.
> DVCS has the version control files for everything locally, so you can
> work disconnected *yay* and switch branches, etc without needing a
> network connection.
>

I think that there is a LARGE difference here in the way that the OS world
and the Corporate World work.

If you'd seen some of the abuses of repositories that I'd seen, then you'd
not be wanting to pull down the *entire* (10Gb+) repository.

In corporate world, you are normally connected to <whatever>.

So it's rarely an issue.

For distributed OS based work, that model does not apply.

-Chris

PS: Does ClearCase Multi Site count as DVCS? :-) Or is it just repo to repo
replication behind the scenes? :-)

Re: GIT DIFF

Posted by Chris Graham <ch...@gmail.com>.
:-)

A true DVCS, no.

Does it share many of the same constructs etc, as a true DVCS? Yes.

In many ways, the fact that the 'local repo' is actually a server side
logical construct, is pretty much irrevalent.

Jazz SCM is only a small part of the overall Jazz platform.

Once you start considering that Jazz includes issue resolution, agile
project management etc, I can see what and why they have done what they've
done.

The Jazz repository, of which the SCM stuff is only a part, contains
*everything* :-)

I don't belive (as is commonly said) that it is based on ClearCase UCM. In
concept, probably, but when I look a AccurRev's tutorials, I may as well be
looking at a ClearCase one!

That said, back to SCM and DVCS, the fact that local repo is a server side
construct really makes little difference (it certainly made zero difference
to me, in writing the api). As, the thinking behind the pull/push,
accept/deliver is the same. Jazz also supports multiple flow targets. So,
can deliver to more than one repo in the one operation. I'm not sure if
git, et. al., offer the same.

All of that said, the devs who have used it have mostly liked the scm side
- once they got used to it - it took me about a month to have me "ah ha!"
moment. :-)

The thing that they really really liked, is the workflow around that. The
agile based issue management, being implicity tried back tinto the source
etc. So, in many ways I do think of it as ClearQuest enabled UCM Clearcase,
at least in concept. Which in reality, is all the same, as they all
borrow/steal from each other.

That said, I still prefer SVN (though, it could well be a comfort answer
here... <G>), it's easy. It's simple. It's easily understood! And in some
case (this can be THE most important decision), it's easy to get resources
who understand it!

-Chris

On Fri, Mar 2, 2012 at 10:10 AM, Barrie Treloar <ba...@gmail.com> wrote:

> On Thu, Mar 1, 2012 at 6:58 PM, Chris Graham <ch...@gmail.com> wrote:
> > "It is then your choice when you want to update your working copy with
> the
> > changes you just fetched."
> >
> > :-) That would be the merge then.
> >
> > Git pull = fetch + merge.
> >
> > Interestingly enough, Jazz doesn't let you do that; in that is does not
> > separate the fetch and merge.
> >
> > When you accept from another Stream or Repository Workspace, you do it
> into
> > your (or any specified, really) Workspace.
> >
> > Your working copy, (sandbox in Jazz terms) is automatically updated with
> > the results of the accept, if there is a sandbox that has been loaded
> > (checkout in svn terms) associated with that workspace.
>
> (Completely ignorant assumptions follow :)
> That's probably because Jazz is not a distributed version control system
> (DVCS).
> i.e. git and mercurial have a *complete* repository on every location
> where a checkout has occurred.
> Jazz is probably based off of ClearCase UCM which is also not a DVCS.
>
> So that means your working copy reflects what stream you pulled down
> from the server.
> And the only way to switch that work is to contact the server again.
> DVCS has the version control files for everything locally, so you can
> work disconnected *yay* and switch branches, etc without needing a
> network connection.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: GIT DIFF

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Mar 1, 2012 at 6:58 PM, Chris Graham <ch...@gmail.com> wrote:
> "It is then your choice when you want to update your working copy with the
> changes you just fetched."
>
> :-) That would be the merge then.
>
> Git pull = fetch + merge.
>
> Interestingly enough, Jazz doesn't let you do that; in that is does not
> separate the fetch and merge.
>
> When you accept from another Stream or Repository Workspace, you do it into
> your (or any specified, really) Workspace.
>
> Your working copy, (sandbox in Jazz terms) is automatically updated with
> the results of the accept, if there is a sandbox that has been loaded
> (checkout in svn terms) associated with that workspace.

(Completely ignorant assumptions follow :)
That's probably because Jazz is not a distributed version control system (DVCS).
i.e. git and mercurial have a *complete* repository on every location
where a checkout has occurred.
Jazz is probably based off of ClearCase UCM which is also not a DVCS.

So that means your working copy reflects what stream you pulled down
from the server.
And the only way to switch that work is to contact the server again.
DVCS has the version control files for everything locally, so you can
work disconnected *yay* and switch branches, etc without needing a
network connection.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: GIT DIFF

Posted by Chris Graham <ch...@gmail.com>.
"It is then your choice when you want to update your working copy with the
changes you just fetched."

:-) That would be the merge then.

Git pull = fetch + merge.

Interestingly enough, Jazz doesn't let you do that; in that is does not
separate the fetch and merge.

When you accept from another Stream or Repository Workspace, you do it into
your (or any specified, really) Workspace.

Your working copy, (sandbox in Jazz terms) is automatically updated with
the results of the accept, if there is a sandbox that has been loaded
(checkout in svn terms) associated with that workspace.

-Chris

On Thu, Mar 1, 2012 at 5:18 PM, Barrie Treloar <ba...@gmail.com> wrote:

> On Thu, Mar 1, 2012 at 3:06 PM, Chris Graham <ch...@gmail.com> wrote:
> > That's wierdly worded.
> >
> > So, a fetch updates your local repo with that of a remote repo, but NOT
> > your local working copy?
> > And
> > a pull does the merge as well, which is remote -> local > working copy?
> >
> > Terminology is rather important  here.
> >
> > I've also see the term staging area, which I assume is the local repo.
> >
> > Does git have a term for what  SVN calls a working copy?
>
> See http://hginit.com/
> It's mercurial rather than git, but the concepts are similar
>
> I can't find the equivalent one for git, mustn't have book marked it.
>
> Your working copy is your current directory.
> With git (and mercurial) when you "fetch" from a remote repository you
> get a complete duplicate in your local repository.
> It is then your choice when you want to update your working copy with
> the changes you just fetced.
>
> But I'm still new to git...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: GIT DIFF

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Mar 1, 2012 at 3:06 PM, Chris Graham <ch...@gmail.com> wrote:
> That's wierdly worded.
>
> So, a fetch updates your local repo with that of a remote repo, but NOT
> your local working copy?
> And
> a pull does the merge as well, which is remote -> local > working copy?
>
> Terminology is rather important  here.
>
> I've also see the term staging area, which I assume is the local repo.
>
> Does git have a term for what  SVN calls a working copy?

See http://hginit.com/
It's mercurial rather than git, but the concepts are similar

I can't find the equivalent one for git, mustn't have book marked it.

Your working copy is your current directory.
With git (and mercurial) when you "fetch" from a remote repository you
get a complete duplicate in your local repository.
It is then your choice when you want to update your working copy with
the changes you just fetced.

But I'm still new to git...

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: GIT DIFF

Posted by Benjamin Hanzelmann <be...@hanzelmann.de>.
I found http://www.ndpsoftware.com/git-cheatsheet.html useful as an
overview for what's going from/to where in git.

Ben

On 01.03.2012 05:36, Chris Graham wrote:
> That's wierdly worded.
> 
> So, a fetch updates your local repo with that of a remote repo, but
> NOT your local working copy? And a pull does the merge as well,
> which is remote -> local > working copy?
> 
> Terminology is rather important  here.
> 
> I've also see the term staging area, which I assume is the local
> repo.
> 
> Does git have a term for what  SVN calls a working copy?
> 
> -Chris
> 
> On Thu, Mar 1, 2012 at 2:51 PM, Barrie Treloar <ba...@gmail.com>
> wrote:
> 
>> On Thu, Mar 1, 2012 at 1:28 PM, Chris Graham
>> <ch...@gmail.com> wrote:
>>> One git specific question though, does a git pull, pull the
>>> changes all
>> the
>>> way down to your working copy? Again, sorry for the git
>>> ignorance.
>> 
>> 
>> http://stackoverflow.com/questions/292357/whats-the-difference-between-git-pull-and-git-fetch
>>
>>
>> 
Quoting:
>> 
>> In the simplest terms, "git pull" does a "git fetch" followed by
>> a "git merge".
>> 
>> You can do a "git fetch" at any time to update your local copy of
>> a remote branch. This operation never changes any of your own
>> branches and is safe to do without changing your working copy. I
>> have even heard of people running "git fetch" periodically in a
>> cron job in the background (although I wouldn't recommend doing
>> this).
>> 
>> A "git pull" is what you would do to bring your repository up to
>> date with a remote repository.
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>> 
>> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: GIT DIFF

Posted by Chris Graham <ch...@gmail.com>.
That's wierdly worded.

So, a fetch updates your local repo with that of a remote repo, but NOT
your local working copy?
And
a pull does the merge as well, which is remote -> local > working copy?

Terminology is rather important  here.

I've also see the term staging area, which I assume is the local repo.

Does git have a term for what  SVN calls a working copy?

-Chris

On Thu, Mar 1, 2012 at 2:51 PM, Barrie Treloar <ba...@gmail.com> wrote:

> On Thu, Mar 1, 2012 at 1:28 PM, Chris Graham <ch...@gmail.com> wrote:
> > One git specific question though, does a git pull, pull the changes all
> the
> > way down to your working copy? Again, sorry for the git ignorance.
>
>
> http://stackoverflow.com/questions/292357/whats-the-difference-between-git-pull-and-git-fetch
>
> Quoting:
>
> In the simplest terms, "git pull" does a "git fetch" followed by a "git
> merge".
>
> You can do a "git fetch" at any time to update your local copy of a
> remote branch. This operation never changes any of your own branches
> and is safe to do without changing your working copy. I have even
> heard of people running "git fetch" periodically in a cron job in the
> background (although I wouldn't recommend doing this).
>
> A "git pull" is what you would do to bring your repository up to date
> with a remote repository.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: GIT DIFF

Posted by Barrie Treloar <ba...@gmail.com>.
On Thu, Mar 1, 2012 at 1:28 PM, Chris Graham <ch...@gmail.com> wrote:
> One git specific question though, does a git pull, pull the changes all the
> way down to your working copy? Again, sorry for the git ignorance.

http://stackoverflow.com/questions/292357/whats-the-difference-between-git-pull-and-git-fetch

Quoting:

In the simplest terms, "git pull" does a "git fetch" followed by a "git merge".

You can do a "git fetch" at any time to update your local copy of a
remote branch. This operation never changes any of your own branches
and is safe to do without changing your working copy. I have even
heard of people running "git fetch" periodically in a cron job in the
background (although I wouldn't recommend doing this).

A "git pull" is what you would do to bring your repository up to date
with a remote repository.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: GIT DIFF

Posted by Chris Graham <ch...@gmail.com>.
I've done the diff implementation, but I wanted to check, as the last one
that I've got to do, is update, and it's giving me some grief. Mostly in
assignined the concept of Working Copy to what?

In jazz, we basically have (from what I understand, similar to git) two or
three levels of repositories.

Working from the group up:

1. We have, on our local machine, the sandbox. This is where things reside
as files and directories on our disk.
2. We have, on the jazz server, a (the full name), Remote Repository
Workspace (or more commonly Workspace). This is a logical construct on the
server.
3. Optionally, we have, on the jazz server a (official name:) a flow target
of the Repository Workspace. This is usually a Stream (closest thing is a
branch), but can also be another Repository Workspace. We can have multiple
Flow Targets.

We checkin/load to/from the sandbox and the repository workspace.
We deliver to our flow targets, or accept from our flow targets. This is
controlled by the pushChanges flag, and is, from what I understand the same
as the git push/pull.

To, in Jazz it's a two stage process. I have to accept changes from the
stream, and I then have to load them into the sandbox (I don't appear to
have the conveienance of an update).

For the diff command, what I am I doing the diff between? The sandbox and
the repository (ie files that I have not checked in), or the repository and
the stream (if a valid flow target exists) (ie, changes made by others).

That is where the original question of what the gif diff came from, as I
don't know what the currently implementation is actually doing, so that I
can work out how to best map it to jazz SCM behaviour.

One git specific question though, does a git pull, pull the changes all the
way down to your working copy? Again, sorry for the git ignorance.

-Chris


On Thu, Mar 1, 2012 at 12:31 PM, Brett Porter <br...@apache.org> wrote:

> The answer to that is going to depend on the parameters you gave it and
> the state of the index.
>
> Maybe it might be better to look at it from the other angle - which
> scm:diff behaviour and parameters are you having trouble mapping onto the
> Jazz SCM provider?
>
> - Brett
>
> On 01/03/2012, at 11:41 AM, Chris Graham wrote:
>
> > Can someone please walk me through exactly what it is doing?
> >
> > It's doing two different diffs, and then I'm not sure what, and I
> certainly
> > don't know why.
> >
> > TIA,
> >
> > -Chris
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: GIT DIFF

Posted by Brett Porter <br...@apache.org>.
The answer to that is going to depend on the parameters you gave it and the state of the index.

Maybe it might be better to look at it from the other angle - which scm:diff behaviour and parameters are you having trouble mapping onto the Jazz SCM provider?

- Brett

On 01/03/2012, at 11:41 AM, Chris Graham wrote:

> Can someone please walk me through exactly what it is doing?
> 
> It's doing two different diffs, and then I'm not sure what, and I certainly
> don't know why.
> 
> TIA,
> 
> -Chris

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org