Skip to contentSkip to conversation

Problem with cg-merge

DISCUSSION Marcel Holtmann 4 participants 10 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi Petr,

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change: cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9
:100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38 fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739 5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

Regards

Marcel

#1 lore raw

Marcel Holtmann <[email protected]> wrote Sun, May 29, 2005:

Quoted 12 lines

Hi Petr,

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change: cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9
:100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38 fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739 5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...
Quoted 8 lines

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

The following change fixes cg-update for me. This is in tree_timewarp().

cg-Xlib (mode:100755) +1 -1
@@ -66,7 +66,7 @@
 		# XXX: This may be suboptimal, but it is also non-trivial to keep
 		# the adds/removes properly.  So this is just a quick hack to get it
 		# working without much fuss.
-		cg-diff -r $branch >$patchfile
+		cg-diff >$patchfile
 	fi
 
 	git-read-tree -m "$branch" || die "$branch: bad commit"
Signature · 1 line
Jonas Fonseca
#2 lore raw

Hi Jonas,

Quoted 24 lines
Quoted 10 lines

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change: cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9
:100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38 fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739 5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...
Quoted 8 lines

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

The following change fixes cg-update for me. This is in tree_timewarp().

cg-Xlib (mode:100755) line 72

Quoted 8 lines
cg-Xlib (mode:100755) +1 -1
@@ -66,7 +66,7 @@
 		# XXX: This may be suboptimal, but it is also non-trivial to keep
 		# the adds/removes properly.  So this is just a quick hack to get it
 		# working without much fuss.
-		cg-diff -r $branch >$patchfile
+		cg-diff >$patchfile
 	fi
 
 	git-read-tree -m "$branch" || die "$branch: bad commit"

this looks better now. Petr, please apply this patch.

Regards

Marcel

#3 lore raw

Dear diary, on Sun, May 29, 2005 at 08:17:30PM CEST, I got a letter where Marcel Holtmann <[email protected]> told me that...

Quoted 33 lines

Hi Jonas,

Quoted 31 lines
Quoted 10 lines

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change: cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9
:100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38 fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739 5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...
Quoted 8 lines

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

The following change fixes cg-update for me. This is in tree_timewarp().

cg-Xlib (mode:100755) +1 -1
@@ -66,7 +66,7 @@
 		# XXX: This may be suboptimal, but it is also non-trivial to keep
 		# the adds/removes properly.  So this is just a quick hack to get it
 		# working without much fuss.
-		cg-diff -r $branch >$patchfile
+		cg-diff >$patchfile
 	fi
 
Quoted 3 lines

cg-Xlib (mode:100755) line 72

Quoted 1 line
cg-Xlib (mode:100755) +0 -0
 	git-read-tree -m "$branch" || die "$branch: bad commit"

this looks better now. Petr, please apply this patch.

Bah. Well if your imaginary friend in your head told you this is obviously just a no-go workaround, (s)he was right for once. You just broke cg-admin-uncommit with this one, the real fix is to tell tree_timewarp to rollback the tree (or rather rollforth here ;-). This way the right branch of this if will be invoked.

Signature · 3 lines
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
#4 lore raw

Hi Petr,

Quoted 35 lines
Quoted 31 lines
Quoted 31 lines
Quoted 10 lines

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change: cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9
:100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38 fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739 5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...
Quoted 8 lines

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

The following change fixes cg-update for me. This is in tree_timewarp().

cg-Xlib (mode:100755) +1 -1
@@ -66,7 +66,7 @@
 		# XXX: This may be suboptimal, but it is also non-trivial to keep
 		# the adds/removes properly.  So this is just a quick hack to get it
 		# working without much fuss.
-		cg-diff -r $branch >$patchfile
+		cg-diff >$patchfile
 	fi
 
Quoted 3 lines

cg-Xlib (mode:100755) line 72

Quoted 1 line
cg-Xlib (mode:100755) +0 -0
 	git-read-tree -m "$branch" || die "$branch: bad commit"

this looks better now. Petr, please apply this patch.

Quoted 5 lines

Bah. Well if your imaginary friend in your head told you this is obviously just a no-go workaround, (s)he was right for once. You just broke cg-admin-uncommit with this one, the real fix is to tell tree_timewarp to rollback the tree (or rather rollforth here ;-). This way the right branch of this if will be invoked.

I had no idea if the patch was correct or not, but it was working for me. I also tested your fix for it and it works for me and I am happy again.

Regards

Marcel

#5 lore raw
In reply to Petr Baudis

Petr Baudis <[email protected]> wrote Sun, May 29, 2005:

Quoted 16 lines

Dear diary, on Sun, May 29, 2005 at 08:17:30PM CEST, I got a letter where Marcel Holtmann <[email protected]> told me that...

Quoted 10 lines
Quoted 10 lines
cg-Xlib (mode:100755) +1 -1
@@ -66,7 +66,7 @@
 		# XXX: This may be suboptimal, but it is also non-trivial to keep
 		# the adds/removes properly.  So this is just a quick hack to get it
 		# working without much fuss.
-		cg-diff -r $branch >$patchfile
+		cg-diff >$patchfile
 	fi
 
Quoted 3 lines

cg-Xlib (mode:100755) line 72

Quoted 1 line
cg-Xlib (mode:100755) +0 -0
 	git-read-tree -m "$branch" || die "$branch: bad commit"

this looks better now. Petr, please apply this patch.

