Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. @echo off
  2.  
  3. @REM Create a 3-revision database
  4. hg init current
  5. cd current
  6. echo >file1
  7. hg add
  8. hg ci -m file1
  9. echo >file2
  10. hg add
  11. hg ci -m file2
  12. echo >file3
  13. hg add
  14. hg ci -m file3
  15.  
  16. @REM Add the first revision to the splice map
  17. hg log -r 0 --template "{node} " > ..map
  18.  
  19. @REM Display the result
  20. hg log
  21. cd ..
  22.  
  23. @REM Create a 1-revision database
  24. hg init ignore
  25. cd ignore
  26. echo glob:*.txt>.hgignore
  27. hg add
  28. hg ci -m ignore
  29.  
  30. @REM Specify this node as the parent of the other
  31. @REM database's first revision in the splice map
  32. hg log -r 0 --template "{node}n" >> ..map
  33. hg log
  34. cd ..
  35.  
  36. @REM Here's the resulting splice map
  37. type map
  38.  
  39. @REM Make a copy to store the result
  40. hg clone ignore result
  41.  
  42. @REM Add revisions from "current" to "result" honoring
  43. @REM the splice map
  44. hg convert current result --splicemap map
  45.  
  46. @REM Display the result
  47. cd result
  48. hg log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement