Mercurial HG pull specific “no changes” yet files different

限于喜欢 提交于 2020-01-25 12:57:04

问题


My local file and mercurial revision are at different stages however hg pull & hg update default returns a no changes message.

On bitbucket my repo and revision I am trying to pull to local machine is https://bitbucket.org/sayth/pyxml/src/c63b5ce2119ae64331ee2551fc19083315be0571/xrace.py

[sayth@localhost pyXML]$ hg pull && hg update default 
pulling from https://bitbucket.org/sayth/pyxml
searching for changes
no changes found
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

At bitbucket at latest revision you can see just in the imports alone they are different.

Bitbucket

# from lxml import etree
from lxml import objectify
import argparse
import os

local machine

from pyquery import PyQuery as pq
# import pandas as pd
# import psycopg2
import argparse
import os
# from datetime import datetime

Even trying pulling by revision number but it wont update.

[sayth@localhost pyXML]$ hg pull -r c63b5ce
pulling from https://bitbucket.org/sayth/pyxml
no changes found

回答1:


Your clone is a full copy of the remote repository with all the revisions in it.
When you pull you're checking the remote repo for any new revisions and copying them to your local clone, but it does not change the files that you are currently editing.

update changes your working copy, i.e. the files you are currently editing to whatever revision you choose.
If you just do hg update without specifying a revision it will update to whatever it thinks is the current tip of the repo.
If you do hg update -r c63b5ce2119a it will update your working copy to the specified revision and that will change the files you are currently editing.



来源:https://stackoverflow.com/questions/37943636/mercurial-hg-pull-specific-no-changes-yet-files-different

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!