Quoted 5 lines

Bah. Well if your imaginary friend in your head told you this is obviously just a no-go workaround, (s)he was right for once. You just broke cg-admin-uncommit with this one, the real fix is to tell tree_timewarp to rollback the tree (or rather rollforth here ;-). This way the right branch of this if will be invoked.

Ok, I should have mentioned it was an ugly workaround.

There is another problem I've noticed in the work on the cogito manpages. To make it easier to update the ``external'' patch I maintain I have added the files Documentation/make-cg-asciidoc and Documentation/make-cogito-asciidoc but not actually committed them. That way cg-diff will include them (diffed against /dev/null) which I like very much. However, when I cg-update from my local cogito origin cg-merge will fast-forward using cg-diff which results in rejects when patching the local changes due to the files already existing.

One possibility would be to revert all local changes with the patch generated by cg-diff since most of them will be overwritten anyway. This would remove uncommitted added files but it would probably require use of the GIT metadata to get the fast-forwarding right with modes intact.

Signature · 1 line
Jonas Fonseca
#6 lore raw

Dear diary, on Sun, May 29, 2005 at 11:15:24PM CEST, I got a letter where Jonas Fonseca <[email protected]> told me that...

Quoted 9 lines

There is another problem I've noticed in the work on the cogito manpages. To make it easier to update the ``external'' patch I maintain I have added the files Documentation/make-cg-asciidoc and Documentation/make-cogito-asciidoc but not actually committed them. That way cg-diff will include them (diffed against /dev/null) which I like very much. However, when I cg-update from my local cogito origin cg-merge will fast-forward using cg-diff which results in rejects when patching the local changes due to the files already existing.

Quoted 5 lines

One possibility would be to revert all local changes with the patch generated by cg-diff since most of them will be overwritten anyway. This would remove uncommitted added files but it would probably require use of the GIT metadata to get the fast-forwarding right with modes intact.

I'm confused. Are you suggesting that we just throw away any local changes when updating? That sounds horrible - it's something the user has full right not to expect and I'd be very careful about it.

In the longer term we shouldn't muck with diff | patch but instead do a three-way merge on the local changes too.

Signature · 3 lines
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
#7 lore raw

Petr Baudis <[email protected]> wrote Mon, May 30, 2005:

Quoted 17 lines

Dear diary, on Sun, May 29, 2005 at 11:15:24PM CEST, I got a letter where Jonas Fonseca <[email protected]> told me that...

Quoted 9 lines

There is another problem I've noticed in the work on the cogito manpages. To make it easier to update the ``external'' patch I maintain I have added the files Documentation/make-cg-asciidoc and Documentation/make-cogito-asciidoc but not actually committed them. That way cg-diff will include them (diffed against /dev/null) which I like very much. However, when I cg-update from my local cogito origin cg-merge will fast-forward using cg-diff which results in rejects when patching the local changes due to the files already existing.

Quoted 5 lines

One possibility would be to revert all local changes with the patch generated by cg-diff since most of them will be overwritten anyway. This would remove uncommitted added files but it would probably require use of the GIT metadata to get the fast-forwarding right with modes intact.

Quoted 3 lines

I'm confused. Are you suggesting that we just throw away any local changes when updating? That sounds horrible - it's something the user has full right not to expect and I'd be very careful about it.

Forget what I suggested. The current way to cg-diff then update the tree and apply the local changes on top of that does handled locally added but uncommited files.

Quoted 2 lines

In the longer term we shouldn't muck with diff | patch but instead do a three-way merge on the local changes too.

Yes, that sounds nice.

Signature · 1 line
Jonas Fonseca
#8 lore raw
In reply to Marcel Holtmann
Quoted 16 lines · Marcel Holtmann

Hi Petr,

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change:
cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9 :100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38
fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739
5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...
Quoted 8 lines

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

Marcel,

Any chance you've installed a copy of git core in addition to your
original install of Cogito? That looks like a problem i saw when using a
newer git installed overtop of Cogito.

Sean

#9 lore raw

Hi Sean,

Quoted 19 lines
Quoted 19 lines

I saw that earlier, but I don't have any idea what's wrong here. If I do a simple cg-update, I see something like this:

Tree change:
cf1f29d97210d0594dcf5b2a734bdb714de6bf24:89a14a5bd2c880095d5c618a102319bb3dc03da9 :100755 100755 ceda2c50fc2c2941daa34a57722df251bf892c38
fea239b99d351502d1acb098abd725557f0af202 M cg-diff
:100755 100755 cc0c17beef75db41da3ad4ef8983bd7e222ac739
5f0bff77eb2110d52892793e5bef104acde7be32 M cg-help

Applying changes...
Fast-forwarding cf1f29d97210d0594dcf5b2a734bdb714de6bf24 -> 89a14a5bd2c880095d5c618a102319bb3dc03da9

        on top of cf1f29d97210d0594dcf5b2a734bdb714de6bf24...

patching file cg-diff
patching file cg-help
cg-diff: needs update
cg-help: needs update

Quoted 7 lines
Quoted 3 lines

This is a little bit odd, because if I call "git-diff-cache HEAD" after it, I will see that cg-diff and cg-help are modified. After calling cg-cancel everything looks fine again.

Any chance you've installed a copy of git core in addition to your
original install of Cogito? That looks like a problem i saw when using a
newer git installed overtop of Cogito.

no, I don't.

Regards

Marcel