Possible bug with removing files?
eurokang at gmail.com
Mon Sep 3 09:58:13 BST 2007
Sorry, forgot to copy the list.
On 9/3/07, Martin Pool <mbp at sourcefrog.net> wrote:
> On 9/3/07, Andrew King <eurokang at gmail.com> wrote:
> > Hi,
> > Someone complained that a file is missing from our repository. I am
> > not sure if I have found a bug or not ...
> > (aside ... is it desired behaviour that doing bzr log "myRemovedFile"
> > gives no information? It is very very difficult to find out which
> > revision caused a missing file).
> > Eventually, after doing bzr diff down numerous revisions, I found a
> > place where the file got removed ...
> > bzr diff -r886.1.62..8220.127.116.11.18.104.22.168.9 | grep myFileName
> > shows file missing
> > === removed file 'myFileName'
> > --- myFileName 2007-08-28 03:59:02 +0000
> > +++ myFileName 1970-01-01 00:00:00 +0000
> > @@ -1,51 +0,0 @@
> I assume the removed lines were shown here and you just omitted them
> for privacy/length (which is fine)?
Yes, all the lines in the file were quoted.
> > However,
> > bzr log -v -r886.1.62..822.214.171.124.126.96.36.199.9 | grep myFileName
> > does not return anything! In other words, diff shows the file being
> > removed without any commit in that area removing the file?!
> > Can anyone explain this please, or help me fix it?
> That is surprising. A good start for fixing it would be trying to
> write a smaller reproduction, either as a shell script or as a bzr
> test. My guess is that this is happening because the removal is
> attributed to a merge back towards the mainline, and you'll need it to
> be deleted on a merged-in revision to see this happen.
What is a "merge back towards the mainline"? Is there an easier way to
find out why the file was removed, or what commit caused it to be
Ok, I have queried a few people, and someone has owned up to getting a
conflict on that file "which didn't make sense, because the file
didn't exist"?! So it appears that the conflict was resolved
incorrectly. I am guessing this could have been a criss-cross merge
conflict (because the file did not exist in one branch, but did in the
other), but I am completely guessing.
Still, I think it would be reasonable to see a "removed" appear
against that file in the output of bzr log -v for that revision.
This might also explain why files are being removed without people
being aware of them, if they are removed in a merge and don't show up
in the commit log or status?
Thanks for the help,
More information about the bazaar