glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Hg cleanup status


From: Kai Antweiler
Subject: Re: [glob2-devel] Hg cleanup status
Date: Wed, 26 Nov 2008 00:00:03 +0100

It does not work for some reason:

# hg clone incoming test
# cd test

# hg revert -a -r b98c990c50d8
# hg update -C -r b98c990c50d8
# hg export -o ../stripped.patch d715e25d9c75
# hg strip -n 697e24c18cc6
# hg revert -a -r d715e25d9c75
# hg update -C -r d715e25d9c75
# hg import --exact ../stripped.patch

And the output of that import command is:

 applying ../stripped.patch
 23 files updated, 0 files merged, 21 files removed, 0 files unresolved
 rolling back last transaction
 abort: patch is damaged or loses information



My second thought was to redo the changes after "hg strip" by shell scripts.
But since I don't know which files have been moved from where, I have
to remove and add them. This makes things even worse, because of other
binary files involved.

If some know how to get the information about which files were moved
where, it could be useful.

Here is what I did:

# # clean the last try
# rm test.patch
# rm -r test

# # prepare
# hg clone incoming test
# mkdir tmp
# cd test

# # store the changes
# hg revert -a -r cf2b43b212eb
# hg update -C -r cf2b43b212eb
# hg stat --rev d715e25d9c75 > ../test.txt
# gawk '{if ($1=="A"||$1=="M") {sub(/^[AM] /,"");print "cp --parents
\"" $_ "\" ../tmp/"; }}' ../test.txt |sh

# # strip and redo the changes
# hg strip -n 697e24c18cc6
# hg revert -a -r d715e25d9c75
# hg update -C -r d715e25d9c75
#
# gawk '{if ($1=="R") {sub(/^[R] /,"");print "rm \"" $_ "\"" ; }}'
../test.txt |sh
# (cd ../tmp; find . -! -type d -exec cp --parents '{}' ../test/ \;)

# # put it into the repository
# hg addremove
# hg commit -m "re-added working directory after stripping the
.o-files-revisions"


# # test it
# cd ..
# hg clone incoming test2
# cd test2
# hg pull ../test
# hg update -C tip
# hg stat --rev cf2b43b212eb


# # clean
# cd ..
# rm test.txt
# rm -r tmp
# rm -r test2


# # remove the repository, because we want the files moved and not re-added.
# rm -r test



Notable Revisions:
d715e25d9c75 last clean
697e24c18cc6 first dirty
cf2b43b212eb before Leo's merge
b98c990c50d8 Leo's merge



-- 
Kai Antweiler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]