pull/update from wrong repo

Ross Boylan ross at biostat.ucsf.edu
Fri Oct 11 23:24:07 UTC 2013


I pulled from the wrong repository (a separate project, though a few of 
the files are common) into the local "Ross" project and then did an 
update. I noticed lots of messages "removing filexxx" and interrupted 
it; I do not recall exactly how. The I tried to roll back.

Current state of "Ross"
1) history shows no sign of the bogus changes I pulled in
2) The files mentioned in the "removing" messages seem to be gone from 
the working directory; hg status shows them as missing ("!"). I assume 
this means I can recover them.
3) There are many files in the working directory not under version 
control (hg status shows "?").  There were many such files before the 
bogus merge as well.
4) I don't know if any files that weren't under version control were 
deleted.
5) Plenty of files that were under version control are still in the 
working directory.

The manual for hg update says
"If the changeset is not a descendant or ancestor of the working 
directory's parent, the update is aborted."
That was not what happened.

I am trying to understand what happened and the best way to recover.
I was using tortoisehg 2.8.1 on windows, with Hg 2.6.2.

"Ross" is the big project.  "Sunbelt" is a smaller project.  Over 
Sunbelt's life some files were copied from "Ross" via the working 
directory and added to the project.  I'm pretty sure I did not merge any 
changesets from Ross into Sunbelt.  I copied some of the files back to 
"Ross", again via the working directory.

Questions:
1) Would the operations have deleted files that were not under version 
control?
2) What's the best way to recover?  Is there an easy way to bulk restore 
the versioned files that were deleted?
3) What happened?

Thanks.
Ross Boylan

Here's what the log window showed, ### before comments added later:

% hg --repository I:\LAMOC\Ross pull --verbose 
c:\users\rdboylan\appdata\local\temp\thg.mrahtg\https__bitbucket.org_RossBoylan_sunbelt_eatky7.hg
pulling from 
c:\users\rdboylan\appdata\local\temp\thg.mrahtg\https__bitbucket.org_RossBoylan_sunbelt_eatky7.hg
searching for changes
all local heads known remotely
43 changesets found
adding changesets
adding manifests
adding file changes
added 43 changesets with 44 changes to 9 files (+1 heads)
(run 'hg heads .' to see heads, 'hg merge' to merge)
[command completed successfully Fri Sep 20 16:34:12 2013]
% hg update --verbose --config ui.merge=internal:fail --rev 1183 --check
resolving manifests
removing 090729 LAMOC sexual behaviors.doc
### many more removing ... messages
removing drugs02.log
### note: no message about abort or complete
% hg update --verbose --config ui.merge=internal:fail --rev "Real Corr" 
--check
abort: uncommitted local changes
[command returned code 255 Fri Sep 20 16:39:45 2013]
% hg rollback --verbose
repository tip rolled back to revision 1140 (undo pull: 
bundle:I:\LAMOC\Ross+c:\users\rdboylan\appdata\local\temp\thg.mrahtg\https__bitbucket.org_RossBoylan_sunbelt_eatky7.hg)
[command completed successfully Fri Sep 20 16:40:18 2013]
% hg --repository C:\Users\rdboylan\Documents\Sunbelt incoming --quiet 
--bundle 
c:\users\rdboylan\appdata\local\temp\thg.mrahtg\https__bitbucket.org_RossBoylan_sunbelt_8lifzl.hg 
https://bitbucket.org/RossBoylan/sunbelt
### long list ....
[command completed successfully Fri Sep 20 16:41:58 2013]




More information about the Mercurial mailing list